fldr's Recent Forum Activity

  • i like your tutorials very much and was very excited when you first anounced this complete game tutorial!

    Thanks for sharing!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you for your help! I dont really understand what youre saying there so i will try to explain what i want to achieve.

    First a picture:

    what i want, is to set the turret range to the distance of the turret (P[0/0]) and the point on the dotted line

    this was my first approach:

    quite complicated, hm? i dont know why, but it produced wright values for this particular "angle section" (even if i used the wrong angle to calculate var_x, or is it the wright angle? because when i change that it gets wrong results?)

    Edit: while i was writing this post, i think i found my failure, the distancefactor of the turret (how many tiles around it) must be multiplied with the actual values of my formulas instead of multiplying the results?!

    when i copyed this for the other angles and changed the calculation of alpha so i always get an angle between 0 and 90 it made a total mess.

    now, like i said, my calculation is for the range of middle of tile (where the turret stands) to its (imaginary) border, so i thought i have to take this calculated "neutral" distance and have to make something like, set turret.range to distancevalue + numberoftileradius * distancevalue, or just distancevalue * 3 for an 1 tile radius.

    heres what i did on paper http://fldr.de/DSC_0469.jpg , maybe it helps

    this is how i calculated the values for 0-90° in the array:

    my variables:

    and how i set the range now:

    and this is what it does: http://fldr.de/towerturret

    only place one tower, if more are placed you never really know which distance the redline is presenting (i was sloppy with that) and dont forget to press A so theres something in the array (again i was sloppy with these debugging things <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">)

    Edit2: haha i just found another failure, for 90-180 and 270-360 i set the turret.range to the wrong values, for these angles i should mirror the values, wright?

    but like i said before, my math skills arent good so i might do everything wrong here and what you where saying is just what i was trying to do?

    Thanks!

    Big Edit: i think i got a working solution, but im very open for better performing methods, now theres a "for each turret" event that fires every tick, first compares if the turret has an target and then setting range (and when it has no target also the angle) dependent on the turret.angle

    http://fldr.de/towerdefense

  • its still not working good, guess my formulas arent correct, tomorrow i will try it again, maybe i just overlooked something but the event structure ive got now is also not very nice.

    currently ive managed to calculate the wright distance for 1/4 of the 360°, because the formula i made returns strange values for the other 3/4 of the 360°, i calculated the distance from the middle of the tile to the visible border for a 90° radius in 0.1° steps and saved them to an array, now im checking if the turret is either in 0-90°, 90-180°, 180-270° or 270°-360° and set the turret.range to the corresponding value in the array multiplied by the instancevariable "range" of the tower and get more strange things..

    since i calculated "halftile" distances (middle of tile to its borders) i figured when i want the turret to have a "one tile" radius i have to set the range instancevariable to 3 (since 3 * halftile should be basetile+one tile, wright?), it works for all angles except near 270 and 90, no idea why, the value for 90/270 is half a tile height but the result is a range of two tiles. Guess i overlooked something here.

  • Today i worked my self through all sort of forgotten math stuff. With success i think, thought about the whole concept again and now the distance will be in excact tiles, for example one tile around the basetile, for that i use intersection of two linear functions, the first is the edge of the tiles the second is tan(turret.angle), then i use distance to get the range of the turret to this point on the (visible) border of the tile.

    Thank you all for helping!

  • its because in crosswalk apps there is the chromium engine integrated which makes ~40MB installed without any game data, nothing you can do to change this (theres in fact a "crosswalk lite" which is half the size but not in intel XDK and it has some other flaws from what i heard)

  • 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

  • set magnitude to the amount of pixels it should shift to the sides and period lower

  • you could use the sine behaviour, horizontal or vertical (or both with two sine behaviours) and small values for magnitude and period

    on enemy hit ->stop movement,set sine active, wait 1 second, set sine inactive

  • 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?

  • nice game and i really like the online highscore table

  • 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

  • ok, heres a solution i found on the forum that works, it just works, im happy

    towers and people are both in this family

    now i can delete over 50 events ^^

    have to figure out how i can make this more performant (already tryed sprite"on collision"with tower instead of "every..", wasnt good) but for the moment, im just happy

    Thanks for everybody who helped me !

fldr's avatar

fldr

Member since 17 Oct, 2013

None one is following fldr yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies