SFML community forums
General => SFML projects => Topic started by: kralo9 on February 17, 2013, 12:25:04 pm
-
Here is my action-mutliplayer-awesome project "TankTank". Of course only in beginning phase. Would like to hear what you think about it. Maybe some ideas for new features :)
Using sfml and sfgui.
Already implemented:
-Shop (Ammo, Upgrades etc.)
-Bots (AI)
Here a link to Youtube video: http://www.youtube.com/watch?v=8qTOjnihqPU&list=UUBU2CUSksklBQj-zIOtQvHg&index=1
Looking forward
-
Looks really good!
Would be interesting to hear some more technical details.
Btw. your main menu most probably uses SFGUI wrong, that is you're not using layouters.
Keep it up!
-
Would be interesting to hear some more technical details.
Well, logic is performed serverside. Where the movement gets extrapolated to avoid unsmooth movements. Actions to server and player data to client is send by UDP socket where shop, chat and heartbeat are send by tcp socket.
Could tell more but that would be too much detail.
-
Do you do any client-side input prediction or lag compensation? If so, I would like to know more about how you accomplished it :)
-
No. There is no lag compensation right now. I have looked for some implementations but I did t find out how I can move the tank to its serverside position smoothly. I only predict further movement in case a packet gets lost or is corrupt etc. If you look closely in the video you see a green rect just behind the tank. That represents the serverside tank/hitbox.
If someone could help me with lag compensation I will be very happy.
-
Did you read source engine networking?
https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking
-
Ok I understood how the movement prediction should work. But how do I compare the predicted position with the serverside position. With lag they cant be equal...
-
I have read a couple of ways. One way I read was keeping a log of all turns and movements ect. with their time client side. Then run the commands stepping forward in time since the last state information was received from the server(accounting for lag). This way your character can not continue to get further and further out of sync.
I do not know how this will perform with different pings. Maybe you can have interp between the last estimation and new estimation to smooth it out a little bit. Though the way some games behave when I get some lag I do not think they use Interp.
Edit:
by turns and movements I mean the commands that cause them like "+foward" and "-foward" in quakeworld. This way it is relative to the latest updated position state, or whatever other states that are important.
-
With time you mean that tickcount? And what happens if the tickcount is larger than its limit. Like int has.
-
This game with a mode online should it be fun =D with fog for it doesnt see the enemy