I've gotten a mail response from Jorgen Lundman, the developer of the LiON library. He explains the lion_poll() function will call the user_data function when called.
The theory behind the collision detection and deflection is resolved. See collision_detection.jpg (TODO).
Furthermore, I've looked into dead reckoning princples again. Compared with the previous shipz, I want to make the following enhancements:
* The server is to keep track a latency for each player by sending out a tiny packet containing only the PING header and server time to each client who then have to return this package immediately, containing that same header, their measured time difference and absolute time.
* When a client sends a location update or bullet spawn, the server will use an average measured latency of the last few measurements to update the location before relaying it to other clients.
The amount of measurements used for the latency average is to be determined experimentally.
When the server sends updates to clients it will also include this latency average so that the client may perform the same extrapolation.
* I want to try to implement latency targeting : This means that for the example of bullets, the firing client sends out the original firing location, and this is send through by the server alongside the calculated location as discussed in the previous point. The recieving clients can then display the bullet being fired at the original location, but will speed up the bullet to make it converge to the actual location.
It's desirable to do the same for the location of players themselves, but my gut feeling says this will be very very difficult.
I'm still not decided on which audio library to use, and I will delay that decision for a while, as it is i in my opinion of the lowest priority.
I've drawn up some preliminary drawing layers:
Background group
layer 0: Background textures
layer 1: Background widget layer. These widgets translate, rotate animate according to their description in the level file.
Foreground group
Layer 2: 'Middle Ground' This will probably never be used, but it allows the level designer to draw things that move with the foreground and appear behind the following layers. Think shadows of huge rocks, static decorative fog, etc.
Layer 3: Effects, bullets & players. The exact drawing order of these are yet to be determined. Explosions should be covering players, exhaust gasses shouldn't. (or should they? hmm.)
Layer 4: Bases and other structures that are placed 'on' the foreground.
Layer 5: Foreground
Layer 6: Foreground Hallways. (Fly-through)
The idea is that everything in the foreground group scrolls at the same speed. That means that when the viewport is moved 10 px to the right, everything in the foreground moves 10 px left, ( added to the individual movement objects in the foreground might have in that instant, of course).
Everything in the background group scrolls slower to give the feeling of depth. Think of the Worms 2d engine.
I've decided to make up the entire levels of triangles, because I feel it will make coding alot easier, especially in the collision detection department.
Abonneren op:
Reacties posten (Atom)
Geen opmerkingen:
Een reactie posten