Space game X

A space dog-fighting and racing game for pc and console

This page is dedicated to Space game x (the name has yet to be determined). It will portrait the process of the design and development of the game.

The Design

(This game is currently in development, so everything is subject to change)

Space game x is an online multiplayer and local co-op space dog-fighting and racing game. I came up with the idea of this game during my time at the University of applied sciences. Since then I’ve been working on it with another programmer/ designer.

Since it’s a non commercial project, which the both of us work on in our spare time, it’s not a project that develops quickly.
But it’s our goal to have a good playable beta version within the next year.

The project started out as a VR game for the oculus rift and the HTC VIVE. But we soon found out that flying a space ship in third-person, in VR, was not the best idea because of motion sickness. Since then we made new plans to develop it for PC an console.

The main mechanics of the game are flying your space ship in third-person, engaging in space combat and customizing your ship’s load out.

Moodboard

The technical implementation

(This section will describe some technical challenges and decisions I made)

Getting the feeling of the ship right

The highest priority was getting the movement of the ship to feel just right.
In order to do this me and my fellow programmer first researched other space sim/ flying games and picked the ones where we thought the movement (Speed, Pitch, Yaw and Roll) felt the best. From there we were trying to replicate that specific behavior and adding our own touch.

In order to develop the ship movement mechanic one script has been created which gets added to the ship automatically once it is instantiated.

The UI contains a cross hair, in the FixedUpdate function, we check the position of the screen, view and world position of the cross hair. After that 2 functions are being called to rotate and roll the ship.
These functions calculate the Yaw and Pitch hardness and check if the player want’s to move the ship left, right, up or down via the position of the cross hair.

These floating point hardness values are later on used in the rotation and roll functions to rotate and roll the ship via it’s transform.

 

Ship creation system/ workflow

Since we want the players to be able to build their own ships from components, and later on, upgrade their ship by buying new and better components, we had to come up with a workflow which would make the creational process of a ship clean, fast and easy. I first came up with the system displayed below:

This UML diagram displays the builder pattern which is used to create the ship and it’s components. For now it only contains the movement and engine component because weapon systems are not yet developed.

The ship creator can be seen as a shop system, which calls the director to construct a new base ship when a button in the UI is clicked.

Via this builder pattern, it’s easy to update the ship, add new components and the code will be easy to maintain.

The UML diagram above portraits the rest of the ship creation/ spawning into the game world.
There will be Ship Spawner single instance object in the world which holds references to all ships which need to be spawned at a certain point in the game.

The Ship spawner class can then spawn a player controlled or an AI controlled ship.
Both the PlayerShip and AI ship inherit from BaseShip, which always has a MovementComponent, WeaponSystemComponent and an EngineComponent.