Tank wars 2 - multiplayer

Show us your works in progress and request feedback

Post » Sun Feb 15, 2015 7:45 pm

gamecorpstudio wrote:this is 1 awesome game, dident laughed so much for long time,really enjoyd it:D need more optimization for sure:D



hehe, yes, same here !!!!

was awesome :lol:


I'll look into performance for the next updates too :D
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Sun Feb 15, 2015 7:58 pm

@lennaert
lennaert wrote:The floors just required a smart approach to them, lots of knowing when 'not' to invoke something combined with a couple else's in the right order. (image below of floor leveling collisions core)
Thanks for the screenshot.

lennaert wrote:As to the multiplayer, I spent weeks on end working out the mechanics and best approaches ... and in the end I managed quite well.

-Knowing what to execute by who (host/peer/both) really makes a difference.
-As few datasynchs as possible with a smart approach to movement.
Do you still keep the host authoritative of all connected peers?

lennaert wrote:I named my layers to: level0, level1, level2
Referencing them like move to layer: "level"&playertanks.activelevel
That's what I have so far, except "floor0, floor1, etc." :D
ImageImageImageImage
B
62
S
19
G
51
Posts: 633
Reputation: 30,826

Post » Sun Feb 15, 2015 8:12 pm

DatapawWolf wrote:lennaert
lennaert wrote:The floors just required a smart approach to them, lots of knowing when 'not' to invoke something combined with a couple else's in the right order. (image below of floor leveling collisions core)
Thanks for the screenshot.

lennaert wrote:As to the multiplayer, I spent weeks on end working out the mechanics and best approaches ... and in the end I managed quite well.

-Knowing what to execute by who (host/peer/both) really makes a difference.
-As few datasynchs as possible with a smart approach to movement.
Do you still keep the host authoritative of all connected peers?


The host does the handling of the common rocket tank rockets and the tank shells impacts.
The host and peer both have restrictive properties and functionality in the common events.
Such as the level collisions core, it runs in a big for each playertanks loop.

Part of the smooth movements ... if you steer ... your need to steer everywhere host, yourself, other peers :)
When you tell the host to move, make sure to move yourself too on the peer, so the updates from the host back to you do not have that high of an impact as you were already in the right direction yourself ;)


The peers and the host each have the same map, and both can make use of its properties to run things smoother.
Most of the level problems arise when you are determining restrictions for others.



DatapawWolf wrote:
lennaert wrote:I named my layers to: level0, level1, level2
Referencing them like move to layer: "level"&playertanks.activelevel
That's what I have so far, except "floor0, floor1, etc." :D


You have to start somewhere :P

One of the more daring issues with "being on a floor" .. is having everyone determine where you and they are on when they begin/die/restart etc
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Sun Feb 15, 2015 9:40 pm

lennaert wrote:Part of the smooth movements ... if you steer ... your need to steer everywhere host, yourself, other peers :)
When you tell the host to move, make sure to move yourself too on the peer, so the updates from the host back to you do not have that high of an impact as you were already in the right direction yourself ;)
I do that, but it still seems like the player moves too much and jitters back a few pixels. I think in my case the peer is actually moving too much. :/
ImageImageImageImage
B
62
S
19
G
51
Posts: 633
Reputation: 30,826

Previous

Return to Works in Progress/Feedback Requests

Who is online

Users browsing this forum: No registered users and 3 guests