Page 1 of 1

Creating an isometric platformer

Posted: Fri May 26, 2017 6:14 pm
by ThiefOfPringles
MY GOAL:
Create a pseudo-3D environment with an isometric perspective and allow jumping onto platforms with different heights. This uses HardonCollider for collision and the platform's collision shouldn't push the player away so long as the player is high enough.
MY PROBLEM:
When ever the player object attempts to jump onto a higher platform from the ground, it gets pushed away.

Re: Creating an isometric platformer

Posted: Sat May 27, 2017 12:50 am
by OnACoffeeBreak
I'm getting "Error: main.lua:66: attempt to call global 'max' (a nil value)" whenever I press the space bar.

Re: Creating an isometric platformer

Posted: Sat May 27, 2017 2:54 am
by ThiefOfPringles
OnACoffeeBreak wrote: Sat May 27, 2017 12:50 am I'm getting "Error: main.lua:66: attempt to call global 'max' (a nil value)" whenever I press the space bar.
should work now, just redownload it

Re: Creating an isometric platformer

Posted: Wed Jan 10, 2018 2:31 am
by Fezezen
Pretty cool, I've been trying to figure out something like this out for a little while.

Re: Creating an isometric platformer

Posted: Wed Jan 10, 2018 3:34 am
by Ostego160
ThiefOfPringles wrote: Fri May 26, 2017 6:14 pm MY GOAL:
Create a pseudo-3D environment with an isometric perspective and allow jumping onto platforms with different heights
I like this idea. I've accomplished it before by doing it this way:

Each object has a "z" which is 0 when grounded as well as a "height" (I see you have started on this). Then give each object a zMin which is zero when grounded(initialized). Then on the event collision check the player z against the object height, if it passes make the zMin the objects height, and thus the limit at which it can fall.

If you don't make this check at the time of collision and you apply the dx,dy collision resolution, your character will simply be pushed away by the vector.

I will see if I can dig up some code but I hope this helps.

Re: Creating an isometric platformer

Posted: Wed Jan 10, 2018 6:57 am
by KayleMaster
Isometric is just a projection.
Code your entire game in top-down view and then just apply the transformation to the draw.
That's how I made this: https://giant.gfycat.com/AnguishedLazyEquine.webm

That way you're going to deal with the easiest collisions - rectangles.

Of course, if you want jumping you will have to make a pseudo-z, but it's not that hard.