Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - stdgregwar

Your scripts / [Big Layer] Solarus-online
January 20, 2018, 04:50:20 PM
Hello everyone!

As I promised to Christopho and others during his live on Monday. I'm unveiling my work of the few past months: Solarus-online.  8)

Demo footage :

This is basically a set of lua scripts that uses luasocket and a small server to synchronise clients across the network.


  • server
  • fully working 'async' networking
  • asymetric mob simulation
  • symetric map,object simulation
  • movement replication primitives
  • api adaptation for multiplayer aware ennemies
  • network synchronised states and actions

In practice the following engine entities are synchronisable :

  • hero
  • ennemies
  • npcs
  • destructibles
  • maps

But this require light to heavy modifications in the enemy,map,object code!

Code is not bigger, thank to a reconstruction of an api similar to solarus one. But it's different.


A small demo serve as template on my github:

You can launch it as any solarus quest, provided that you have 'luasocket' and 'luajson' in your lua5.1 path. and Solarus 1.6 (dev version)

The save selection screen serve as a server selection screen. You can edit data/scripts/serverlist.lua to replace the three default servers.

There is more details in the readme.

Demo server opened h24 for a while

A demo server is open from know on at, the server is already in the provided serverlist.

I strongly encourage you to test this on this server. As it is not very demonstrative if there is no other one on screen.

It is also more fun if you use a proper pseudo (not like on the screen  ::) ).

Be aware the server might crash, after all this is an alpha and I never tested all of this with more than two clients, so it's probable that everything breaks. If
this is the case, put a message here or ping me on github.

I might post some video footage in a week or so


If enough people are interested in this I could make a tutorial on how to use it. Or at least develop a nice wiki to explain what it implies in terms of code.


There is still plenty to do to really make this usable. The movement replication part is still in a very early stage and suffer when ping is too high.

Please contact me if you want to contribute.


You can ask me anything about the way this works and what are the limitations. As well as proposing any improvement, ideas.


I don't know if this is really the multiplayer mode that everyone was waiting for. But it's a light solution in terms of engine modification (2 pull-request) and
can be extended to make anything.
Development / Custom movement. Way to go?
January 29, 2017, 09:27:17 PM

I was experimenting with the engine and tried to make NPC "crowds". i.e. Many entities that moves together.

My question here is:

How do I take advantage of the existing collisions detections features while implementing a new kind of movement? Is there a way to do this cleanly?

I didn't see anything about this in the lua API.

What I tried:

  • Setting the positions of the entities manually. But without suprise the NPCs move in walls.
  • Using a path movement where I redefine the path every 200 frames. This works but is not very smoothly.

Here is code from the 'path' movement solution:

for i,ent in ipairs(ents) do
    --deduce entity direction from boids force
    local dir = utils.dir_from_xy(ent.f:unpack())
    --check deduced direction
    --update movement path{dir}