My platform character movements

Get help using Construct 2

Post » Fri Jul 19, 2013 4:47 am

Hello I'm creating a new platform character for a Ninja game, and I want to share it with you to have tips, comments or suggestions. These are his basic movements:

- Left arrow = walk
- Right arrow = walk
- Up arrow = Jump (Without any animation)
- Down arrow = Kneel down
- CTRL key = (Roll)

I don't know why he stops in the middle of the screen and he cannot keep walking and why sometimes if I pressed up and left or right key the animation suddenly stops.

The Link to test my game is:

http://ec2-54-227-40-240.compute-1.amazonaws.com:50000

And I'll share an image of the Event Sheet I have in Construct 2 too:

https://docs.google.com/file/d/0B_Wc5FYX4Ut8RVJCSEYtRVpSdGs/edit?usp=sharing

Really thanks for reading!.alejovilla2272013-07-19 14:25:39
B
21
S
3
G
2
Posts: 86
Reputation: 2,262

Post » Fri Jul 19, 2013 12:09 pm

Hey dude :)

The link to test the game leads back to this page, maybe it needs a change ;)
B
7
S
2
G
2
Posts: 13
Reputation: 1,553

Post » Fri Jul 19, 2013 2:26 pm

Thanks JokerSushi, I've updated the links, now you can test it...
thank you very much.
B
21
S
3
G
2
Posts: 86
Reputation: 2,262

Post » Fri Jul 19, 2013 6:25 pm

I think he is still moving, you just can't tell because there is no details in the level that would give a sense of movement. Also, you need to update the animation events to set his animation back to walking when he lands on the ground. Right now if you jump and keep holding it he stays in the jump animation. Since there is no jump animation specifically it means he goes to his default standing pose.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,548

Post » Fri Jul 19, 2013 9:10 pm

The ideas are there dude :)

I notice the character continues to float on land, there's a good fix for that: http://www.scirra.com/tutorials/351/platform-behaviors-animation

And my solution if you want multiple frames on jump and fall animations :)
http://www.scirra.com/forum/a-solution-for-jump-and-fall-multiple-frames_topic72073.html?KW=

Hope this helps :)
B
7
S
2
G
2
Posts: 13
Reputation: 1,553

Post » Fri Jul 19, 2013 10:50 pm

The easiest way I have found for animations for jump and fall are to use spriter to create the animation, you can then export as .png frames if you don't want to import the full .scml spriter animation.

@JokerSushi Not sure why you need a special solution for animation on jump and fall. If you are using the events correctly they work fine. You just need to account for landing/on floor, etc... and set your animations not to loop for those pieces as well.

And if your sprites animation frames are done properly there should not be any floating. If you get float either the frames are not trimmed, the image point is not correct, or you are not pinning to your invisible sprite (collision box) correctly in most cases...BluePhaze2013-07-19 22:52:38
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,548

Post » Sat Jul 20, 2013 7:32 am

Yes @BluePhaze, you were right!... I put a background and then I see it walking without any problem. How can I update the events to set the animation back to walking ?, what would be the right event ?... I'm working on the jump and falling animation, that's why the character is with the standing pose when he jumps or falls...

Really thanks for all your help!alejovilla2272013-07-20 07:32:46
B
21
S
3
G
2
Posts: 86
Reputation: 2,262

Post » Sat Jul 20, 2013 7:37 am

Thanks @JokerSushi,
I downloaded the capx file in the first tutorial and I saw the player moves pretty well but when I saw the Event Sheet, I didn't know if it would be a good idea to use the EveryTick event, thinking about performance... Then I saw your version but I would try first to put my animations for jump and fall to see what happens... maybe it slides just because those animations aren't in the events as @BluePhaze suggests.

Really thanks for your help, I'll try and the I tell you how's it going...
B
21
S
3
G
2
Posts: 86
Reputation: 2,262

Post » Sat Jul 20, 2013 8:20 am

Alright, here are some examples of how I handle movement and the associated animations. Note that this is from an event sheet of an early prototype for a production game I will be releasing soon. This is an earlier version so not everything is optimized and there are some parts that may not be relevant for you such as the checks for Running. I have keyboard and touch controls in the game so when I want the character to run I check to see if the B button is down, or if the Running variable is set to 1. You may also see some bits in there of my wall jump or double jump or falling logic, feel free to ingnore these as there are more pieces to them that are not included in this example. You can also check my tutorials (Link in signature) for wall jumping and double jumping techniques.



and a bit more...



Hope this helps.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,548

Post » Sat Jul 20, 2013 8:23 am

@BluePhaze, thanks for your suggestion. I'm using inkScape for my animations but I'll take a look at Spriter to compare them. I will take in mind your suggestion, I'll keep working on my animations for jumping and falling and I'll let you know how's it going.

Now I don't know why when I put the background image and I move the character (left or right arrow), the game scene seems to shake and it's a very annoyng effect.

I uploaded the version of the published game if you need to understand what I'm talking about (http://ec2-54-227-40-240.compute-1.amazonaws.com:50000).

Thank you very much.
B
21
S
3
G
2
Posts: 86
Reputation: 2,262

Next

Return to How do I....?

Who is online

Users browsing this forum: PreacH and 9 guests