WebLiero - A game made with Haxe

Hi everyone,

I’ve released WebLiero, a clone of the classic DOS game Liero, but with online multiplayer and works in the browser. [Gameplay video]

WebLiero might be too niche to ever get any serious player base going, but Liero has always had an important place in my heart and I’ve always wanted to make a proper multiplayer clone of it. So here it is.

It’s using the same engine I made for my previous game HaxBall. It makes heavy use of a lot of Haxe’s unique features like macros, abstracts and inline constructors. It truly would have been a lot harder to implement without them.

Just wanted to share and give my thanks to the Haxe development team for this great language that has helped me make things for about 10 years.


Nice, congratulations on the release!

Would you be interested in writing a blog post for It would be neat to highlight some of Haxe’s features and how they helped you in practice.

1 Like

It looks cool, but why such a strange controls? WASD + mouse would be much more convenient and dynamic.

@Simn: I’d love to do it, but I’m so slow at writing those kind of things… I couldn’t spend that time at the moment. If it’s fine with you I’ll keep it in mind and contact you if I get the time + I am in the right mood.

@RedHeadEatBread: It’s the same controls as the original DOS game, I tried to be as faithful to it as possible.

Yeah sure, no problem!

Very nice games, simple but very fun! Thanks for sharing. Regarding the business aspect of it, do you make a living off those (I saw that HaxBall seems to have a somewhat big community/high traffic) or are those just a hobby of yours?

@fullofcaffeine: I do not make a living out of it, not any more at least. Many years ago the ads were profitable enough but now they just barely pay for the servers and a coffee :stuck_out_tongue:

1 Like

A little gory but it looks super fun! I had a network error so I couldn’t play unfortunately.

@basro This is really impressive!! Liero was and still is a massive inspiration for me.

Could you please elaborate on how you made this. I would like to know which rendering libraries you used, and more specifics about how you built the multiplayer and networking aspects.

Nice one!!

@joeyjojo, For rendering I just use WebGL with no libraries. I made a simple atlas texture with all the Liero sprites and I batch them when rendering to reduce drawcalls.

The Netcode is fairly complex and is the thing I’m most proud of, it makes use of the simulation determinism so the only thing that is ever sent over the net are the player inputs. Making sure that everything is deterministic adds quite a bit of difficulty to the development of the game, debugging a desynchronization bug can be quite painful.

I’m using WebRTC to make p2p connections between the players and the room host, this means that when you make a room you effectively become the server for that room.
This has the upside of being really scalable for me, since I don’t have to pay for the bandwidth of the room’s data. It also allows people in remote locations to play with each other with very low latency, since I live in a remote location that latter point is very important to me.

It has it’s downsides too, WebRTC p2p connections often fail if the routers between peers don’t cooperate, just like it happened to Confidant. It also means that when a player leaves the room he created himself everyone in the room will disconnect.

Hi Basro! I made an account just to thank you for doing this, its perfect. It makes it so much easier to just have a quick game anywhere on any machine (lan party at work!)

I am curious, is it possible to make and share levels for this version of the game? what would it entail?

Thanks again!!! amazing job!

@NNenov, You are welcome!

WebLiero currently supports the same level format Liero did (.LEV files), you can load them from your hard drive with the admin menu (Admin -> Change Map). It is possible to make new levels but all the level editors are really old software that has suffered from bit rot so it’s not exactly easy at the moment. this site has the old level editors and a huge number of levels.

1 Like

Maybe too much to ask, but if you ever consider open-sourcing it, I’d definitely donate/signup for a patreon to support you! Seems there’s a lot of gems to learn from this code, specially considering it’s a port of an old game but with modern aspects (like p2p multiplayer).

thank you!

@fullofcaffeine, no plans for open source at the moment, sorry.

Hi Basro, I just tried connecting from my laptop to a server I created on my computer, they are both using the same router, I get a connection error, is this because of the way the hosting works or is it a bug? would this happen with most network situations?

@NNenov: That setup normally works but with WebRTC there’s always a way for the connection to fail :stuck_out_tongue:

If you are in the same local area network the connection could fail if your local address ICE candidates are being blocked (some adblockers and privacy extensions will do it)
You can run this tool on both computers:
Then check if they both have Host ice candidates and if the local ip address is listed.