Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: TankTank Mutliplayer Project  (Read 5356 times)

0 Members and 1 Guest are viewing this topic.

kralo9

  • Newbie
  • *
  • Posts: 44
    • View Profile
    • Email
TankTank Mutliplayer Project
« 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:


Looking forward
« Last Edit: February 17, 2013, 12:50:51 pm by kralo9 »
I'm totally exhausted. I've got 3 children and no money! Why can't I have no children and 3 money? - Homer S.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: TankTank Mutliplayer Project
« Reply #1 on: February 17, 2013, 03:43:02 pm »
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!
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

kralo9

  • Newbie
  • *
  • Posts: 44
    • View Profile
    • Email
Re: TankTank Mutliplayer Project
« Reply #2 on: February 17, 2013, 08:44:24 pm »
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.
I'm totally exhausted. I've got 3 children and no money! Why can't I have no children and 3 money? - Homer S.

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Re: TankTank Mutliplayer Project
« Reply #3 on: February 17, 2013, 10:36:57 pm »
Do you do any client-side input prediction or lag compensation? If so, I would like to know more about how you accomplished it  :)
Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.

kralo9

  • Newbie
  • *
  • Posts: 44
    • View Profile
    • Email
Re: TankTank Mutliplayer Project
« Reply #4 on: February 17, 2013, 11:07:16 pm »
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.

I'm totally exhausted. I've got 3 children and no money! Why can't I have no children and 3 money? - Homer S.

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: TankTank Mutliplayer Project
« Reply #5 on: February 18, 2013, 01:13:27 am »
Back to C++ gamedev with SFML in May 2023

kralo9

  • Newbie
  • *
  • Posts: 44
    • View Profile
    • Email
Re: TankTank Mutliplayer Project
« Reply #6 on: February 18, 2013, 08:47:06 pm »
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'm totally exhausted. I've got 3 children and no money! Why can't I have no children and 3 money? - Homer S.

greeniekin

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: TankTank Mutliplayer Project
« Reply #7 on: February 21, 2013, 08:47:06 am »
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.
« Last Edit: February 21, 2013, 08:49:55 am by greeniekin »

kralo9

  • Newbie
  • *
  • Posts: 44
    • View Profile
    • Email
Re: TankTank Mutliplayer Project
« Reply #8 on: February 23, 2013, 09:05:12 pm »
With time you mean that tickcount? And what happens if the tickcount is larger than its limit. Like int has.
I'm totally exhausted. I've got 3 children and no money! Why can't I have no children and 3 money? - Homer S.

exafi

  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: TankTank Mutliplayer Project
« Reply #9 on: March 24, 2013, 02:49:45 pm »
This game with a mode online should it be fun =D with fog for it doesnt see the enemy

 

anything