How do I make perspective in my game?

0 favourites
  • 5 posts
From the Asset Store
Easily generate many levels from a set of pre-built scenes (Construct 3 template)
  • Hi guys, well, what I mean is, I'm trying to make a game beat em up like and I need when I'm below the enemies/objects I'm become higher in Z order and lower Z order when I'm above them, I know that I can Compare Y but I need to pick literaly evething on this event (enemies, items, walls, objects like tables etc) and some objects can't be placed in same families with other objects, has a another way to do that? thanks in advance.

    sorry any grammatical problem :P

  • They should all be sprites and you can put them in one family

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • They should all be sprites and you can put them in one family

    but how exactly do I make that comparison? I mean, I need the objects update Z Order all the time while the objects moving around.

  • I thought you said you had done it but you couldn't put all objects into one family?

  • 1st you need them all in 1 big family or multiple families grouped under one main family if that is even possible...

    after that u compare Y and Z order them if Y is less or higher than bbox top/bboxbottom of the player ( keep in mind, that the bbox alters based on collision mask "rectangle" even tho u have a shape based collision mask... the bbox is measuring just the corners of ur collision mask)

    i think there might be a Construct 2 or Construct classic tutorial on this... it's in the forum for sure ... but forgot how was called... maybe search for Z sorting by Y or something like that

    however this sorting is going to raise ur CPU usage since u calculate everytick each sprite position relative to player position, instead of doing that i would just move the players Z instead based on relative position of other walls/trees/enemies triggered by 1 time instead of everytick.

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