tulamide's Recent Forum Activity

  • Very Nice tulamide!

    Thank you

    Feedback is always appreciated, and approval more than ever.

  • Yeah, now that you mention this. The game could be just bundled with the needed version of DirectX like the Construct Installer. It's not really necessary for Construct to have the newest version of DirectX. Right?

    But that's exactly what you would do with NSIS. I don't see, why it is ignored? It creates an installer and you can package it with whatever is needed...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't think this is necessary nor should it be forced. Almost every professional application or game comes with an installer not the game just zipped or something.

    You should set up an installer packaged with DirectX to distribute your games. There are a few installer creators out there, the best known open source is the one from nullsoft I think.

    Nullsoft Scriptable Install System

  • I cant open it it says that the unknown error occurred while accessing an unnamed file.

    That's why I told you the version it was created with. You seem to have v0.99.62 installed, but the cap only works with the newer version 0.99.84. Just download this newer version and install it to a seperate folder, both version may co-exist without problems.

    Link to version .84 thread

  • How can I insert into a Construct?

    The example is a .cap file, the native Construct format. Just open it within Construct (or doubleclick the file in the explorer)

    Made with version .84

  • Here is an example.

    It is a analog watch with a digital display too. Makes use of the date object, and various sprites for animating both watch types.

    Download

  • I've done another cap, showing three different movements. Maybe it is of help. Covers only the basics of course, there are way to many possibilities to get sprites moved

    Download here (.84 used)

  • + Every Tick

    > Add 500 * TimeDelta to 'Y Speed' (the acceleration)

    > Set Y to .Y + 'Y Speed' * TimeDelta (the speed)

    That there is from the Timedelta article, is it not multiplying by Timedelta twice?

    We are talking about different approaches here. In your example it was all about a constant movement, whereas the above example generates a variable (accelerating) movement. The latter is what I wanted to show with the simplified comparison of your approach and mine a few posts above.

    Remember the formula?

    AmountPerTick = TimeDelta * DesiredAmountPerSecond

    If DesiredAmountPerSecond is a constant value you only apply TimeDelta once. If you want it to change over time, you force another TimeDelta calculation. Let's say, DesiredAmountPerSecond shall raise by a constant value per second, then the formula is:

    DesiredAmountPerSecond = DesiredAmountPerSecond + TimeDelta * DesiredRaisePerSecond

    putting this into the first formula:

    AmountPerTick = TimeDelta * (DesiredAmountPerSecond + TimeDelta * DesiredRaisePerSecond)

    This can be stacked endlessly. Maybe DesiredRaisePerSecond shall lower over time. That would be:

    DesiredRaisePerSecond = DesiredRaisePerSecond - TimeDelta * DesiredLoweringPerSecond

    putting this into the first formula:

    AmountPerTick = TimeDelta * (DesiredAmountPerSecond + TimeDelta * (DesiredRaisePerSecond - TimeDelta * DesiredLoweringPerSecond))

    There are easier ways for acceleration or deceleration or smoothing, etc., this is just to show the "straight forwardness" of using TimeDelta

  • If that number is a private variable or some such, you still need the TimeDelta! It makes no difference if that number is hard-coded or a variable, you'd still need to do it like this:

    Set X to .X + Object('Speed') * TimeDelta

    Don't confuse him. In his example, that was not the problem. TimeDelta was already taken account of and stored within the variable ("Add 1*TimeDelta to 'Move'"). If he would now multiply it with TimeDelta again, he would get wrong results...

  • Say i have :

    (Always - Add 1 to "Move")

    The game is running at 1000fps, so that after a second "Move" would be 1000 right?

    Correct.

    So i would need to "Timedelta" it.

    (Always - Add 1*Timedelta to "Move")

    So here, it is adding 1/1000 every 1/1000 of a second, so it would equal 1?

    Yes, if Construct can work reliably in only one millisecond

    And now i want something to move based on this value

    (Always - Set position of "Object" to "Object.X" + "Object value('Move')")

    Do i need to add Timedelta into this line?

    It depends on what you want to achieve. If you want the object to move 1 pixel per second, then you are doing it wrong. The correct line for this would be:

    Always - Set position of "Object" to "Object.X" + TimeDelta

    This way, the object is moved one pixel per second, no matter what the current frame rate is.

    Let us make an easier example to see, why your approach is going wrong.

    TimeDelta always equals 10

    object.x is 0 at start

    We want object.x to move by 10 every tick

    First tick

    You are adding 10 to move. move = 10

    a) You are adding move to object.x. object.x = 10

    b) I am adding TimeDelta to object.x. object.x = 10

    Second tick

    You are adding 10 to move. move = 20

    a) You are adding move to object.x. object.x = 30

    b) I am adding TimeDelta to object.x. object.x = 20

    Third tick

    You are adding 10 to move. move = 30

    a) You are adding move to object.x. object.x = 60

    b) I am adding TimeDelta to object.x. object.x = 30

    See?

    You could instead of adding to .x just replace .x with 'move'. That's the equivalent to my line of code. So:

    Always - Set position of "Object" to "Object.X" + TimeDelta

    and

    Always - Set position of "Object" to "Object value('Move')"

    are the same in your example

    "To represent the evolving cast time of a spell that lasts 2 seconds (2 seconds being 100%) you'd use TimeDelta * 50"

    I only just realised that it is being multiplied by a % in this line, I get the concept, but i don't know how you would actually create this situation.

    I've setup a simple cap showing this in action. That's the most easiest way I think.

    Example (done with .84)

  • There is not much to TimeDelta. It isn't really complicated.

    The game time advances in ticks. A tick is a slot, giving you the chance to compute things (using ACE).

    The duration of a tick is of a variable time, because sometimes there is much to do for Construct, sometimes not.

    TimeDelta is the duration of one tick. If you add all TimeDeltas from every tick, the all sum up to 1 per second. So TimeDelta is a fraction of a second.

    To alter things over time, you just use the following formula in every tick:

    AmountPerTick = TimeDelta * DesiredAmountPerSecond

    To move a sprite 75 pixels per second you'd use TimeDelta * 75

    To turn a sprite 87� per second you'd use TimeDelta * 87

    To represent the evolving cast time of a spell that lasts 2 seconds (2 seconds being 100%) you'd use TimeDelta * 50

    and so on

  • Just as an addition to UberLou:

    You indeed have to implement your own sorting algorithm. Also keep in mind that arrays are 1-based, not 0-based. To setup a twodimensional array of 5x5 you would use 5x5x1 not 5x5x0!

tulamide's avatar

tulamide

Member since 11 Sep, 2009

Twitter
tulamide has 3 followers

Trophy Case

  • 15-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

17/44
How to earn trophies