0
\$\begingroup\$

I am looking for some advice on what would be a good way for users to play Asteroids over the network.

Its my first game and so far I have it working in 2D using polygons across a scrolling world in single player mode. Zoom in and out is also supported. Its not bad. I really want to develop it as a networked game as a learning vehicle. However, given all the work involved I want it to be a game people will enjoy playing.

My plan is that each player gets their own ship, exists in the same world and can shoot the same asteroids. The world can be big enough for ships to avoid each other. I want the players to also be able to attack other players ships.

Normally when playing in scrolling mode your ship stays in the middle of the viewport. This will limit the distance apart that ships can be if you are to see/shoot your opponent. Will this be a problem for the players or do these 2D multi player shooting games work well?

\$\endgroup\$
  • 1
    \$\begingroup\$ There's no right answer to this honestly. You'll have to find something similar and try it, or make it and play test it. \$\endgroup\$ – MichaelHouse Jan 4 '12 at 22:57
0
\$\begingroup\$

It will limit the distance - which is OK, when not in combat with other ships at which stage it can be frustrating.

Given that you already have the facility to zoom, what I would consider is the following:

  • Add a "targeting" button, that can target a ship in the viewport
  • When a ship is targeted, adjust the zoom to ensure (up unto a maximum range) that both the targeted and players ships remain in the viewport
  • Set a maximum and minimum zoom to ensure that gameplay stays fluidly.

But - as Byte56 said - there is no distinctly correct answer. The only asteroidy multiplayer 2d shooting game I can think of, if you want to see how another game approached it is the now free and open source "Allegiance".

\$\endgroup\$
0
\$\begingroup\$

I would go with a client/server model where the rendering is completely decoupled from the universe state. That is to say, the server maintains the definitive state of the entire game universe, and each client does its own rendering based on periodic (or aperiodic) updates from the server.

\$\endgroup\$
  • \$\begingroup\$ For fast-paced shooter games that is rarely the best approach. Peer-to-peer networking will result in a better user experience in most respects. It's also not harder overall; it requires more thought in the networking layer, but less engineering in the overall game architecture. I had to implement a peer-to-peer networking engine into an existing single-player spaceships game for a school project before and it only took a few hours. \$\endgroup\$ – Sean Middleditch Jan 5 '12 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.