Introduction

This series of articles will describe how to create your own 3D multiplayer FPS tower defence game using SteveTech1

Why a Multiplayer Tower Defence game?

You may be asking "why tower defence game?" The beauty of this choice is that it combines the gameplay of a "simple" FPS, and adds extra features such as "construction" and AI. So if you want to simply write your own FPS, just follow the tutorial up to that point. If you want to add extra features (e.g. like the construction feature in Fortnite) follow the tutorial up to that point.  And if you want to add your own AI, there's a section for that.

What is the Spec of our Game?

As any decent programmer will tell you, you need a spec before you start.  It can be vague (as the one for this game will be), but you need something to start with; something to aim for.

Since this game will be a "multiplayer FPS tower defence" game, player will walk around like a typical FPS.  Players will initially co-operate, but I'm going to add to my "todo later list" the option of working against each other.  See the future for further details.

In addition to walking around and shooting, players will also be able to build installations which will automatically also attack the "mobs" (as we'll call the enemies) who will spawn and try and destroy some kind of, er, "thing" that I haven't decided yet.  However, if you've played a Tower Defence game before, you'll know what to expect.

But isn't writing a 3D Multiplayer FPS hard?

Yes, very.  However, we'll be using the SteveTech1 Multiplayer FPS Engine to do all the hard work for us (like networking, collision detection, client-lag, prediction, 3D etc...) so it won't be that hard.  (FYI, I am also the author of SteveTech1).  Although, this tutorial assumes you are an experienced Java programmer.

Ingredients

To make this game, you will need the following:-

Setting Up the Project

I'd recommend downloading the repository associated with this tutorial.  Even if you want to write all the code by hand, it will save you a bit of time when you can copy-and-paste some boilerplate code.

Once you have your favourite IDE open, create a new project and link it to the SteveTech1 code.  You will also need to link it to all the jars in the libs folder, since these are required for SteveTech1 to work.  These jars include libraries like jMonkeyEngine, which we use for the 3D, and Kryonet for the networking, as well as some more which will prove useful.

Once you've done that, you should have a clean project with no errors.  SteveTech1 should "just work", so please leave a comment if you have any problems.

In the next section, we'll be writing some actual code! 

Find Any Problems with this Tutorial?

The code, as with most well-maintained and non-abandoned open-source software, does change slowly over time as features are added and improved.  If SteveTech1 has changed which breaks any part of this tutorial, please let me know by leaving a comment below!


Comments