My platform character movements

0 favourites
From the Asset Store
A pack of 76 platform designs for a platformer game with a mushroom/jungle theme
  • 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:

    ec2-54-227-40-240.compute-1.amazonaws.com

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

    docs.google.com/file/d/0B_Wc5FYX4Ut8RVJCSEYtRVpSdGs/edit

    Really thanks for reading!.

  • Hey dude :)

    The link to test the game leads back to this page, maybe it needs a change ;)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks JokerSushi, I've updated the links, now you can test it...

    thank you very much.

  • 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.

  • The ideas are there dude :)

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

    And my solution if you want multiple frames on jump and fall animations :)

    scirra.com/forum/a-solution-for-jump-and-fall-multiple-frames_topic72073.html

    Hope this helps :)

  • 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...

  • 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!

  • 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...

  • 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.

    <img src="http://dl.dropboxusercontent.com/u/10285716/ConstructSampleScreenshots/MovementAnimation1.png" border="0" />

    and a bit more...

    <img src="http://dl.dropboxusercontent.com/u/10285716/ConstructSampleScreenshots/MovementAnimation2.png" border="0" />

    Hope this helps.

  • 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.

  • it is hard to tell why without having the .capx file to look at. Without being able to look at the events and the sprites frames it can be really hard to pin them down. When I get shake it is usually due to the animation frames not lining up with the floor correctly (collision polygon different in each frame) or the camera is not setup well for the scrollTo behavior.

  • Inkscape and Sprinter, intriguing.....:D I just used Photoshop for mine for now, may use Illustrator soon :)

    BluePhaze,

    Perhaps 'floating' was the wrong terminology, what I meant to say was that the animation held the last frame of the fall animation on landing, instead of playing the run animation :)

    After I tried the solution I outlined as the first link, there was a bit of a problem where each of my jump and fall animations contained more than one frame, and continuously looped. Because they were tied to the "every tick" system event, they kept on looping over and over no matter what you did. Looked bad, believe me XD

    I solved it after a few hours of head scratching by instead tying the jump and fall animations to another variable, which dealt with non-looping animations.

    p.s. Those event sheets look interesting, it's fun to see how people tackle scenarios differently for different requirements :D

  • In photoshop/illustrator/gimp/inkscape simply put each moveable part of the character on it's own layer. Lower Arm, Upper Arm, Head, Torso, Upper Leg, Lower Leg, etc... then save each piece as a separate .png, and import them into spriter. Put the pieces together and then animate them. Much better than frame by frame. You can get the free version of spriter, though the pro version is only like $25.

    So a lot of time by not having to draw each pose of your character. Also saves a LOT on file size in your game as you don't have a full copy of the whole character for each frame of animation. Just one copy of each individual piece, and the spriter .scml file handles putting them together and animating them. So instead of having for example a 200KB image for each frame (multiply the 200KB by how many frames you have) you just have the initial 200KB made up of the parts, and spriter handles moving those pieces and animating them for you with no additional copies needed. So if you have 100 frames of animation total, you just shrunk the animation graphics file size down by 100 times. From 20000KB (roughly 20MB) to 200KB or .2 MB. It saves time and space, pretty much a win/win.

    Check the Brashmonkey site for videos of it in action: Spriter

  • Ok BluePhaze, I'm going to check if this is what's happening because indeed the last thing I did was to change the collision transparent box of my character, so maybe it is the cause for this shake.

  • Thanks JokerSushi, I actually use Illustrator too, I think it's great. And BluePhaze, yesterday I test Spriter and I have to say it was pretty good to animate the character.Thanks for your suggestion, it seems a very useful tool and I think it's better than what I was doing. Thank you very much.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)