Ethan's Recent Forum Activity

  • I'm not good at maths but heres a round about method.

    Create a sprite 1 pixel in size at the upper right point, then run a loop the distance between the upper right point and the lower left point in that direction and move it 1 pixel each loop. Stop the loop when its y coordinate matches the DTC's. Now get the distance between the sprite and the DTC.

    Also i think this is called "raycasting". Maybe do a search for that term.\</p>

  • I'm currently doing ai for my game and run into this issue a lot too. A "Trigger once per instance" would definatly be a great addition.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For one in my opinion the built in pathfinding is made for an RTS type game, its especially bad for grid/board based games, and the move costs just don't work for a TBS. You can probably jerry rig it to sort of work but i believe that was the point being made. Thankfully there are 3rd party alternatives as the event system doesn't lend itself well to that kind of thing, though i know a couple of good examples of it being done.

  • I share the sentiment. The preformed idea on how games should be made is C2 biggest obstacle. I find that there are work arounds to these obstacles. But then that requires building plugins from the ground up, that have to work around C2 Runtime engine and current plugins. This leads to the end result that plugins that open the doors for C2 require more work than what they would if they were done without the C2 system in place. It's daunting that some plugins I want to right and have started have to work around C2.

    Thats ironic if you believe Ashley started CC because he got fed up of writing custom plugins for MMF.

  • Very impressive, good luck with the project.

  • Have you seen this method? http://dxprog.com/files/randmaps.html

    It's how i created this.

  • You could also do it manually with events with something simple like this,

    objects opacity > 0 set objects opacity to objects opacity - whatever*60*dt.

    objects opacity = 0 destroy object.

  • Also a bit drastic but you could confine all non licence holders to one forum for the time being.

  • tatogame thanks for the suggestion but i don't quite follow what you mean about it not being best practice though, the image is only used at the start of the layout to set the tile image then destroyed, all the info is passed on.

    Small update.

    Heres a first look at the ai.

    It shows the tactical phase. I loop through each ai unit (black units) able to move, check every move position, check all adjacent squares around it, create an "influence map" where the tile gets a score based on a number of factors like, the terrains attack/defence bonus, is there an enemy there? Can kill enemy? can enemy kill me? how much damage can i inflict? how much damage will i sustain? whats my hit/block ratio? Then it picks the highest scoring tile and if its above a certain threshold then it moves to attack, else the unit is ignored and is passed over to the next ai phase which will be the capture town phase.

    There are still some things its doest take into account, which will be added later.

    Another example.

    Kyatric please can you move this topic over to the wip board, thanks.

  • Don't you just omit that tile when you check for the collision?

    -On collision with tilemap

    + Tile ID different to (tile id number you want to ignore) - do whatever

  • Cool project, glad it might help.

    It just occurred to me you need to alter the destroy code, i was playing around with something else when i did this so i don't think they're being destroyed unless they get stuck in a wall. Oh and it's not set up for delta time. They should both be minor adjustments though.

  • here you go.

    Demo, click mouse- https://dl.dropboxusercontent.com/u/159885981/bounce/index.html.

    capx.- https://dl.dropboxusercontent.com/u/159885981/bounce/bounce.capx

    I'm sure some smart person on the forum could come up with a much simpler way, probably involving a maths formula, but it works ok, play with the values, and you'd have to check performance though.

Ethan's avatar

Ethan

Member since 20 Jun, 2007

None one is following Ethan yet!

Trophy Case

  • Coach One of your tutorials has over 1,000 readers

Progress

17/44
How to earn trophies