Hi everyone!
I'm happy to announce the creation of a new exciting project! Wheelbase is a multiplayer game where players build wheeled, weaponised towers and take on other players in a fast paced frantic deathmatch.
Although the concept is simple, this is more complicated than games i've made before by virtue of it being multiplayer. The architecture of the game is as follows:
Each player runs a client written in C++/blueprints with Unreal Engine 4. These clients connect to an Unreal Engine dedicated server hosted at OVH, which hosts the multiplayer map. Alongside this is a registration and authentication service, written in PHP which accepts simple JSON/REST requests from the UE4 client to allow saving and loading of customised towers, and associating the access with a username and password combination.
Each player's vehicle is made up of a “TowerBottom” actor, which manages movement of the actor as a whole, and simulates four wheel drive vehicle movement, steering and suspension:
The movement of this actor is deterministic, avoiding using the UE4 “vehicle movment” component, which appears to be incredibly network-unfriendly. As an example of what happens when you try to use UE4's vehicle movement component in a networked multiplayer game, you may be interested in this video below:
Needless to say while hilarious, this is not playable so the entire vehicle movement had to be re-developed. On top of the TowerBottom sit up to nine “Stack” components, each Stack component has a set of zero or more “Part” components each of which is essentially a simple static mesh. The Stack components replicate across the network, ensuring that any Part components attached to them move also. For each new Part type created, an object is also instantiated to manage the behaviour of this part type. This is a one to many relationship, so creating 50 parts of the same time will only instantiate one of these management classes, and these management classes are not replicated, to save on bandwidth.
Each part type can have any of three flags set which indicate if the part is a weapon, armoured, or provides energy. If you have placed any weapons on your vehicle, you may use the gamepad face buttons, or the cursor keys, to fire any weapons facing in that direction. This allows you to for example place cannons on the side of your tower and launch a naval style broadside at the opposing players as you pass them.
Collisions with the environment, fired projectiles, or other players causes some hilarious bouncing and physics effects, which I have kept in the game due to their funny feel.
Rapid acceleration or deceleration, turning too sharp or spending too long at an extreme angle will cause your vehicle to shed parts, from the top first:
Once all parts are lost, you are out of the match. You can of course then return to the lobby and re-engineer your tower again or pick an existing load-out that you've previously designed and saved.
Last night was finally the point where the game was ready for a multi-player deathmatch across the internet, so along with @rutin we both ventured into the game and opened several extra large cans of whoop-ass on the default towers. Two games were played and before I knew it, it was 3AM. There's lots to do in this game, but it's off to a promising start! You can see the result of me getting my ass handed to me in one of the multiplayer sessions in the video below:
Feedback and offers of help are as always welcome! Comment below or message me if you have any feedback ?
? I cannot wait to see this develop further! Was a lot of fun! ?