Skip to content

SpaceWar2

Screenshot

The SpaceWar2 example is a tribute to the homonymous game developed in the 60s, one of the earliest computer games in history! The purpose of this example is to showcase the capabilities of SmartFoxServer's MMORooms in a realtime game featuring flying starships, weapon shots, collisions... with the possibility of having thousands of them in the same Room.

In this example the game flow very similar to the one discussed in previous tutorials. After the connection and login steps are executed in the Login scene, a Lobby scene allows interacting with buddies or launch a new game by selecting one of the available levels. After joining the Game Room and switching to the Game scene, the user waits for more players to join and selects a starship among three types with different characteristics (maximum speed, maneuverability, etc). Here the user can also invite buddies to join. When the minimum number of players is reached, a countdown is launched and the actual game starts. All starships are spawned in a region of space and can be controlled using the keyboard: left and right arrow keys to rotate the starship, up arrow key to activate the thruster, space key and "c" key to fire the weapons.

Source code


The writing of this tutorial is still in progress. We apologize for the inconvenience.