Ethan's Recent Forum Activity

  • So your wanting to sort them based on the stored value. I see your point now.

  • They don't need to be sorted because they're named unlike arrays which require an order/position. If you want to sort them you could add a number to their name and use a normal for each loop and get them like that, otherwise why not use an array to begin with?

    (not actual code)

    add key "item0" set value whatever.

    add key "item1" set value whatever….

    for "sort" from 0 to key count

    Dictionary.Get("item"&loopindex("sort")) and do whatever.

  • A flood fill would also be great for if you've already laid out an irregular shaped block of the same tiles and you want to change them quickly.

  • League of Avenging Nations is an xcom type game only without the tactical turn base gameplay (this aspect will take place in a different form), instead its much more heavily involved in resource management, researching and base building, and it will involve politics between the nations.

    This version is a prototype. It includes:

    * Toroidal playing field. (the map loops or wraps in all directions so it appears to not have an edge).

    * Map drag and scroll.

    * UFO creation and movements. This was quite puzzling because the map is made up of small sectors which reposition themselves which meant using coordinates was difficult, so i decided to base them on angles and distances.

    I've noticed at high speeds i get the occasional lag or juddering. I'm not sure if it's because i use dt, or if it's the way i'm going about movements in general.

    As you can see in the image i'm using loops set by the ufo speed and moving small increments, this is because when a UFO crosses from one sectors edge to another i need to reposition it as the UFO is always "pinned" to that sector so when the sector repositions the UFOs position stays relative. If anyone thinks this is a bad idea or has any other suggestions i'd love to hear them.

    * Zoom in and out of map. Eventually each zoom level will display different information, for example zoom out will show the countries borders and names, zoom in closer will show the terrain types and max zoom will show details like city names and populations and other resource data etc.

    * Time management. Stop, play or speed up game play.

    * Lock on to a UFO and follow it about the map.

    I'd appreciate any feedback.

    link removed, see below post for latest version.

    Left click and drag mouse to scroll or press one the keys show bellow.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's been asked many times, twice by me. I don't know why it's left out, probably not a priority. rexrainbow's function object allows it though.

  • How do i get the width and height size of the viewable screen area?

    The viewport expressions work fine until i change the scale size of the layer from 1.0, zooming out works correctly like 0.5 but zooming in causes the trouble like 2.0 seems to return a much bigger value even though it's still less then the size at 1.0.

    I have integer letterbox scaling enabled.

    Thanks.

  • Questions like these are so dumb. Really what answer do you expect? You will make exactly $453.50.

    The amount you can make depends on your skills, talents, resourcefulness, determination and luck.

  • harrio i didn't dislike it, just didn't like it as much as i thought i would. I guess my expectations were too high. It's the first time i've discussed the film here and i wasn't aware how others had received it or any negative press it might of gotten. Theres nothing wrong with a philosophical movie but for me it doesn't excuse fundamental plot flaws.

    You might well think i'm missing the point of the movie but I try not to be so deep when thinking about them, generally after i've seen a movie i ask myself would i watch it again, the answer here is maybe, if it was on the tv one sunday night and i was flicking through the channels and it happened to be on.

  • I'm a big sci-fi fan so i thought i'd enjoy it more than i actually did. Whilst i did like it i thought it was way too drawn out (could have been edited to half the length) and tried too hard to be 2001 space odyssey.

    Also don't know if it was the cinema or the film but a lot of the time i couldn't hear the dialogue for the music and main actor has a thick accent any way which made it harder.

    Lastly i don't get why they had to actually leave the Earth, it's not like it was about to explode, they could have built sealed shelters or domes on the ground and controlled the environment the same as in a space station, instead they opted to settle on a world super close to giant blackhole because they couldn't figure out the formula to control gravity or something so they could get their ship off the ground.

    Still better than the disappointing Prometheus and makes a change from a comic book movie.

  • Brilliant as always, thanks for your help.

  • I don't expect its harder than any other programming language. What your describing is called "finite state machines", try searching for it on google in relation to games.

    https://www.scirra.com/tutorials/1139/how-to-simplify-your-ai-code-with-finite-state-machines

  • How do i get the difference between 2 angles both clockwise and counterclockwise?

    I want to compare the 2 to test if it's quicker to rotate an object left or right from its current angle to its target angle in degrees.

    I thought you could negate the anglediff expression but it still only calculates the shortest difference.

    Thanks.

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