6. The network controller

Before we continue, let's create an object that makes sure, the engine is still running.

The engine will stop running on the client-side, when the connection between server and client is lost.

Create the object htme_obj_network_control. Into the Step-Event put the following code:

///Check if engine running
if (!htme_isStarted()) {
    show_message("Game Server or Client died! Restarting game...");

If htme_isStarted() returns false at any point after your client connected to the server, you can be very certain, that you lost conection to the server. Into the if Statement, simply put your own code to handle this scenario. htme_isStarted() should always return true for the server, unless the server dies due to an errror.

Oh, and don't forget to put the object into the htme_rom_demo.

» Next topic: Adding a player

« Previous topic: Setting up the basic platformer

Back to index.

Creative Commons License

All pages in this manual are licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Manuals / GMnet ENGINE Manual

GameMaker: Studio is owned by YoYoGames. GMnet is not affiliated with YoYoGames.
The GMnet logos use icons from Entypo ( and Open Iconic ( They are licensed under CC BY-SA 4.0.