How to make Top-down Platformer game ?

raouf ben 9100

  • Posts: 9
I am making a survival crafting game and I wanted to add some depth to it,  mainly I wanna add a jump just like the game Alundra as shown in this video: https://www.youtube.com/watch?v=reutpm0LK6o

Luyren

  • *
  • Posts: 2799
You have to handle a Z-axis of sorts with a number attribute in all your actors. You also have to make sure collision interactions only happen when the actors are in roughly the same Z-axis range, and also know when to push your actor down until its Z-axis reaches ground level. So there's a lot to break down and work on.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.

raouf ben 9100

  • Posts: 9
You have to handle a Z-axis of sorts with a number attribute in all your actors. You also have to make sure collision interactions only happen when the actors are in roughly the same Z-axis range, and also know when to push your actor down until its Z-axis reaches ground level. So there's a lot to break down and work on.

well as you are saying means its possible which gives me a lot of hope and I will keep trying to find a way to implement it in my game

JeffreyDriver

  • Posts: 2262
It's certainly possible. Yes, there're various things to overcome, but's readily doable. I've seen someone working on something similar in Stencyl, but I can't remember the name of it. If I find it I'll let you know.

EDIT: https://discordapp.com/channels/209323692205932544/432361155596517387/701499623117947010

« Last Edit: July 02, 2020, 04:11:01 pm by JeffreyDriver »

vicevicebingo

  • Posts: 80
Don't f_cking play z-index
you will be mad.

merrak

  • *
  • Posts: 2738
Don't f_cking play z-index
you will be mad.

z-index isn't that complicated--but it is unintuitive. A common misconception is that z-index functions as a "layer in a layer", which is not quite true. Each layer contains a list of anything placed on it (known as "children" of the "parent" layer). An actor's z-index is its position in this list.

This the most common mistake made when assigning an actor's z-index. If a layer has six actors, then each actor has a z-index between 1 and 6. Setting an actor's z-index to 1000 doesn't permanently place it at the top of the list. The proper way to manage the z-index list is to keep it sorted as you put actors into the layer.

raouf ben 9100

  • Posts: 9
Hi there guys after a while doing some brain storming I have some ideas, and I am working on it. as soon as I am done I will share with you the results, and what I did do if anyone is interested, and I hope I get some feedback to make it better.
note : I use z-index on the main layer to fake 3D and it works well and it doesn't bother me while I am making the jump from a level to another cause I am using the send actor to layer to change the perspective after the jump all I am finding hard is the detection of the level the player is on after  the jump and I am going to do that with some collision detection and after that I change the animation of the tile actors to change their functionality.

raouf ben 9100

  • Posts: 9
I made it guys here it is the demo !
edit : note: you need the physics-tools extension !

« Last Edit: July 05, 2020, 05:53:31 am by raouf ben 9100 »

merrak

  • *
  • Posts: 2738
You might get more views if you post a playable version, rather than the .stencyl project itself... unless you're looking for feedback on your code? Maybe upload a playable to Stencyl Arcade?

Glad you found the Physics Extension useful!

raouf ben 9100

  • Posts: 9
You might get more views if you post a playable version, rather than the .stencyl project itself... unless you're looking for feedback on your code? Maybe upload a playable to Stencyl Arcade?

Glad you found the Physics Extension useful!
I am looking for feedback on the code yes , cuz this mechanic is gonna be added to my survival game I had no problems with it till now but if there is ways to optimize it more I will be glade to know !

the extension wasn't just helpful it was what gave me the idea to add the mechanic , I really appreciate it !