This image shows some of the changes since this topic was created. Notice the mob that exits the tube or the mob that falls from the ceiling. I decided to make those features based on the Metroid game.
I am continuing to update the Space Castle Game.
Not currently in the game are falling spikes, two kinds of tiled slopes, flying hat, swimming skill, antigravity suit and more. When you place those items on the map and then build the game then they all work. They are just not yet in the current playable version of the game.
At the inventory screen, you can assign any item to one of the three action keys. For example, it is possible to reverse gravity with the "z" key and then when the player lands on the ceiling, you can do a antigravity jump with the "x" key, and in midair you can do a dash with the "c" key. everything just works.
Later, I would like to make a mini map system referring to the player's current location and bonus levels.
You can use the source code as your project or part of it within your game. Please read the GPLv3.
Edit: If you like the Space Castle then fork it because, who knows, the Space Castle repository at GitHub might be removed one day.
Here is another image that shows some features of the game. This image is the parallax car scene. The idea of that map is to travel to the Space Castle but that map might be used for something else. As the car moves forward, the user can increase or decrease its speed. Rocks fall straight down or at left and right angles.
It's regular haxeflixel. Each character is represented by two tilemaps, one for the background color, and the foreground characters. So I took code page 437 (like you see in dos or dosbox), and modified it a bit (the characters are 10x15 instead of 9x16 or something else). Also had to be a bit tricky because haxe doesn't deal with characters, and worse yet, they deal with UTF8 strings. I have 256 characters of the ascii + extended sets, which is put into a string. Since I can't get the asciii character codes (to index the characters in the tilemap), I have to get their utf char codes, put them into an array with the index being the ascii code. So one character may have a code of 9621 (or something like that), and then I assign it to index say 178 which is equivalent to whatever 178 is in ascii.
Anyways it's just a bunch of stuff where I can write text mode text into a regular haxeflixel sprite.