How do I create and perfect complex platformer movement?

Get help using Construct 2

Post » Fri Aug 21, 2015 11:35 am

Hello all! I'm currently trying to solidify game mechanics for a game I'd like to make. I want the game to plays like an action adventure platformer similar to games like Metroid, Castlevania and Megaman. So I want dashes, wall jumps, wall slides, ledge grabs, metroid type ball morph movement and other complex movements. It's been a fun learning experience watching tutorials, reading text tutorials, going over other peoples capx and expermenting as I go along. I think I've done a pretty decent job accomplishing what I've tried to set out to do but I think my code is kinda sloppy and I'm running into a lot of issues now. Mostly issues related to my hang move.

One of the main issues I'm having and I think I'll continue to have is swapping in and out of animations and preventing certain animations from playing when they shouldn't be. An example of this is when my character is hanging from a ledge. If I press left or right, my character will change his hanging position from left to right and vice versa, while still hanging. Obviously I don't want that to happen. Also, since the characters body is up against a wall while hanging, pressing left or right will change the character to a wallslide animation. Don't want that either.

Another issue I'm having with the hang function is climbing and dropping from the hang position. I know the issue has something to do with the overlapper that spawns and checks if it's colliding with an edge when jumping, falling or hanging. When jumping (or falling, currently disabled in my capx), the overlapper sets its position on the player animation. I guess I'd have to create a function that says something like "when the playerbox is hanging, disable the overlapper when climbing (pressing W, same key as jump) or falling until the player is on the floor again" or something like that but I haven't been able to figure out how to get that to work yet. Related hanging issue, if I jump on to a right ledge, my character lines up perfectly and it looks like he's hanging from his hands. On a left ledge, it looks like the player is hanging on by his crotch. What's up with that?

And one more smaller but related question. How can I dash to the left? I can dash to the right (pressing E) no problem but pressing Q to dash to the left isn't working properly. It's dashing my character left, right, left, right, left, right.

I'm sorry for such a wordy post and complicated questions. I have a feeling a greater knowledge of instance variables would help me with most of my problems. I'm currently experimenting by going over theme and adding "compare instance variables" events in right places. Anyway, can anybody suggest to me how to handle this stuff or people point me in the direction? And if anyone has any tips on reducing or condensing my code while still keeping all the features, I'd appreciate that too. I'm getting close to that 100 event limit. A decent chunk of my code is about preventing the player from entering a wallslide animation while on the floor and pushing against the wall. Seems like there would be a much smarter way to do that though. Anyway, thanks for reading my post and thanks for the help! I'm adding a updated capx, the current code for my dash function and an old choppy gif demonstrating the problems I mentioned above.

.mediafire.com/download/3j0qtoqbf7i6t0o/Tilemap+Plat+Test+02.capx
Image
Image
B
28
S
14
G
21
Posts: 179
Reputation: 13,548

Return to How do I....?

Who is online

Users browsing this forum: DarkRoomGames, ismailsawan, ketramtu18, mekonbekon and 11 guests