SpellShips - Multiplayer (TCP) MOBA

After pushing the merits of a TCP multiplayer game, it’s about time I uploaded one to show that it works. I was hoping to have a more complete game to upload, but it’s been 4 years now and I’m struggling to find the energy to take it further.

Introduction
SpellShips is a TCP multiplayer MOBA, designed for LAN play between friends. It’s a mix between World of Warships and the custom map “Battleships” from Warcraft III. It uses BGE 2.79.

The name is literal; it’s warships, but with MOBA “spells”. Currently there is one ship with a “spell”, but more will come.
Note that it was developed on PC. I didn’t put anything platform specific in there, but it probably needs more path expansion in the code to run it on OSX. Keen to hear anyone’s experiences trying to get that to work.

Features

  • Multiplayer (TCP)
  • Basic AI that paths and shoots
  • Working shop for changing ships and weapons
  • Two teams
  • Minimap
  • Pretty water (Thanks Martish!)

Current state
You can currently ‘play’ with multiple people. You can see them in game, shoot at them to cause damage, kill them (and they’ll respawn). Kills and deaths are tracked. The game ends when the enemy base has taken 10k damage. AI’s will spawn and meet each other in the middle of the lanes like standard MOBAs.

Download links
Windows Distributable (Ready to play with all libraries/binaries included - launch start.bat)
Just the blend and python libraries

Instructions for playing

  1. Extract the distributable ZIP
  2. Run “start.bat” ( you may need to unblock Blenderplayer)
  3. Enter a name
  4. Click “host” if you want to host a game, otherwise enter an IP address and click “join”

Permissions
With the exception of the water (Martish made it, ask him about his permissions), do whatever you want with the code and assets in the Blend (and python scripts), as long as you do not do anything to hinder my own development e.g. don’t try licensing any of this stuff so that I can no longer use/sell/distribute/etc. You can use it commercially without attribution, although attribution would be nice.

Notes
I mainly uploaded this as a way to demonstrate TCP that doesn’t make the main BGE thread lag. Currently I’m still using the sendAll command to send data from the client to the server. Under heavy load, this can still cause micro-pauses in the client if the buffer can’t fit all of the message. It’s not that difficult to fix (see how the server does sending, for example), I just haven’t got around to improving it yet because it hasn’t been causing me any grief during testing.

1 Like

(Reserved for later use)

Correct me if I am wrong, but I beleve the client and the server links are the same.

1 Like

True. They are in the same ZIP file tho :thinking:

My bad. The server link now points to the right file.

The .py file in the client zip is the libraries for the client.

1 Like

Could someone do an explanatory video tutorial?

Which bit would you like explained?

All because following the instructions above and did not work. I am apparently a noob :expressionless:

This weekend I’ll merge the server and client into one Blend and put up a Windows distributable download (blenderplayer + all libraries/dependences). I’ve moved to 2.79b as well.
That’ll make it so you can run Spellships by just opening one file :slight_smile:

I’ll reply to this thread again with the patch notes once it’s all uploaded.

PATCH NOTES - 0.3

  • Made the store functional. You can use it to buy weapons and ships
  • Added a new ship “Luminosity Cruiser”. Has a secondary beam weapon that can be activated with the “2” key.
  • Added destroyer, cruiser, and battleship guns for purchase.
  • Added minimap
  • Added bases for each team
  • Added win conditions. Kill other teams base to win
  • Improved camera distance. You can now change distance using scroll wheel, and it will no longer pass through the terrain.
  • Moved client to Blender 2.79b
  • Upgraded server code to Python 3 and integrated it with the client in the form of the “host” button