Online Retro Zombie Shooter -

(Fred/K.S) #41

ey sounds like some heavy work to get this online thing going right :sweat_smile:
But nice update so far!


1 Like
( #42

Indeed :slight_smile:

Both on the client (Blender Game) and server (NodeJS on Heroku).

In the server case, it is mostly because I had to code almost all game logic and dispatch from scratch, as there is nothing like logic bricks or some default gameloop that you can use right away, you got to implement these concepts yourself.

For the client part, in my case I rely heavily on an event-loop for Python, so the trickiest part was to understand how the technology worked in order to have it run inside a Blender Game. At the end of the day, it is not really that hard, but it is not obvious to everybody either. But the advantage of having an event-loop is that it will manage most low level stuff and trigger events when required, which is a very useful behavior when working with I/O, such as network messages.

Once both client and server are set, then a protocol must be designed for both of them to synchronize states and transmit events, that’s another funny part. But the process is rather straight-forward: just try to think about whatever data is needed and send it away, fine tune as required. Oh, and identifiers everywhere.

So yes, since it is not something that is directly provided by the engine, a bit has to be setup on the side for it to work, but it is not that complicated after all.

Most of the technology required for it is already well known and standardized:

  • Blender Game Engine running Python scripts running asyncio (maybe the most edgy here)
  • NodeJS HTTP server hosted on some free platform
  • WebSockets for bidirectional communication
  • Very stupid protocol sending just a bunch of ids around

That’s it, that’s my stack.

So right now I work hard on the gameplay / technical side of it, and once everything is setup, I will be able to focus on making it look nice :smiley:

1 Like
( #43

Update time!

Finally refactored the server. It looks more and more like a micro game engine of its own, but without UI…

This also allowed me to fix the teamkill issue.

That’s it. Just that.

Refactorings are tiring lol

( #44

Update time!

I tweaked a bit how zombies are moving: They are faster, and they want brains!

They don’t yet attack, but they will move toward the closest player now, aggressively push you, lol

So, if you still have a release build for 0.2.4, please try the game with a friend of yours!

Latest Game Release

On the other hand, I spent most of my time trying to setup a build server for UPBGE, because when I say you can play using UPBGE v0.2.4, I mean the exact release from

Now the issue is that the website certificate expired, making it hard for some people to keep accessing it (on my end I just cannot at all…)

And as I am on Linux, I cannot build for Windows which seems to be used by most people here.

Solution then was to use a CI web service, so I have been doing that.

1 Like
( #45

Update time!

Went a bit under the radar lately, but it was to take a break after some work I had done over my week-end to build UPBGE. I will have to pick up where I left it at some point too, but in order to breathe a bit I worked on some side features :slight_smile:

The website got improved!

So far I used the web server solely to host the game logic, and it would only dispatch a very simple text, and you had to manually refresh the page to see it updated.

So over the last few days, I worked hard at writing the foundation for a proper small web app that will communicate with the server and update in realtime!

Disclaimer: Heroku shuts down the website after some inactivity, so do not worry if it takes long to load the first time, it might be restarting!

It will now show each connected player (if any…) and their current health.
(although no player is actually taking damage for now…)

For this I had to setup my server to actually serve files to your browser, used React for the frontend code, and webpack in order to serve a very compact javascript bundle file (instead of a lot of little scripts).

It wasn’t really easy to do from scratch, but nothing is when you do it for the first time.

But now it works!

Next, to keep on the web stuff:

  • Add a small PostgreSQL database to track some player stats
  • Display a scoreboard on the website

If I were working in a team I guess the work on the actual game and this side web stuff could be parallelized, but oh well. For now it’s web time I guess :slight_smile:

1 Like
( #46

Update time!

Again, lost myself in a never ending refactoring, but it was really needed!

This work will allow me to later-on host multiple “matches”, authenticate users, and is simpler for me.
Merge request:

This will also allow me to identify-ish players and store high-scores for you.

So the plan is to continue working on the code refactoring, and maybe next work on server physics :slight_smile:

Ah! Maybe an example of why a refactoring was needed:


1 Like
(blenderaptor) #47

can you make a video of your project ?

use … just upload , easy

( #48

The projects graphics are bad, you just see cubes moving, but I’ll give it a shot sometime.

The most interesting part is to either the technical part and/or to play the game with one of your friends.

The game requires UPBGE v0.2.4 exactly as per the release.

(blenderaptor) #49

ahhh that’s true … making assets is not fun

( #50

It is fun, but I don’t care about a pretty game until it is a fun game, right now my head was rather at making the whole shebang work correctly :slight_smile:

The “zombies” (more like red cubes) are currently floating as I didn’t add physics to the server yet, so detailed flying zombies would be weird to see. I had the idea of making them ghosts instead, to better match the fact that they go through walls and ceilings, but I would rather just do things right with my zombies :stuck_out_tongue:

The server is also kinda a lot of work if you want it to function correctly (and also not just be a plate of spaghetti code, miam)

1 Like