LightMagique

LightMagique is a 3D real-time multiplayer videogame in Java that uses OpenGL bindings and UDP for networking. I have originally developed this game back in 2015, as I had given myself the challenge to create a minimum viable game in an afternoon. I finished coding the MVP before going to sleep on the same day, which may count as a success depending on your meaning of afternoon. Over the next year, some friends and I have played/playtested this game often during LAN parties, and I have added several features (and several more bugfixes) in order to make it better.

The gameplay is quite simple: you play an undefined thing who can fire bullets at nasty alien-ish crows, which can fire bullets back at you. You can also dash (move faster for a small amount of time) and charge larger and more powerful bullets which may kill multiple enemies. The crows may also dash and fire charged bullets which are particularly deadly for the player. There are two types of walls: red ones, which you can’t pass through but bullets can, and black walls, which block both. The basic strategy is to use the several walls to your advantage and understand the crows’ IA to survive.

Pew! Pew! Pew! Surviving a few crows in early-game.

The game is wave-based: every wave, some crows spawn and you have to kill them; when all of them are dead, a new wave starts.

At this point the game was okay but it needed some in-game evolution to make it more interesting. So I added an advancement system: each crow kill rewards you with some experience (and health), depending on the current wave, which you may spend by increasing the level of several abilities of your pretty undefined thing, such as bullet speed, bullet damage, dash speed, maximum health, freeze cooldoown, and so on. Obviously, the crows now started to scale too as the waves went on. It took quite a lot of time to get the balance right, what was the hardest was to avoid a team outscaling the other one in the long term. But after a few playtests it got quite better.

Also, there was a bug with the charged bullets pathfinding, and they would get stuck on black walls and not be destroyed when touching them, unlike regular bullets. A friend of mine had the idea to turn this into a feature: let’s make them stick to the walls and call them “mines” instead! You could then charge your mines between waves and stick a few on them on the terrain to help kill crows on the next wave. It was really fun to play, and showed me once more that great gameplay ideas can be found by just playing, experimenting, and even finding bugs and turning them into full gameplay features!

Firing a charged bullet, near a huge mine! (ft. pretty_wave_clear.png)

What about multiplayer? In this game, when you have no health left, you do not die, but you get freezed for a small amount of time, during which you may not move or fire any bullet. Crows nearby will keep shooting at you when you are freezed, thus resetting the freeze cooldown, so that you may not escape alone. However, a teammate may come near you and fire at the crows surrounding you in order to save you, to give you time to unfreeze. When all teammates are freezed, the game is most probably over. Interestingly enough, the freeze mechanic opened the way for a whole new lot of strategies: a player could go ahead and try baiting the crows, with the risk of getting freezed, but it let the nearby players shoot more easily at the crows and huge waves of crows could be taken down this way.

Combined with the preexistent strategy of hiding behind black walls, and shooting through red walls, this made for an interesting game with various strategies regarding how to handle huge swarms of crows. I intentionally made the player health quite low so that you could sometimes get completely burst by a nearby swarm of crow and had to be saved by nearby players, to encourage teamwork. And since the main way to regain health was to kill crows, you still had to take some risks. It worked quite well.

Over time I have added a lot of enhancements for the crows IA. At the beginning the crows had no collision hitbox, so they would all “merge” into the same crow when following you, and sending bullets from the same place and with the same direction, which made the game too easy. So I added basic collision hitboxes and I made crows flee when one of them died, which both spread them around the map, to make bullets come from everywhere, and to avoid a player killing them all at once when they are in a good spot. Adding crows hitboxes had the very nice and unexpected effect of pushing the player around, perhaps cornering them into mines, which really added to the perceived strength of the crows.

Cornered into a mine by a swarm of crows! Help me!!

The final touch, which seemed rather obvious after I added it, was to add custom maps support: since the map was just a rectangular image with black and red walls, anyone could create new maps and wall patterns to create new strategies! Some of my friends came up with new maps which we had a lot of fun playing, because they were often very difficult (for example, crows behind a circle red wall surrounding you: you have nowhere to hide!), and we had to think of new strategies to survive a couple more waves. A few black walls could totally change the way we played the map, since we could use it to hide from the crows and defend ourselves.

Furthermore, I added support for background images for maps: the image is displayed on the screen normally, except the (255,0,0) and (0,0,0) pixels have special meaning (red and black wall respectively). So you could import whatever image you liked (we often used anime pictures), draw a few walls on it and that was it, you had a new map! You could additionally restrict the crows spawn rate (density) with the image alpha channel.

Charging a much-larger powered bullet in mid-end-game.

What I also liked, and did not expect, in this game, is that the early-, mid-, and end-game parts (as I like to call them) turned out to be very different in their gameplay feel. The early-game feels like surviving even against weak enemies and feels very deadly (very much like old AD&D level 0/1 gameplay), mid-game feels more normal and stable as you gain better abilities and health, before entering the end-game with swarms and swarms of powerful crows which charge deadly powerful mines all over the map, which can kill you an instant, even though you fire powerful bullets at a rapid rate (it actually looks more like a flame-thrower at this point). As the bullets speeds increase over the game, the game shifts from dodging the few slow but deadly bullets, to managing how many dozens of bullets you can take versus how much health you get back by killing crows. A truly challenging teamwork experience.

Creating this game from start to finish and improving it over time taught me a whole much more than my regular training projects, and it showed me what the actual process of creating a video game is like. I also had the chance to work with a friend who is into 3D modeling, and kindly created and textured these models for the game. I have a passion for art in general and I hope I will have the chance to work with other talented artists on my other games in the future.

You may find the source code of the game (client and server) on its Github repository.

Updated: