I need some help, second proper platformer game I made but, well just playing it I need help. Such as making the level change and making the duck fly.
To keep the flight path of the duck simple, can it just fly up and down, or left and right? I can help you with changing to anther tilemap once the player reaches the ‘trophy’ tile.
I changed the code so that you can load in multiple tilemaps. In order to dynamically set the tilemap based an array of tilemap objects, I used the ‘Tilemaps’ extension.
I just made a copy of your existing tilemap, added a tile ‘1’ to the first tilemap, and a ‘2’ tile to the second. There are few problems I noticed:
- When the game starts, I see the ‘1’ tile briefly and then it disappears.
- When reaching the end of the level, I expect it to go to the second tilemap, but it stays on the first one. It is maybe after completing the level a second/third time, that it shows the second tilemap.
Can someone please help with these issues?
Ok, thank you @cosmoscowboy , I would like for you to help me
I changed the game hoping that it would load multiple tilemaps, but it seems to load the first tilemap a few times, and then eventually the second tilemap. Also, I don’t see the ‘1’ tile on the first tilemap (well I see it briefly and then disappears; not that this is important, I just wanted to include this to distinguish between the two; as the second tilemap is an exact copy of the first for a demo).
Oh, it looks like there’s some code that’s resetting the tilemap inside the forever loop. If I disable those blocks it looks like everything runs as it should! (Also this platformer is hard haha, had to play it three or four times to make it to level two )
I agree, it took me a few times as well.
Thank you for pointing this out, I hadn’t even noticed the forever loop. (oops )
Do you have this game stored with Github? If not, you can just edit the game that @shakao posted, change the name, and continue from there. The idea is, you can add extra tilemaps to the variable ‘tilemaps’.
I noticed in the forever loop, that you had set an animation for ‘blob’, but it didn’t have any frames (frames is just an array of images). So I just made the blob, ‘blob up and down’. : -) Also for the bird (beast), I created an array of images called (beastImagesRight, as the image is facing right), loop through them, create a clone (copy), flip the image horizontally, and then finally add that to beastImagesRight. All of these images are in the gallery. That way you can use the character animation extension to have the bird fly left and right.
To keep the speed of the enemies simple, and the code you had already made for the ‘touching’ wall events, I added a variable 'enemySpeed, and used that in the different places. If you want to have the enemies move at different speeds, you could create a new enemy ‘Kind’ and create a new speed for that kind, or you could use the ‘sprite data’ extension to save a random speed per enemy. I do this in my game ‘Shark Frenzy’ and even change the animation speed based on the sprite speed. (Shark Frenzy)
I like your game so much I changed the code that Shannon had posted. Here it is:
You are welcome. I look forward to how the game progresses. Do let me know if you need any more help, or want to exchange ideas.
I will , thanks again