R0J0hound's Recent Forum Activity

  • I only looked quickly before. If the object is overlapping a wall then both your overlap events will run since you're not moving the object out of the wall. Consider if the object has a speed of 1 and hits a wall. The first overlap event sets the speed to -3, and the next event will set it back to 1. You don't get the same effect if the object moves to the left since only the second event runs.

    You could possibly solve it with sub events so only one or the other is run, not both. I used "speed" instead of "xacc".

    Sprite: is overlapping wall

    --- speed<0

    --- > add 4 to speed

    --- else

    --- speed>0

    --- > subtract 4 from speed

  • It probably has to do with using the XDir boolean. How about instead just check if Xacc is greater than or less than zero in your overlap events?

  • I think the thing you're looking for is "dt". The reason your movement is jittery is the time per tick varies. "dt" is the length of time of the current frame. You can utilize that to find how far to move. The simple equation is:

    Speed*time=distance

    So dt would be the time.

    For speed you wanted 5 pixels/tick and since there is 60 ticks/sec your speed would be 60*5 or 300 pixels/sec.

    So your action would be:

    Sprite: set X to self.x+300*dt

    Another benefit of using dt is the object will now go the same speed no matter the framerate.

    You could get the same result using a behavior but it can be useful to do it with events. In this case it doesn't really matter either way.

  • Colludium

    Got a plugin for this working. The renderer seemed to be a good challenge.

    It's webgl only and only plays the default Creature animation. Actions/expressions to change the animation, start, stop, animation speed, query bone locations etc could be done later, and actually should be rather easy to add if anyone wants to have a go at it. I guess the next step is to find more exported stuff to test, I could only find one.

  • What is it?

    A beta plugin for the Creature animation tool. See here to for more info about Creature:

    http://creature.kestrelmoon.com/index.html

    Download

    https://dl.dropboxusercontent.com/u/542 ... 2d_0.1.zip

    Example

    https://dl.dropboxusercontent.com/u/542 ... _test.capx

    Usage

    1. Set the texture in the editor

    2. Use ajax to load a creature json

    3. when the ajax is done use the "load creature 2d" to load AJAX.LastData

    Notes

    * This is a webgl only plugin. If webgl isn't available for any reason then you won't see anything. I don't think I'll be making a non-webgl renderer since there isn't a way to make it fast.

    * It only has one texture per object type.

    * It currently only plays the "default" Creature animation. This is the main reason for being beta. More features in this area can be added easily and anyone who wants to add actions to do this is welcome to.

  • Paster will be faster with webgl on, but you'll have to paste objects indavidually. With webgl off canvas and paster will perform the same, but canvas lets you paste an entire layer at a time.

  • Not with a shader. The closest you could do right now is using LittleStain's suggestion and paste everything to that every X seconds.

  • Shaders can change what is seen on screen, but they have nothing to do with how often it's updated.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In that case you could either use the function object idea or maybe just break the equation up and use multiple append text actions.

  • I usually use the debugger to do that but I have used the function object before to display a bunch of values without having to type out a long equation.

    on function "debug"
    repeat function.paramCount times
    

    text: append text function.param(loopindex)&newline[/code:1brc17pe]

    Then it's simple to just use a function call action and add a parameter per value.

  • Another Example

    Here is a another example/experiment that implements the custom rotation points per sprite and the beginnings of some simple object hierarchy (only one level for now).

    /examples31/custom_hotspot.capx

    https://www.dropbox.com/s/n54xuhxmxvizf ... .capx?dl=1

  • If the framerate dips below 10 fps then dt is capped at 0.1 so time passed won't be accurate. Usually you design your game to run much faster than 10fps so that isn't really an issue.

    If you really must have it be correct with a framerate below 10 then you could use the wallclocktime expression.

    Basically add this to the top of your event sheet, and then use mdt in place of dt everywhere else.

    global number mdt=0

    global number prevTime=0

    every tick:

    set mdt to wallclocktime-prevTime

    set prevTime to wallclockTime