an (isometric&low poly) Tower Defense game

0 favourites
From the Asset Store
🙌 Battle Defense Sound Pack comes with 525 high-quality sound effect
  • Hi,

    today i started working on an isometric tower defense game, using the lovely assets by Kenney.

    Didnt got much yet, only a map, some enemy walking the path and making sure everything has the wright z-order. Isometric game design is totally new to me and i had a hard time figuring everything out with this damn z-order and where to place the tiles <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    but anyway, you can see what i got here: http://fldr.de/tower3

  • I'm about to start a tower defense too, but no isometric view. Didn't have much time though

  • It looks like you got it working. So far so good.

    What elements of the isometric game logic gave you the most trouble?

  • Looks Nice! Cool style, can't wait to see what this will look like when finished.

  • It looks like you got it working. So far so good.

    What elements of the isometric game logic gave you the most trouble?

    its the z-order thats troubling me, mostly the details like trees, they rely on the z-order of the ground tile they are on but thats not always wright with towers and people.

    For example the tree and tower in the left corner arent wright, i had to move the tower to the same layer as the ground (normally people and towers are one layer above).

    This problem could be solved if i had the details seperated from the ground i think.

  • Looks Nice! Cool style, can't wait to see what this will look like when finished.

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > It looks like you got it working. So far so good.

    >

    > What elements of the isometric game logic gave you the most trouble?

    >

    its the z-order thats troubling me, mostly the details like trees, they rely on the z-order of the ground tile they are on but thats not always wright with towers and people.

    For example the tree and tower in the left corner arent wright, i had to move the tower to the same layer as the ground (normally people and towers are one layer above).

    This problem could be solved if i had the details seperated from the ground i think.

    I had some trouble with that too, but got it working quite good.

    Example and capx in this old thread.

    https://www.scirra.com/forum/viewtopic.php?f=147&t=97677&p=756014#p756014

  • >

    > > It looks like you got it working. So far so good.

    > >

    > > What elements of the isometric game logic gave you the most trouble?

    > >

    > its the z-order thats troubling me, mostly the details like trees, they rely on the z-order of the ground tile they are on but thats not always wright with towers and people.

    > For example the tree and tower in the left corner arent wright, i had to move the tower to the same layer as the ground (normally people and towers are one layer above).

    > This problem could be solved if i had the details seperated from the ground i think.

    >

    I had some trouble with that too, but got it working quite good.

    Example and capx in this old thread.

    https://www.scirra.com/forum/viewtopic.php?f=147&t=97677&p=756014#p756014

    Thank you! will have a look at that thread, turned out ive got some more z-order problems you can see here:

    edit: ok, now i took a look at your solution. It works really good, but i fear it might come to problems when there are more then one sprite around a building, because of the objects changing layers? or am i wrong? sorry if i misunderstood what you did there, its late now and my brain is quite twisted from the hours of testing z order stuff ^^

    will look at it again tomorrow and see if i can also use this solution. i really didnt see any glitches and also the performance seems to be good (i just made something with function calling that went up to full cpu usage^^)

  • Nope no problems what i've seen so far. As long as you seperate the ground and the "objects" and set the imagepoint correctly you this one sorts every time Y position of moving objects change, so it will stay sorted.

  • oh ok, didnt realise this yesterday night, was just too late for me

    i did solve it by putting towers and people in one family and made a "for each (ordered by y ascending)->send to top of layer" event every 0.1 seconds, seems a bit dirty to me, will see if i can optimize it some more

  • You should try the layer approach. Send objects that are supposed to be on top of the character, NPC's etc to new layers depending on "Y" and only call the sorting function when that happens. That way you will only need to sort if there is actually something that needs to be sorted instead of every 0,1 seconds.

  • in my game theres a "stream" of enemys constantly walking on the path so when the map is heavily covered by towers there will be permanent requirement for sorting but not for every object at the same time so i think i should find a way to limit the objects being sorted. does that make sense?

  • Maybe add another condition? Once things are sorted the could stay sorted unless something is very close to the object. that needs to be sorted...

    Hmmm no idea, maybe distance? is overlapping?

    The more conditions to be met the better i guess. I wouldn't go with time as a limiter for sorting. You could get ugly graphical glitches.

    There's probably a lot of objects that doesn't need to be sorted because they are not overlapping, so trying to figure out what actually needs to be sorted?

  • yeah i also think something with overlapping should do the trick but all my approaches with this turned out buggy so i stick to the first rule of Lucas Arts (http://images.eurogamer.net/2014/usgamer/Ten-Tips.jpg) and come back to this later.

    Now ive got new problems with the turret behaviour <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    i know i have to set the range of the turret acordingly to its angle but im not good at math and dont know how to set this wright, in theory a circle should become an elypse in the isometric world but what i get is more a distorted shamrock

  • Sorry, for some reason I couldn't access the forum yesterday. Looks like tunepunk has a great solution for this though!

    Turret range: Can you just do a distance comparison between the sprite and the turret? Multiply the Y by 2 in the point to point distance comparison (before you do the trig), then just set a distance limit.

    Distance = Sqrt ( X^2 + (Y*2)^2)

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