side scroller question:

Hello all. First time posting to the forums!

Here is my question:

I'm working on a side scroller where the Hero needs to be able to move freely up, down, left, right and diagonals
all while not being restricted to a "ground" or "Gravity" but still be able to jump and double jump in the space defined.

Something to note! The art is drawn in an "above the ground" fashion hence the need for free movement without "ground" or "gravity".
I will have invisible blocks so as to "noclip" the players area of movement to certain points once I figure out how to accomplish the movement.

Additionally I need to have that when the character is moving in the drawn space, down equals being closer to the screen (Front of the background which is drawn for depth i.e, bigger and in the back portion of the Background with building tops and signs that appear to be far off which I want the Hero be able to jump to once the Hero has reached a certain height onto an invisible platform for the Hero!

Thanks in advance!

Comments

  • ookami007ookami007 Member Posts: 581

    That's an interesting concept.

    It defies normal "platformer" logic, so you'll have to develop your own logic.

    I'd have to really think about that sort of logic. It's almost like the old Golden Axe game, where you could move forward and backward on the screen but also "up" and "down" and they could jump from any point.

    The actual movement shouldn't be difficult at all. You're just using 8 way movement.

    The jumping would be the most difficult because you have no bounding platform like a platformer to stop you. Instead, you'd most like have to set a startX variable when you jump, then apply the jump motion and let the motion carry on until your X coordinate = StartX, then set jump to false and allow them to keep walking.

  • IndigochickenIndigochicken Member Posts: 29

    @ookami007 said:
    That's an interesting concept.

    It defies normal "platformer" logic, so you'll have to develop your own logic.

    I'd have to really think about that sort of logic. It's almost like the old Golden Axe game, where you could move forward and backward on the screen but also "up" and "down" and they could jump from any point.

    The actual movement shouldn't be difficult at all. You're just using 8 way movement.

    The jumping would be the most difficult because you have no bounding platform like a platformer to stop you. Instead, you'd most like have to set a startX variable when you jump, then apply the jump motion and let the motion carry on until your X coordinate = StartX, then set jump to false and allow them to keep walking.

    Thanks for the kind words! I have been considering this gametype recently given the art I am using. The closest I've come to game play that I like (which would need to be tweaked to no end) is "Dead Pixels".

    The jump logic you just described is something I can attain I'm sure. The issue that arises then is how to keep that player restricted to (Rooftops, platforms) and then be able to return the character down to "ground level".

    Additionally I will have up to 4 different enemies patrolling, chasing and attacking my hero. So they will also need some form of jump logic and extra logic to return down to "ground level". Thoughts?

  • ookami007ookami007 Member Posts: 581

    It almost sounds like you will need two sets of logic... platformer logic and then the open field logic and then have a switch (onground = true/false) to switch between them.

    Complicated, but do-able.

  • mhedgesmhedges Raised on VCS Member Posts: 634

    @indigochicken, you could think of a rectangular area where the player moves, and jumps are greater than the area.

    So, perhaps something like this. If you can't walk past y=100, then y=100. And if you jump, interpolate your y to y+200 (or whatever value), then interpolate back to y. The interpolate has to ease in or out (don't remember which), and then the opposite on the way back, to simulate a jump affected by gravity.

    A double jump would use 2 interpolates up and one down, back to y.

    Try that and let us know!

  • IndigochickenIndigochicken Member Posts: 29

    @ookami007 I will start on that in the next day and see what I can accomplish! Cheers :)

    @mhedges I will be trying that later today through tomorrow and I'll report back! Thanks for solid information people!

  • UtopianGamesUtopianGames Member Posts: 5,692
    edited May 2015

    I'm not sure but are you after something like this minus the punching and kicking?

  • SocksSocks London, UK.Member Posts: 12,822

    @Indigochicken

    Attached is a quick and crude illustration of how you could do the "down equals being closer to the screen" thing - use the up and down keys to move the character.

  • IndigochickenIndigochicken Member Posts: 29
    edited May 2015

    @DeepBlueApps said:
    I'm not sure but are you after something like this minus the punching and kicking?

    EXACTLY THAT! (Even with the punching and kicking! I have enemies I need to get popping too)

  • IndigochickenIndigochicken Member Posts: 29

    @Socks said:
    Indigochicken

    Attached is a quick and crude illustration of how you could do the "down equals being closer to the screen" thing - use the up and down keys to move the character.

    Thank you @Socks for all your input and help my friend! I'm giving it a go now!

  • IndigochickenIndigochicken Member Posts: 29

    @Socks You are awesome! That is super fantastic! You get mad props! I will be working with this model and I will be giving you mad shout outs though credits and what not for the game! Cheers!

  • SocksSocks London, UK.Member Posts: 12,822

    @Indigochicken said:
    Socks You are awesome! That is super fantastic! You get mad props! I will be working with this model and I will be giving you mad shout outs though credits and what not for the game! Cheers!

    Glad it works for you :smile:
    I'd prefer it if you didn't use my name in your project - if that's cool with you, I'd just rather not have my name associated with lots of different projects, in lots of different styles that I didn't really work on - I hope you understand.

    Other things you might want to consider constraining (using the same basic maths) are the character's colour - so as he recedes he becomes subtly darker, or maybe paler/whiter if your scene is foggy/misty, and if he has a sound FX associated with him (like the sound of feet pounding the ground as he's running/walking) that sound can also get a little quieter in the distance and louder when up close . . . etc etc

  • IndigochickenIndigochicken Member Posts: 29

    @socks not a problem. My thanks to you and your insights! I will keep you abreast to my work and hope to see yours as well!

  • IndigochickenIndigochicken Member Posts: 29

    @DeepBlueApps I purchased your double dragon template. I may have a question or two in the coming days. But you are also awesome :)

Sign In or Register to comment.