ShadowMaster
10-06-2008, 10:03 PM
for Game Maker.
I've decided to release the collision code I've written for the movement of platformer characters. The point of the code is to lighten the burden of the developer of a platformer, while at the same time being general purpose enough to allow you do basically anything you would normally find in a platformer, for instance jump, double jump, wall cling, climbing ladders etc. You should be able to do all these things after a bit of thinking.
The script doesn't anything other than move the character at the speeds you set it at, but after a bit of thinking you should realise that this is enough to allow you do all the things characters in platformers do. To make the character walk left you just set it's x speed to a negative amount and it'll move at that speed until it hits a wall. Another helpful feature is that you can specify what height of hills it may climb and descend, making creating a character for a platformer ridiculously easy.
Here is the code plus an example of usage:
SMC (Game Maker 7 version) (http://www.gamedev.za.net/filecloset/download.php?id=492)
SMC (Game Maker 6 version) (http://www.gamedev.za.net/filecloset/download.php?id=493)
To use the code in a project just merge the file, SMC.gmk, with your current game.
No credit is required if you use the scripts but would be appreciated.
Any questions about usage just ask away and I'll help.
Any suggestions for improving the actual performance of the code, just tell and I'll do.
PS. this is the script that's being used in the competition 19 entry, Death.
I've decided to release the collision code I've written for the movement of platformer characters. The point of the code is to lighten the burden of the developer of a platformer, while at the same time being general purpose enough to allow you do basically anything you would normally find in a platformer, for instance jump, double jump, wall cling, climbing ladders etc. You should be able to do all these things after a bit of thinking.
The script doesn't anything other than move the character at the speeds you set it at, but after a bit of thinking you should realise that this is enough to allow you do all the things characters in platformers do. To make the character walk left you just set it's x speed to a negative amount and it'll move at that speed until it hits a wall. Another helpful feature is that you can specify what height of hills it may climb and descend, making creating a character for a platformer ridiculously easy.
Here is the code plus an example of usage:
SMC (Game Maker 7 version) (http://www.gamedev.za.net/filecloset/download.php?id=492)
SMC (Game Maker 6 version) (http://www.gamedev.za.net/filecloset/download.php?id=493)
To use the code in a project just merge the file, SMC.gmk, with your current game.
No credit is required if you use the scripts but would be appreciated.
Any questions about usage just ask away and I'll help.
Any suggestions for improving the actual performance of the code, just tell and I'll do.
PS. this is the script that's being used in the competition 19 entry, Death.