lazy game developer

Showing: 1 - 3 of 3 RESULTS
Way of Tanks

Way of Tanks

Way of Tanks is a tank runner game with endless gameplay and diverse tracks. Players control a tank using swipes, keyboard buttons, or Apple TV gestures, aiming to cover as much distance as possible without hitting obstacles or dying in boss battles.

The tank can switch lanes, shoot, and even jump over trenches – yes, it’s that kind of modern tank! The game features various power-ups that temporarily enhance the tank’s abilities: agility, super shots, doubling collected coins, or the ability to break through obstacles.

Players can also use coins collected during runs to purchase new tanks or upgrade existing ones. There are four tanks in total, each with unique stats and capabilities.

With the permission of Ogurec Apps, I took on porting Way of Tanks from Java to iOS, tvOS, macOS, Linux, and Web, using my old but familiar and convenient game engine. The game is now ready to be handed over to its owner, though I retain the source code of both the game and the engine.

The game is already available in the browser – Way of Tanks. Hopefully, it will soon appear on the Apple AppStore for iOS, tvOS, and macOS. As for Linux, the decision rests with Ogurec Apps, but I really hope they won’t mind.

Road Fighter

Road Fighter

Road Fighter is an arcade racing video game developed by Konami and released as an arcade machine on December 7, 1984. Later, versions were released for MSX1 computers (1985) and the Nintendo Entertainment System (1985 in Japan, 1991 in Europe).

In 2003, Retro Remakes organized a “remake competition,” where participants were challenged to recreate a game from scratch in a short time. The team Brain Games decided to participate with a remake of Road Fighter for MSX.

What I did

The source code of the game was available on the Brain Games website, which I used. I informed the original clone author about my work – amusingly, he was happy and said he was looking forward to the web version.

First, I did a small code refactoring to make the game compile with a modern compiler using the “modern” version of SDL 1.2. Then I performed a larger code refactoring – dividing the code into logical parts and making it readable (here, my favorite VIM and clang-format were very helpful). Next, I had to make fixes to the sge library code required by the game.

After that, I ported the game to Linux and macOS, and six months later, I finally completed the port to Web.

Main challenges

The Web version was the most troublesome. At first, the game wouldn’t run at all – this was because the main loop needs to be slightly different for Emscripten (and generally for any properly designed architecture).

The next issue was clearing the screen (or filling it with black). You can’t just use zero; the zero must have an alpha of 0xff.

Later, the game seemed to freeze when loading a level – it turned out it wasn’t frozen, just very slow to load. I had to make many optimizations, mainly related to direct access to SDL surfaces. I solved this by removing Lock/Unlock calls from the main loops.

Another problem appeared when the car spins after a collision and skid marks must be drawn. Drawing lines was extremely slow, and they were never cleared even when off-screen. Moving the lock outside the loop and clearing the line list solved the issue.

I also improved file system handling, video and audio initialization, and music and sound loading. There were many changes – too many to remember. Anyone interested can compare the original game (the first commit) with the current master branch.

I might eventually add save-state support for the Web version. It’s not hard – synchronizing the “local” file system before reading is sufficient. IDBFS is perfect for this, but I haven’t gotten around to it yet.

Links

Cosmos Wars - hyper-casual endless runner

Cosmos Wars

This is a space-themed endless runner. Unlike other runners, it stands out with its setting. The game features a variety of ships, each with unique characteristics.

The game was also developed at Synesis. I worked on the engine and the game code itself, while other specialists at the company handled the rest.