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 seems that immovable was not needed. It was causing the player to move position at the collide function. I used animation.paused to determine if the character was standing still, i used a X and Y variable that refers to the position that the character was first frozen so that the character never moves.
Some last and unmentioned thoughts on this would definitely also be performance. VSTi's can be pretty heavy-duty. Expensive on both ram and CPU. If you have just one simple Synth you probably are still okay... But if you want a complete setup with lots of cool stuff you just might not get it running on say an old/cheap Android with 512mb of ram. Actual music studios use server blades to run their DAW's on. (usually Pro Tools). An other problem in the VSTi scene is bugs. Its al written in unmanaged C/C++. So expect some memory leaks here and there and access violations. The new Cubase release 9 has a sentinel that detects and blacklist these kind of things because their helpdesk/forum is full of sad stories about VSTi's misbehaving and making Cubase unstable.
And also, AFAIK Flash does also not support threads which can also be a potential problem. So even if you find a AS3/Haxe synth you might not get it working in Flash builds while HaxeFlixel - and your game - is running. Because then you probably going to need a separate thread for it because of all the CPU time.
Finally after looking at your provided link https://github.com/OIIOIIOI/hxmidilib I can assure you that this library has no instruments with it. Its a nice and small framework that can be used to play midi files in events loops. For example it can give you a callback on every beat. Which can be used for music because on every callback you can play a mp3/ogg -file, but can also be used for other applications. It will not fully accommodate you desired application though. This will only work with (2) of my previous post.
Good luck with your game!
Here's some inspiration to get you going on the music for your game. Its 8bit synths + heavy metal guitar & drum. You just might have heard it somewhere... And its actually from a game-soundtrack! || For some odd reason I thought it would appreciated for this post :D
# Machinae Supramacy :: Death From Above