Ashley's Recent Forum Activity

  • A waypoint is just a location to move to. If you say 'Move to X, Y' and enter a coordinate the other side of the map, obviously the unit tries to reach that coordinate. If you say 'Add waypoint at <position other side of map>, Add waypoint at <original position>' then the unit goes to both waypoints, in order. It'll go to the other side of the map, then come back to its original position.

    As for units moving over each other - use 'Avoid moving over object' action on start of layout. The RTS basics template has an example of this. Units will negotiate in to a queue and not overlap too much.

    It's not perfect though and I've been planning on improving it, especially since it's annoyingly easy to set up parameters that make them spin around in a dumb way, and you have to tweak the parameters at the moment to get it to work right. Hopefully I can come up with a better engine. It's really tricky stuff though.

  • Well, suppose you want to get the value interpolated at X = 4.7. First you want the integer part and float part (4 and 0.7), which are floor(X) and X - floor(X) respectively.

    The expression lerp(a, b, x) does linear interpolation - so we want to interpolate between the two nearest array entries, floor(X) and floor(X) + 1.

    Which is something like:

    lerp(Array(Floor(X)), Array(Floor(X) + 1), X - floor(X))

  • What have I told you about eating the fungi in your back garden, David?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Scytos, open a crashing file with the XAudio2 object in Construct, and press Debug All instead of Run all. It should (hopefully) report an error via a messagebox. I just remembered the normal preview silently supresses errors - running a Debug will show you the error messages. If you could paste the error, if any, to me here then I can see what might really be wrong!

  • Actually, I just made a small sample myself that plays a XAudio2 object and it crashed. So there's the problem.

    Hmmm... you do have a sound card, right? Does it just crash straight away or does it crash when you try to play a sample?

  • Deadeye, can you send him a version of the game with the XAudio2 object deleted from all layouts and see if that works?

  • No, that's the Construct runtime wrapper message for when something crashes, so you don't get the 'please report this message to Microsoft' message. It could be anything... they definitely have up to date DirectX installs? Did you build it with the latest version of Construct? Does it crash on just Vista/XP/any other specifics?

  • That's a good example, but it's framerate dependent. If you run at twice the framerate, you move twice as quickly towards the scroll location. That might not matter that much for scrolling, but if you want the same thing for important gameplay elements, this is the framerate independent formula:

    lerp(ScrollY, Sprite2.Y, 1 - 0.0001 ^ TimeDelta)

    0.0001 is the number to change for how quickly it goes. Smaller makes it go faster.

  • Replace the collision event with

    + On collision between Ship and Red Square

    -> Ship: set XMov to Ship('XMov') * -1

    -> Ship: set YMov to Ship('YMov') * -1

    I think that's what you want

    Use -0.5 instead of -1 and you'll bounce back with half the velocity you hit it, and so on. Hopefully you can probably work it out from there.

  • Add a small invisible sprite just beneath the player's feet - if that is overlapping the ground, the player must be on the ground.

    To check if the physics behavior has come to rest, check that both the X and Y velocities are close to zero. Mind out that it might not exactly equal zero - it might just have a very small velocity. Have some kind of threshold at which you consider the object at rest, like abs(X Velocity) < 0.01 or something.

  • Really sorry to hear the bad news. Hopefully everything will work out in time.

    You'll always be welcome back here, so no need to worry about us!

  • Hey Ashley, there's a lot of people in my compo thread reporting that the game has no sound and crashes for them during sound-related events. I've asked them to post their OS and specs and stuff. Anything I can tell them that might help in the mean-time?

    Have they definitely got the August 2008 DirectX update? It ought to prompt if they don't have it, but they might be missing some of the files (like XAudio2_2.dll) if they've tried to get around the check by pasting in d3dx9_39.dll to their system directories. Ask them to install the latest DirectX end user runtime.

Ashley's avatar

Ashley

Early Adopter

Member since 21 May, 2007

Twitter
Ashley has 1,431,015 followers

Connect with Ashley

Trophy Case

  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • Forum Mega Brain Made 20,000 posts in the forums
  • x108
    Coach One of your tutorials has over 1,000 readers
  • x62
    Educator One of your tutorials has over 10,000 readers
  • x3
    Teacher One of your tutorials has over 100,000 readers
  • Sensei One of your tutorials has over 1,000,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x36
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

32/44
How to earn trophies

Blogs