Deathmatch Dungeon
- a multiplayer JavaScript game

Deathmatch Dungeon is a multiplayer game written in JavaScript as my entry into the js13kGames 2022 Competition.

The game

Conceived as a multiplayer experience where mages battle it out in the classic deathmatch tradition in a pixel art style, it pays a humble homage to the likes of Unreal Tournament with a taste of Enter the Gungeon, using a 2d top-down perspective.

The aim is to kill as many opponents as you can in a three minute timed round whilst dying as few times as possible.

A new round will start as soon as there are at least two players in the dungeon, though one player can explore solo. New players can join at any time. A winner will be declared after the three minutes is up.

Pick up scrolls to get a random, different magical ability. Collect potions to restore health.

Controls:
WASD or arrow keys to move, mouse to aim and click to shoot. Press the tab key for online chat.

Play it

I very specifically conceived it as a multiplayer game and I spent probably too much of the time I had available play testing and optimising that experience. As a result there isn't much to do if you are on your own but you can still try it out. It really shines with multiple people involved.

With that in mind you can play it here:
https://deathmatchdungeon.onrender.com/

It may take some time to load if it has to spin up an instance from cold, so be aware of that before thinking it isn't working.

The competition

The competition entry page for the game is here:
https://js13kgames.com/entries/deathmatch-dungeon

The link to the game from there no longer works as it isn't hosted on Heroku anymore.

It placed fourth in the server category and 47th overall. I think it would have done better but a lot of people only tried it alone so didn't really get much of an idea of it.

Someone even went so far as to say it shouldn't have been included in the desktop category, despite also being known as the overall category, because it didn't have any enemies in it. Oh dear.

For a first attempt at a competition like this I was satisfied with the result though, both what I achieved and the reception it got. I even had a comment from someone who enjoyed playing it with his wife and said it reminded him of Unreal Tournament, which really made my day.

Technical details

Source code

You can find the source code here:
https://github.com/olvr/deathmatch-dungeon

Artwork

I chose a pixel art style partly because I like the aesthetic of it but also to make it easier to meet the package size limitation for the competition.

The mage sprite is from MoDsama, the rest is my own work with heavy influences from Enter the Gungeon (the floor tiles) and Skyrim (the runic hex) as a couple of examples.

I used Photopea and Piskel to create the graphics.

Websockets

I hadn't done anything with websockets before and part of the appeal of doing this was to experiment.

The solution is therefore a somewhat naive approach of sharing responsibilities between the client and server. It works for something of this scope and ambition but to develop it further I would want to implement a more robust client-server architecture.

Compression

I was pretty confident that what I had got wasn't going to need too much effort to get in under the 13KB limit so I just used Terser, which is the compressor I am most familiar with, on the JavaScript client file.

The images are all in a single sprite sheet which is a PNG 8. The transparency is handled in code by removing a specific color value.

Conclusion

It was a good experience taking part and really motivated me to get a project to the point where I could call it complete. I achieved something I could be proud of but I also learned a lot that I can apply in the future. I highly recommend anyone thinking about it to give it a go.