Experimenting with C++ live coding to finally make an actual game
Hello, this is my first time participating in Ludum Dare. Since I saw some of the videos of Notch coding Prelude of the Chambered some years ago that I wanted to try some of his techniques in this competition. Specially the live coding part. However, as a C++ and Pharo Smalltalk developer I really hate Java. As a Pharo developer, I am working on making the language usable for game developer, but unfortunately Pharo is lacking on several small details that make it cumbersome for deploying an actual videogame.
As for C++, recently I learned a technique for doing a limited form of live coding from the Handmade Hero series of videos. Linux with SDL2, and inotity_wait this technique works like a charm. In Linux and Unixes in general, an open file can be deleted without a problem, so by using this bash script for calling make:
```bash
command()
{
make -C build-native -j8
}
while CHANGES=$(inotifywait -e close_write src); do
command
done
```
And by reloading the shared object whenever its last modification changes, I am able to use any text editor, such as Atom (with clang-autocomplete and linter-clang) for
reloading the game code whenever I save one of its sources. This setup works very similar to the Smalltalk Object Browser, but with limitations on changing the layout of objects and the global state.
It took me some hours making the base framework to be able to display the first tiles. As a base template I used my sdl-template which only provides the CMake scripts.
Building The Game
As for the idea of the game, I quickly sketched some ideas: A small world with a huge tower, ship planets fighting, and small eco-devasted world named Earth. For the tile map, I drawed them above a NASA map with a equirectangular projection, thinking on mapping interesting GPS coordinates, which failed.
The soldier character was conceived when I drawed a pixel silhouette of something that looked. Then I thought that berets are cool, and the glasses are mocking a loved and hated communist political figure... The heavy metal and satanic symbols are to increase the irony, they were a sudden idea. They also made me remember lot about the Terranigma videogame, so there are some subtle references to it, such as the place of the Boat.
When having a character that could only die of hunger. I needed some enemies. That is where I thought of omni-directional turret, and some wandering tanks that spawned at random places. I only managed to do the omni-directional turret, and when I saw the turret clusters in action, I knew that they were enough. The implementation of these features was fast due to the immediate feedback thanks to the live coding framework.
But the game was not complete. Only dying is not very funny, we were lacking an objective. Lets go to hell because God represents the evil Spanish Inquisition, and Satan provides the symphonies of Heavy Metal.
The Results
With these iterations, I started from this:

To get into this:
As for the final item required for trespassing the deadly holy panels. Look for an outstanding dot in the map.