Hey guys,
Thought it'd make the most sense to create a thread where I can directly ask questions whenever I'm too stupid to understand how something works
In order to learn Construct, I thought I should target some real-world problems, so I thought it'd be smart trying to re-create the classic Super Mario Bros. And I'm pretty happy with what I've got so far, but there are a couple of things I'd love to figure out. I'll also just upload the .cap (it has the sprites included, if that's against the rules, just tell me and I'll take down the link) so you guys can directly look into the problem:
http://www.thomasmahler.com/files/01.cap
I hope this file works if you guys don't have the actual sprites (does the cap file also pack the resources?)
If not, here's the exe file:
http://www.thomasmahler.com/files/smb.exe
Controls are the defaults, arrow keys to move around, left shift to jump. No Run or whatever yet.
1) Controls: That's my biggest hurdle right now. I think I'm getting to a point where I can recreate the actual controls (man, now that I've analyzed it, they're _way_ more advanced than I thought. Mario builds up momentum while running fast, etc.), but what I don't understand:
Since I want to create a co-op mode that you could play simultaneously, I changed the applications controls. So I've changed the naming to P1 Left, P1 Right, etc. and added P1 Run and P1 Jump.
Now, how do I tell the Platform behavior that Z is jump - and not the left shift?
I also tried to put Luigi in there, but the controls sorta always stick to the defaults - I'm pretty sure I'm missing something 'big' here, I just can't figure it out right now.
2) Maybe I don't understand how to set this up properly, my idea was that I create a solid, tileable 'Blocker' Sprite that I'll just make invisible to block Mario from going to places he shouldn't go. Look at the leftmost area of the level, I created a blocker so that Mario can't leave the level. Now, if I jump to the left, the blocker actually blocks me, but if you keep running, Mario will fall through the blocker. Is that a bug?
EDIT: Has been fixed with the update.
3) There are a couple of animations I'd love to know how to implement: I created a 'If Mario is falling, set animation to 'Jumping'' Expression - but it doesn't seem to work. What does the 'is falling?' attribute stand for? I thought it's the downward movement whenever you were in the air. I want to see the jumping sprite whenever Mario is in the air, just like in the real game.
EDIT: Solved 3) - The expression works, but I had it set as a subEvent of the jumping event, that's why it didn't work.
Also, how do I recreate the 'momentum steps'? Say, you're running and you suddenly do a full stop - in the NES game, mario still takes a couple more steps from the built-up momentum. How do I recreate this?
Also, if you're running and you suddenly switch directions, there should be a new sprite animation where Mario already looks into the changed direction while the momentum still moves him into the previous direction for a couple of milliseconds - is there an attr to set this in the platformer behavior?