How to make a 2.5D engine?

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • I've tried to figure this out from some examples and tutorials such as redhades' isometric engine. But I'm at a loss admittedly.

    I want to be able to have a full platforming experience like a 2D platformer for the most part but that extra depth into the background/foreground. I also want to put in that streets of rage or double dragon (whatever analogy works) fighting engine as well, so things flying through the air and all that was another factor.

    I looked at some isometric engine tutorials which were the closest thing I could find but they also weren't what I was after and honestly quite over my head in the math. I tried thinking of an associated array for the level sort of mapping everything out in x, y and z coordinates but couldn't figure out how to handle say placing the entire level and the background into that array or how to handle collisions. Would anyone be willing to help with thinking on how this engine would be made? I appreciate any advice offered.

  • ahh streets of rage..

    Exploring how an array functions and making simple topdown collisions will help you on the way. Pardon me if you know this already, in that case it would be enlightening to render a small 2.5 world grid (just a few platforms). Usually ideas come with success of such projects.


    Please login to see this picture.

    Please login to see this link.

  • I would recommend:

    1. giving all objects a "z" depth coordinate and tracking those

    2. using coordinate collision detection instead of the built in collision system. (checking if the coordinates of a custom collision box are inside the coordinates of another custom collision box and then treating that as collsion)

    It's possible. It's just very complicated. I'm not sure anyone has an example of this or would be willing to create one as it is indeed a very difficult task to accomplish.

    Please login to see this link.

    My examples:
    Please login to see this link.
    Please login to see this link.
    Please login to see this link.

  • very good art and clever misdirection

    You, sir, aren't helping. And this isn't the first time:

    let me know when you finish your rogue legacy ripoff :)

    have you even looked at the options that the lacewing server and clients do/provide? if you can't figure out what to do from there then im sorry you shouldn't be making an online game.

    Anyway, on topic, this might be able to help (though I'm not sure): Please login to see this link.

    Another example I found: Please login to see this link.

    If you search "isometric" in the file archive, then there are lots of results. You can probably find an example to suit your needs there if one that suits your needs exists.

    My Please login to see this link. (which I actually use), my Please login to see this link. (which I mostly don't use), and my Please login to see this link. (which I don't use anymore pretty much at all really). If there are awards for "'highest number of long forum posts", then I'd have probably won at least 1 by now. XD

  • This is cool but probably not what you're looking for:

    Please login to see this link.

    Uses "voxels" - there's an example around here somewhere.

    You can also test collisions with array by testing the player's grid coordinates against the array, but this assumes you already have the level loaded in. I think it's possible to have a z value with this and it may not be as hard as Konidias suggests. I can get back to you on this...

    Please login to see this link. | Please login to see this link. | Please login to see this link. | Please login to see this link.

    Edited once, last by SolarB (September 14, 2013 at 1:16 AM).

  • Thank you for the responses. They are all helpful in some way or another. At the moment I have a z-axis sorta lined out and now I'm just looking at static engines for a good idea on how to handle gravity. But for actually running around a level that's not just a flat plane, that's really what has me stumped.

    SolarB: I keep ending up with that same idea, basically having all the real nitty gritty in a large array holding the positions of objects and the obstacles. At best I can think of a loop that runs at the start that checks each point on the actual level, returning a sort of yes or no and tossing it into the appropriate spot in the array. But that sounds like it'd suck up a lot of computer power. I also don't know how to handle something moving about as it would need to be tracked in the array. If you are willing to share more of your thoughts I would love to bounce more ideas.

  • its the truth though. most 2.5d is just good art and clever coding that makes it appear to be 3d :P


    Oh, I misunderstood what you meant. I thought you were responding to this post:

    ahh streets of rage..

    Exploring how an array functions and making simple topdown collisions will help you on the way. Pardon me if you know this already, in that case it would be enlightening to render a small 2.5 world grid (just a few platforms). Usually ideas come with success of such projects.


    Please login to see this picture.

    Anyway, in that case, that is kinda what Isometric 3D is, it's fake 3D (though we kinda already knew that), so I guess it was accurate. Sorry about that. :(

    My Please login to see this link. (which I actually use), my Please login to see this link. (which I mostly don't use), and my Please login to see this link. (which I don't use anymore pretty much at all really). If there are awards for "'highest number of long forum posts", then I'd have probably won at least 1 by now. XD

  • wow. casleziro actually made a good point, happy green frog - just get on with whatever you're doing! you constantly spam this forum. casleziro said

    Quote

    very good art and clever misdirection

    which is EXACTLY what i did with Pacz, which is 2.5D

    is doesnt have to be true iso to be considered 2.5D if you are struggling with the iso concepts.

  • hm I don't understand your citation frog, I'll take it I was vague in my comment.

    Arrays or lists have to be included in this because each cell/node contains a great deal of reachable data that is mapped in an actual 3D-space. What that eventually leads to is a 3D-to-isometric translation algorithm. That can't be avoided but might be stupid to mention early on as it can overwhelm the programmer.. depending on what level he/she is. Knowing how MMF arrays work, their base-value etc is a good start.

    Collisiondetection in 3D might seem complicated (to any programmer), learning top-down collision that relates to internal data instead of MMF object collisions is also a good start. It has to be done as the collision takes place in 3D-space not on the screen.


    I'll recommend against using sensors (MMF style).

    Please login to see this link.

  • hm I don't understand your citation frog, I'll take it I was vague in my comment.

    Arrays or lists have to be included in this because each cell/node contains a great deal of reachable data that is mapped in an actual 3D-space. What that eventually leads to is a 3D-to-isometric translation algorithm. That can't be avoided but might be stupid to mention early on as it can overwhelm the programmer.. depending on what level he/she is. Knowing how MMF arrays work, their base-value etc is a good start.

    Collisiondetection in 3D might seem complicated (to any programmer), learning top-down collision that relates to internal data instead of MMF object collisions is also a good start. It has to be done as the collision takes place in 3D-space not on the screen.


    I'll recommend against using sensors (MMF style).


    I already said I'm sorry, and that I thought he was referring to something else (possibly partially because of some other posts he made that were not that nice that were similar in length and in what he said (and partially because your post contained an image)).

    My Please login to see this link. (which I actually use), my Please login to see this link. (which I mostly don't use), and my Please login to see this link. (which I don't use anymore pretty much at all really). If there are awards for "'highest number of long forum posts", then I'd have probably won at least 1 by now. XD

  • Re how to make an ISO Engine:
    Hello, I have been reading through this topic with quite some interest and hopefully a different approach to a solution.

    When approaching this topic I wanted to try to keep it simple but effective.

    Essentially create the illusion of 2.5D or ISO.

    My goal was to create this illusion without the math.

    I also wanted for the user to be able to use library objects or there own work.

    With this in mind I have Not used the layer object.

    With all that said, the user needs to believe he can walk both in front or behind in order to give the illusion of depth.

    However my possible answer has issues with the actives needed in order to achieve the effect.

    My answer is only a small part of I hope of the community working together to help everyone solve.

    With that in mind you are free to download use my example.

    Please login to see this link.

    Controls: left mouse to move/ left mouse click when close enough to the barrel to engage with it

  • My feedback? MMF2/TGF2 comes with the layer object, so you can go ahead and use it. I haven't looked at the file yet, but it's still important to use the layer object...

    EDIT: Okay, I've tried the example, and it's pretty good. However, adding Z coordinates would be nice...

    My Please login to see this link. (which I actually use), my Please login to see this link. (which I mostly don't use), and my Please login to see this link. (which I don't use anymore pretty much at all really). If there are awards for "'highest number of long forum posts", then I'd have probably won at least 1 by now. XD

  • Thank you happygreenfrog could you possibly give some insight on how I could add Z coordinates.

    The biggest issue with my example is the actives used to create the effect.

    One could design there level taking careful note of the positions of these actives and simply create them @ the position when needed.

    What thoughts does the community have?

  • Thank you happygreenfrog could you possibly give some insight on how I could add Z coordinates.

    The biggest issue with my example is the actives used to create the effect.

    One could design there level taking careful note of the positions of these actives and simply create them @ the position when needed.

    What thoughts does the community have?


    To add Z coordinates, you are going to have to use an alterable value to store the Z coordinates. However, to make things simpler, you can also have an object that already determine the X and Y coordinates for you (to display the Z coordinates, simply subtract the Z from the Y coordinates (using the second object to determine what the Y coordinates is)). If you don't quite understand, I might be able to make some sort of example sometime soon, but not right now.

    My Please login to see this link. (which I actually use), my Please login to see this link. (which I mostly don't use), and my Please login to see this link. (which I don't use anymore pretty much at all really). If there are awards for "'highest number of long forum posts", then I'd have probably won at least 1 by now. XD

  • To add Z coordinates, you are going to have to use an alterable value to store the Z coordinates. However, to make things simpler, you can also have an object that already determine the X and Y coordinates for you (to display the Z coordinates, simply subtract the Z from the Y coordinates (using the second object to determine what the Y coordinates is)). If you don't quite understand, I might be able to make some sort of example sometime soon, but not right now.

    If you could when you get the time as I am unsure how this concept would be applied to my example.

    P.s I may be slightly late when replying or posting updates due to personal family issues.

    Maybe with my example and your input we could create a resource that could be used by everyone that wished to create the 2.5D or iso effect?

    My example is free for anyone to use but lets see if together we can make it better.

  • Okay, so I've made a simple (and not completely flawless) example of Z coordinates. The only difference in the controls is that space bar jumps (you can't jump over things (other than the barrel, which, for some reason, now has broken collision detection (if it didn't, you couldn't jump over it)), but I'm not trying to demonstrate 3D collision detection). It is a modified version of your example. It also uses the Layer object for sorting now. Also, I'm aware that you can infi-jump, though it should be very easy to fix. Anyway, enjoy!

    Files

    My Please login to see this link. (which I actually use), my Please login to see this link. (which I mostly don't use), and my Please login to see this link. (which I don't use anymore pretty much at all really). If there are awards for "'highest number of long forum posts", then I'd have probably won at least 1 by now. XD

  • With happygreenforgs improved version change the following.

    Attack line 31: User clicks with left button on "Cracked Barrel"
    Z order control is overlapping "Cracked Barrel"

    Now you can hit the barrel :)

    Plus you can still jump over the barrel :)

    I must say your improved example with the use of the layer object is very much the "IMPROVED VERSION"

    The players new shadow is a bit annoying as it makes the players feet seem like they are blinking.

    Sorry to say I do not know how to fix the infi-Jump.

    Thank you for your time and help

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!