1 decade ago by RockLeo
Hi everyone,
I decided to learn game development by cloning a NES game and my choice was Battletoads, because there was different kinds of levels and mechanics.
I got some tiles and did the first level (Ragnarok). The looking was great, the player was awesome! But I cant manage to do the jump and falling logic.
Here is pic of the result
[URL=http://imageshack.us/photo/my-images/818/btgame.gif/][IMG]http://imageshack.us/a/img818/4566/btgame.gif[/IMG][/URL]
My first problem is that I cant put gravity on the level, the player falls to the collision layer. So the jumpnfall example doesnt fit here.
I did a jump logic, but I could only achieve a good result using the "this.pos.y" property, which ignores the collision layer.
The second problem are the gap/waterfall. The player needs to fall and this one I have no idea what to do. I was thinking in something like the "kill entity" that Dominic did in the weltmeister video, but no so sure that it's going to work.
I need some ideas or even codes to help me get over this. I did a lot of research, but I dont think my knowledge was enough.
Thx a lot!
I decided to learn game development by cloning a NES game and my choice was Battletoads, because there was different kinds of levels and mechanics.
I got some tiles and did the first level (Ragnarok). The looking was great, the player was awesome! But I cant manage to do the jump and falling logic.
Here is pic of the result
[URL=http://imageshack.us/photo/my-images/818/btgame.gif/][IMG]http://imageshack.us/a/img818/4566/btgame.gif[/IMG][/URL]
My first problem is that I cant put gravity on the level, the player falls to the collision layer. So the jumpnfall example doesnt fit here.
I did a jump logic, but I could only achieve a good result using the "this.pos.y" property, which ignores the collision layer.
The second problem are the gap/waterfall. The player needs to fall and this one I have no idea what to do. I was thinking in something like the "kill entity" that Dominic did in the weltmeister video, but no so sure that it's going to work.
I need some ideas or even codes to help me get over this. I did a lot of research, but I dont think my knowledge was enough.
Thx a lot!