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. The client uses BGE 2.69. The server uses Python 2.7.
The name is literal; it’s warships, but with MOBA “spells”, except I haven’t added the spells bit yet…
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
  • Two teams
  • 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. There is no finish objective yet - the game will continue until you get bored. AI’s will spawn on a timer and attempt to make it to the enemy ‘base’ (the starting position for the enemy team).

Download links
Client
Server

Instructions for playing
Setting up the server:

  1. Install Python 2.7
  2. Extract the “server” download into the Python 2.7 install.
  3. Open Python terminal
  4. Type “import spellServer” and push Enter.
    Tada… it’s now listening for connections. Allow it through firewall if you want other computers to be able to connect.

Setting up the client:

  1. Have Blender 2.69
  2. Extract the SpellShips client download somewhere.
  3. Open the blend with Blender 2.69 by either double clicking on the blend, or by dragging the blend onto the Blender2.69 executable.
    Do NOT open Blender 2.69 and open from there, otherwise the CWD (current working directory) will be set to Blender’s install, and it won’t find the python library.
  4. Push “P”
  5. Type in a name, then click “Start”. If you’ve got the server running then it should immediately swap to a lobby.
  6. Repeat step 3 as often as you want; this is TCP so it’s easy to have multiple clients running on the same machine connected to the same server. You can also get others to join the server at this point.

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: