Yesterday was all about working out a basic platforming engine, and by god is it harder than it looks. (The themes I'm going for is assassination and chain reactions)
First I wanted to use Game Maker's physics engine to do the work of going up slopes, the character was a rigid body box with rotations disabled.
I had made a platformer using the physics engine before and I thought it could work, however I quickly learned that was a bad idea.
If you're going to use a physics engine for a platformer, you have to realize that, in order to make the game the way you want it to, you will have to circumvent certain physics features and almost entirely take the physics out of the physics engine. My character did walk nicely over the terrain, however when met with slopes he moved slower. For the physics engine this was normal, but from a gameplay standpoint this wasn't fun.
I soon found articles online telling you not to use physics engines for platformers, so I wrote the platforming from scratch instead, using some handy youtube tutorials to lay the foundation.
There were some problems with the code in the youtube examples that I had to fix, such as the character getting stuck or jumping to some far off location when meeting a vertical wall and moving the opposite direction. There were other problems when it came to implementing ladders, so I had to figure out how to get that to work the way I wanted it to as well.
Since the game is going to have a (possibly optional, as in you can go hard or quiet) stealth element, I added a visualisation for the sound emissions in the level. If you walk around, it shows you how far that sound reaches, and if you sneak it obviously gets smaller.
Don't mind the ugly ladders and lack of ladder climbing animation, that's obviously still planned. The ladders are going to be almost as thin as the player so the snapping to the ladder won't be as obvious.
I also have some story planned out and my idea is to release this game as a 'demo' where you play some sample levels without the whole story.
One small problem I have is I don't know how to implement chain reactions yet, but I think I know how to with the 'loud' aspect if you decide not to play stealthily.
↧