worldlobi.blogg.se

Crab game console
Crab game console












crab game console
  1. Crab game console how to#
  2. Crab game console code#

I've more or less taught myself this stuff so I imagine my attrocious coding practices could be improved upon. More to the point, I'm kind of interested in feedback on the code, if anyone does happen to go through it. The server itself could probably be built into the client easily enough, but I wanted to go for a standalone server because of how I planned on structuring my next game. The server is impressively unaware of the actual game. The server itself is a standalone c# project, and does little more than relay messages between players and tell each of the clients what the enemy is currently doing and what point it's aiming at. If I had sync'd camera positions though I probably could have gotten even more accurate though. Additionally, by nature of the game, because you aren't shooting each other and you don't necessarily have much opportunity to watch exactly what your teammates are doing, the simulation is more than accurate enough. Unless you're dealing with pings > 200ms, bullets that look like they hit players on your client generally do hit them on theirs. Since the camera itself is based on your own local position and the position of your networked partners though, that means the bullets are appearing in slightly different positions on each machine. Bullets are placed on a 2d plane in line with the player (so that it can collide with them), interpolated based on the position of the emitter and the position of the camera, to give the illusion that the bullet is coming from a specific emitter when in fact it only appears to be doing so from the camera angle. There's some issues in the game design that limited a perfect network implementation though. I figure if it should be useful for *someone*, then it's worth it right? It has a game lobby, it syncs and interpolates player positions and actions with each of the clients, and I think does a reasonably well job of making a bullet hell type shooter syncronized across each of the clients without the need to send individual bullet data between clients by using seed values and ensuring enemy actions occur at the same on each PC.

Crab game console code#

The code is a bit messy, but it has some features that might be interesting to look at. The game type wasn't particularly conducive to being made multiplayer, but I think it ended up pretty good! I posted in the showcase section, and while I got some good feedback, the real point I wanted to make was to release code for a multiplayer unity game, and no one touched the multiplayer at all! (horray for scoreboard tracking)Īnyways, I was thinking maybe it would be better to post here for that.

crab game console

Crab game console how to#

A while ago I finished this game while attempting to teach myself how to program a client/server multiplayer game using Lidgren.














Crab game console