tulamide's Forum Posts

  • 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!

  • Maybe you just weren't very attentive. In the layer tab, the layers are listed. Left to the layer preview there are 2 small icons and a number. The number is the layer number, tick the eye-icon to hide/show the layer and tick the lock-icon to lock/unlock the layer

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hmm, here are the facts that get totally ignored about UDK and Unity.

    When you download the free UDK you get:

    • UDK (there is only one version, everything is in it, do what you like with it)

    When you download the free Unity you get:

    • No Render-To-Texture effects (for example there is only one standardized water shader, the full tweakable [realtime reflections, etc.] water shader comes only with Unity Pro)
    • No fullscreen post-processing effects (so no Blur, Color Correction, Contrast, Glow, Motion Blur, Sepia, Twirl, etc., they ship with Unity Pro)
    • No realtime shadows (!!!)
    • No video playback and streaming (!!!)
    • A Unity Splashscreen / Watermark in your work

    (The list is incomplete, as the other points are not of interest to most indies)

    One should mention this...

  • You can get around the else sub-event issue by using a function call.

    Yes, that is one workaround. There are others, too. And it proves that the event system is flexible enough. But shouldn't it be unnecessary to find workarounds? It's the core of Construct, it should get more attention, I think.

  • Independance 2.5.3

    A sampler for your audio environment. Completely free even for commercial use. Comes with a 2.5 GB sample library (very nice natural sounding electric guitars inclusive). Run standalone, VST, AU, RTAS. I experienced a few glitches but overall a wonderful sampler.

    E-mu Proteus VX

    Nice sample based instrument with a wide variety of sounds for almost any need. Completely free.

    DarkWave Studio

    A simple DAW offering 8 tracks and VST/VSTi support. GPL licensed. Uses the older pattern based principles, modders should have no problems handling it. Outputs .wav only, but that's no big deal as there are tons of converters out there.

    Macaw

    Just saw this one but never tried it. VST/VSTi support, exports to mp3 or ogg. MIT licence (open source, completely free)

  • May I asked how it is decided which bugs get fixed first? The reason I'm asking is, that I would assume fixing bugs related to the editor (ACE) should have high priority, as it is the only tool to get things done (if not using python).

    I wanted to post a bug to the tracker but found it already posted on the tracker one year ago, still open. It's the 'else'-bug ('else' not working when subevents are added). I think this is important to work. Without it you can't nest the conditions enough in many cases.

    There are other open bugs with 'or', 'while' and some expressions, and they all are open for a year now. Shouldn't they get more attention, so close to v1.0?

    Again, I'm not asking this to aggravate, it's just that I think ACE should work reliably before anything else.

  • It seems that the sprites are created at the end of the frame or the beginning of the next frame. However, just update the count value the next frame. In your cap file this could be done for example by adding a global variable.

    Is global variable 'SomeName' equal to 1

    +[do the update]

    +System: Set global variable 'SomeName' to 0

    On Go clicked

    +System: Set global variable 'SomeName' to 1

    >For ...

    >(the expression from trigger once goes to [do the update], the event must be deleted here)

    But pay attention to the order, because if you place "Is global..." after "On Go..." it would be called in the same frame, and you would have the wrong count again

  • There's more involved, but to keep it simple and imaginable:

    Think of the screen as a canvas. This canvas is stored in the vram and doesn't change (unless you switch resolution, where everything is rearranged, but let's forget about it now). Now everything is drawn to that one canvas.

    Let's say, that canvas is 1280x720. Whatever you draw now is clipped to that extend. A 20000x20000 image will only take up 1280x720. It's the same as using a paint program. You set up a canvas and draw to it, and nothing will be drawn outside that canvas.

    BUT, the sources need to be placed in vram, too. So, if you place an image with 128x128, it will consume exactly the space needed for 128x128, no matter how large you draw it to the output canvas. The same applies if you draw it smaller. It will still consume the space for 128x128, because the source doesn't change at all.

    It's a bit different with vertex data. These are also stored in vram. But they don't use much space. Again to keep it simple, let's forget about finer details. There are 3 informations per vertex point (x, y, z) Even if they were of double precision, they would only need 24 bytes per point. A sprite with 10x10 vertex points would consume ~0.002 mb (with single precision it would be 0.001 mb). Of course there are overheads, but basically that's it. Calculating the points (distorting the source image while drawing to the output canvas) is a concern, as it takes more gp time than just drawing the source image.

    Of course, this is a simplified image of what is really going on, but this makes it easier to understand, I think.

  • The inventor of Copy and paste is rolling in his grave.

    Actually, he won't! He is still alive

    http://en.wikipedia.org/wiki/Cut,_copy,_and_paste

  • save the external file which is of same size of the sprite and and saved it in .gif format(i suppose it is the only format which can have animation) and used the condition you circled in pic and the path as

    apppath & "pic.gif" but it didn't work

    It didn't work because this is not the way to import animations. Look closely at the action. It says: Load animation frame from file. What you have to do is split your animation to as many images as needed and then load them one by one. Also, you are using the wrong image format. Supported format are listed here

    EDIT: Damn, too slow again

  • The main things with supporting file formats is:

    1) Is it free to use non commercially?

    2) Is there an easy to use free programming API for it?

    I don't know for sure but I suspect neither is true for MP4 - I don't think I've seen any libraries that support it, other than Directshow with a special filter installed. Do you know any libraries that we could use?

    I'm not sure, but isn't this something you could use?

    Bento4 portable MP4 file format library

    EDIT: Here is another one, I found it by following the hint in this forum thread:

    mp4v2

  • > Does VRAM refresh for individual layouts? If so, with backgrounds using ~12mb per screen, I could get away with using high-res textures providing I use individual layouts for every screen of the game. Doing so would be a logisitcal pain in the ass, but should keep the VRAM of each layout down to a usable amount.

    >

    This is the technique I've used before (but not yet with Construct) so I am interested to hear if non-global objects are dumped from memory or not. I would imagine they are.

    Under Application/Runtime Properties you specify wether to load textures per layout or on application start. This option ("Load Textures") is explained with: "Specify when object textures are loaded in to VRAM".

    Unless this option lacks functionality one would assume that it does exactly what you are asking, when set to "per layout". It would not make much sense, if they are loaded per layout but kept there when loading another layout. And tests I made show that VRAM is cleaned when switching between layouts. At least with the .62 version I'm still using.

  • I'm not sure that that helps - I want to define an action in the exact moment when I release a button.

    That shouldn't be hard to implement. You just save the current state you're interested in. I haven't worked with control state, but I don't see, why it shouldn't work:

    Start of layout

    ->SomeVar = "Released"

    System: MouseKeyboard.ControlState("Move Left", 1) Equal to 1

    SomeVar Equal to "Released"

    ->SomeVar = "Pressed"

    System: MouseKeyboard.ControlState("Move Left", 1) Equal to 0

    SomeVar Equal to "Pressed"

    ->SomeVar = "Released"

    ->do stuff

    (Maybe 'trigger once' will do as well instead)