How do I add jumping w/ platforms to a Top Down game?

0 favourites
  • 2 posts
From the Asset Store
A pack of 76 platform designs for a platformer game with a mushroom/jungle theme
  • Hi guys,

    I’m working on adding jumping and platforms, to my top down action game, to give it a sense of depth.

    The game will look a bit like 2D Zelda. It's multiplayer - here's a demo: http://www.badmiracle.com/hero/ (player graphics are not my own)

    Screenshot Example for Context: https://www.dropbox.com/s/lcfd5mfvdiv2e ... n.png?dl=0

    I’m having some trouble getting jumping to work, and I can’t seem to figure it out. I’ve created a “z” axis for depth, and played around with adding a jumping power variable that will increment the players Z with delta time, and another variable for jump height... but it eventually becomes so convoluted that I end up back at square one. It’s a lot more complex then I thought.

    I’ve implemented a collision system that R0J0hound created so that I could have some form of depth based collision control. It works quite well for making sure you only collide with objects on the same “z” height as your character.

    I have a stripped down capx containing a player that can be controlled and a bunch of stacked boxes. I’m hoping someone can either direct me on how to do it, or create such a system that will explain it.

    Capx Example: https://www.dropbox.com/s/pckfuj4ajot1x ... .capx?dl=0

    Thanks in advance for any help/advice... (or even words of encouragement at this point) that you can provide!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here is a basic bare bones example of how to implement and keep track of a "vertical position" value as data only (my numbers are represented by m/s for a natural feel, but you can use whatever unit you want to fit into your system).

    https://www.dropbox.com/s/ib8cmxhk1zk30 ... .capx?dl=0

    The hard part is the collision filtering (custom solids behavior) system that can interact based on an objects "vertical position". This I can't really help much with, but it looks like you've got something to work with there already.

    Edit: Also event 5 is what stops gravity from acting and (when Zheight is 0, or "at rest" on the floor). You may need to add some events to account for "resting" on different levels, such as on top of a box. Your Z height will be greater than 0, but it should not be accelerated by Zspeed and Gravity anymore.

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