tdcostas's Forum Posts

  • Magistross

    Sorry for the late answer! I was on holidays! But now back to dev and games!!

    Thank you so much! It works perfectly!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello!

    Love this behavior! It simply works perfectly.

    I am trying though to find the possibles moves on a grid like this :

    but it is very costy.. It takes like 1 second and a half on mobile, and like 0.3 seconds on pc, using the behavior.

    I am looking for the paths in a loop from -unitMoveRange to unitMoveRange. Of course every tile has a different pathCost.

    Any trick or advice on how to do it... better?

  • animationFrameCount(int)? where int is the index of the animation?

  • Thx. But this doesnt work with tilemap, but with separate tiles as frames of an animation.

    In this example you can find a path. That's ok, most of the plugins, behaviors, scripts I've found do this.

    All I want, is to get this grid, around the hero with all possible moves, at low cost. I've done something with easyStar.js. But I have to find all the paths possible and to use an array to save which tiles I've used already, saving "tileX, tileY" as a string then checking tokenat(array.curValue,0) AND tokenat(array.curValue,1) to check if the tiles has already been colored.. and it takes like 0.5 sec to appear on screen, on a PC... Very slow... I just wanted to set a boolean on the tile ( is it possible on a tilemap??) to check if it has been colored... or something like that..

    Should I use the plugin board/square_Tx of rex?

    Just to be clear : I don't need a path to all possible movement destinations, just a yes/no answer on whether an agent can get there. I will compute a path later once the player picks a highlighted tile.

    Any ideas?

  • Hello everyone!

    I am working on turn based game, like Ancient Empires. So i am using a tilemap, but I can't find a way to set a path cost to each tile, to pick a tile, and to set a instance variable to each one etc..

    I am stuggling to show the movement of the unit like this :

    image uploader

    I have found great behavior for the movement, the pathfinding, a lot of helping code, like EasyStar.js. But I cannot manage just to show the possible tiles to move like on the picture, in a simple loop, knowing that each tile mountain, forest, snow has different path cost...

    Any help will be appreciated!

  • I'd recommend to choose th moments you save better so as not to "hurt the experience".

    And put something like a loading sprite, so as to warn the player that your game is on saving mode...

  • Ok I see your point.

    But this method could be good if you're based on your level design. I mean no need to have X unused sprites of monster in the level 1 of your game, when you use only 1 or 2.

    Just create them at the start of the game layout, the destroy them. Maybe it will jank the game for a very short time, but only at the start of layout...

    Having ALL the enemies monsters at level 1where only a couple are used is waste of memory right?

  • So I have this game.. lot of towers, monsters, effects, particles.... the memory use indicated by C2 is 80mb.

    All these objects are in my "main" Layout, I like to call GameMain, where my game occurs (other layout are my levelSelect, gameOver etc...). They are destroyed at the start of the layout, and created when needed.

    So I take all these objects, and I cut/paste them in a "dump" layout, never used, and I see the memory use dropping to 40mb.

    Will this method will have actual impact on the performance of my game, on mobiles especially? What does this drop of memory use actually means?

  • blackhornet

    I think your answer was meant to me?

    Because of WEBGL2, you don't need POT spritefonts anymore. I guess it works with spritefonts too (?!)

    Anyway, simply doing the maths and resize the spritefont, align top-left worked for me. Without changing the char spacing and the code you provide on SF generation.

    Thank you for the tool. Works perfectly.

  • Is it possible to avoid generation of SF in 512x512 and 1024x1024?

    If i have a SF with 50x60 characters, 8 chars in width and 6 in height.. shouldn't the size be 400x300 ?

    I am trying to avoid big images so as to have a lighter game...

  • ty bro!

  • Any of you guys had this kind of problem before?

  • Another yet still epic addicting stickman game!

    Download, enjoy, rate.. I'd love to have your feedbacks guys!

    https://play.google.com/store/apps/details?id=net.playtouch.stickmanarmytr&hl=en

  • btw.. This work with a caproj type file. To do that with a capx you must rename the project.capx to project.rar so as to open it with winRar. Otherwise winRar won't open it. (at least on my pc)