-
Posts
63 -
Joined
-
Last visited
-
Days Won
10
Content Type
Profiles
Forums
Downloads
Everything posted by Jumbofile
-
I need some help with the concept of limiting movement speed for multiplayer games. Current this is my server code (Java) case "2": player.movePlayer(Integer.parseInt(data[1])); sendPackets(packets.updatePlayerPos(player)); break; This receives the request for a player movement update and then sends the client the new movement coords. This is the client code (GDScript) func _input(event): #move up if Input.is_key_pressed(KEY_W): client.sendPacket(pDef.movePlayer(1)) #move left elif Input.is_key_pressed(KEY_A): client.sendPacket(pDef.movePlayer(2)) #move down elif Input.is_key_pressed(KEY_S): client.sendPacket(pDef.movePlayer(3)) #move right elif Input.is_key_pressed(KEY_D): client.sendPacket(pDef.movePlayer(4)) This chunk of code sends the server the request for a movement change when a button is down, of course this sends the server this packet as fast as your fps. I want to regulate speed on the server side. I cannot think of a way to accomplish this. Im not asking for exact code, just concepts. I want to be able to limit speed by an arbitrary value. Thank you for any help!
-
Ascension Game Dev Secret Santa
Jumbofile replied to Mighty Professional's topic in General Discussion
Id be down -
Will a psd for the file format?
-
Anything against Phaser 3?
-
Ill keep this short and sweet. Im looking to make an experimental client for my Orpg engine and im looking for some advice on which javascript game framework to use. It needs to be able to communicate with a java server (this will probably be done with some other networking framework) and be light/fast enough for an ORPG. An example would be phaser. I know nothing about any of the frameworks out there and im open to anything and everything even engines like godot. Thanks!
-
SOOOOOOO.... While work has been slow I've made some changes. I've switched from slick2d to libgdx and switched from Derby to H2. Many reasons to do this but it will make everything much easier for me. Movement is being worked on and hopefully school wont get much crazier for a while.
-
Still alive, movement is under ways. Will take longer because of school starting up.
-
Im gonna briefly play with the idea of a custom map editor but Tiled seems like the best way to go. I have the repo, just want it to be more than what I have before people get a hold of it lol. Im implementing movement as we speak so shouldnt be more than a couple of days.
-
This is my 2D Side Scroller ORPG Engine written in Java. Not a "no programming required engine" like we typically see around here. This is being developed for my own game but I decided to make it open source for other people to use. Its not currently ready to be used but I'm putting as much free time as I can into it. Currently the GitHub repo is private. I will make it public once basic movement Is implemented. This post is for documentation at this point. //Summary Currently the client can: - Accept login credentials and validate them over the server - Keep a consistent connection to the server - Use a TCP socket with UDP functionality - Load and display graphics from a folder - Have multiple game states and move between them Currently the server can: - Take commands to display and add to SQL databases. - Example: "/sql getdb:DBNAME" will print a database in the server console - Edit user information - Update admin with errors with game world - Display vital information needed to run a multiplayer game //Built With Slick2d - The graphics framework used Apache Derby - SQL databse used TWL - Advanced GUI features KyroNet - Networking BCrypt - Encryption for login //TODO - Expand upon UDP for actual gameplay - Implementing gameplay - More SQL commands in server - Add more databases relating to players - More to come..... //Screenshots
-
Windows has a HUGE advantage, it is the industry standard.
-
I can tell you how mad I was. I was about half way to 111 and it went down.
-
Anyone going to be playing the new expansion? I think it comes out tomorrow. The lore themed content made me resub yesterday after the boring demon theme of Legion made me want to quit. I think im going to play my hunter this xpac. Add me; Narrik on Sargeras US. If former wow players are here and haven't seen the xpac, here are some videos.
-
Ok so this is how I do it now This is the client: func send_player_cord(var x, var y): #tell the server what you are trying to do var content = "PLAYER_POS," + str(x) + "," + str(x) var yS = content.to_ascii() socketUDP.put_packet(yS) This is the server: // Receive a packet DatagramPacket packet = new DatagramPacket(buffer, buffer.length); socket.receive(packet); //recieve messageID to decide what to do with the packet String packetData = new String(packet.getData(), packet.getOffset(), packet.getLength()); //Grab message String messageID = packetData.substring(0, packetData.indexOf(',')); //Get senders ipaddress InetAddress IPAddress = packet.getAddress(); //Get senders port int port = packet.getPort(); System.out.println(messageID); //Do stuff based on messageID switch(messageID){ case "PLAYER_POS": //set packets to string String pX = packetData.substring(packetData.indexOf(',') + 1, packetData.lastIndexOf(',')); String pY = packetData.substring(packetData.lastIndexOf(',') + 1); //ystem.out.println(pX + ", " + pY); //Set player initial position serverPlayer.setPlayer(pX, pY); break;
-
Ill try their forums, doesnt seem as friendly and they assume you know more. So how im doing it on the godot end: First I make the string var x = pos.x Then I have to convert it to byte[] var xS = x.to_ascii() Finally I send it to the server (they only let me put one argument in this method) socketUDP.put_packet(xS) I appreciate the help so far, it has allowed me to move my character using a server.
-
My server isnt in godot so I didnt use their high-level networking library. Im using a custom java server.
-
The problem is that I dont believe Godot can send multiple objects in one packet.
-
So using all of yalls information and some stuff I found online I basically came up with this solution: The client sends a "message key" ex: PLAYER_MOVE and the server accepts that key. After the key the client sends the actual packets used to transfer the data that is needed. The server then takes the key and compares it a switch statement and if it matches (which it should) it will do something specified in that case with the other packet(s). Is this the way I should be doing this?
-
So currently the server, which uses java's standard networking library, automatically takes the port and IP of the client and uses that to send the information back. I guess thats the connection identifier. My main problem is that im sending the server a string that contains the x and y cords of the player (ex : 500,300). From there how would you take that information and define what it is used for?
-
Im creating a game using Godot as a client and Java as a server. My main question is how does the server and client differentiate between packets. Like how does the server know that the packet I just sent is the players coordinates. Any explanation will help and java code examples would be even better.
-
Story Today I did this on my project...
Jumbofile replied to SkywardRiver's topic in Design & Creativity
Lol im awful at spelling, I dont think im going to keep the name. -
Story Today I did this on my project...
Jumbofile replied to SkywardRiver's topic in Design & Creativity
Finished login and class select -
Literally just noticed, quick fix lol
-
Heres my try https://i.imgur.com/KIa1CuC.png
-
Mind posting some reference images and maybe edit it (in a basic way) so I an get and idea?
