R0J0hound's Forum Posts

  • It was just an idea. No need to switch, and using a guid would be better if you run multiple games.

  • Actually the object's uids will be the same on any computer you run the exported project on. You can easily test this. The only fuzzy part I guess would be if you create any objects at runtime, but even then if you ensure you create the objects in the same order then they would be the same.

    The values for the uid are very predicable too. The first object has a uid of 0, the second: 1, and so on.

    My point is a guid sounds unnecessary.

  • You could do it like this. The first event moves the objects and the second corrects overshoot. Another option could be to use the MoveTo behavior.

    global number toMove=20

    global number speed=100

    toMove>0

    --- sprite: set y to self.y + speed*dt

    --- subtract speed*dt from toMove

    toMove<0

    --- sprite: set yo to self.y +toMove

    --- set toMove to 0

  • There have been simulation games, and I guess using the physics behavior is a simulation. I have no idea what a pure simulation game is though.

  • If you add the "pin" behavior to the particles and position the particles object on top of the sprite in the editor, you can then add a "start of layout" event to your event sheet and add a action to pin the particles to the sprite. Then from that point on the particles will go wherever the sprite goes.

    https://www.scirra.com/manual/99/pin

  • The examples look impressive and all, but that's due to clever coders. The library itself is just a cleaner interface to draw stuff rather than using the html5 canvas interface. It would be a nice alternative to C2 to make a html project if you like scripting, but putting it inside C2 would be clunky to use imo.

    You can already draw curves with the canvas plugin if that's what you're after. I don't see anything in this library that makes that any easier.

    To make it work with C2's collision and physics system the curves would need to be converted to polygons. Doable but probably not the fastest considering C2 prefers you to use collision polygons with 8 or less points.

  • Yes.

  • Point2.x=dist*cos(ang) +point1.x

    Point2.y=dist*sin(ang) +point1.y

  • You could do it with a layer. Set it's property "force own texture" to true, then place all your obsticle objects on it to build up the terrain. They just need to be a solid color and you build up a complex terrain by placing a bunch of simpler shapes. Then to finish it off add your tiledbg to the layer, make sure it's the top object in the layer and set it's blend mode to "source in".

  • I don't have access to C2 atm but the reason a pinned object is lagging behind the object it's pinned to is a order issue. Generally you don't have much control over it. You could try to change the order of the behaviors in the object. As I recall the pin behavior is run after the other behaviors so rearranging may not do anything.

    Anyways my solution of choice would be to position objects with events instead of using the pin behavior. This gives you full control of what happens. There are a few ways to do this. This simplest is to add imagepoints on the parent object that you'd position the child objects to. Another is to store the X,y or angle,distance offsets from the parent object.

  • [quote:2rzyicbc]If that is the case how do I go comparing a value that has *dt to a value that doesn't have *dt?

    For example:

    If Speed>100*dt

    Using dt there doesn't make sense. Speed should be the same regardless of dt. With that if the fps is 60 the comparison is speed<1.66, but if the fps drops to 50 then it will be speed<2.

    "dt" should only be used where it's needed, and it's only needed in cases where you want to know how much a value will change in a length of time if it's going at a certain rate. Or more simply in equation form:

    rate*time = amount

    Some examples:

    You want a object to move 100 pixels per second:

    x = x+ 100*dt

    you want an object to rotate 30 degrees per second:

    angle= angle+ 30*dt

    you want a speed to accelerate by 10 pixels/sec^2.

    speed = speed + 10*dt

  • [quote:2ywusg04]EDIT: I've figured out, when you don't have 1 pixel blank space on your sprite this will happen.

    Sounds like texture bleeding from the exported spritesheet. It's a pretty common thing with graphics rendering on computers, and a one pixel border is usually the best solution.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 1.

    The pixi.js renderer on the github repository was the most helpful in making the renderer work. As far as I understand it is as long as you choose the json export you can load it with this plugin.

    2.

    The way it works is the animations need to be loaded and then it's a simple matter of setting the animation. When I get around to it it can be made to load all the animations from a file and then the current animation, speed of animation and position in the animation can be changed.

    3.

    "CreatureMeshBone.js" is the meat of the plugin, which made it fairly easy to get working. It does have a feature to blend from one animation to another and you can specify the blend factor from 0 to 1, where 0 is the first animation and 1 would be the second. Any value in between like 0.5 would be a blend of the two. When I get around to it I can implement it, but it would be nice to have an example with more than one animation to test.

    4.

    It is, I just forgot to uncomment a line in the code. Not sure if the result is very pleasing to the eye.

    The loading jank is kind of unavoidable, not sure if I can make it asynchronous, but it would be an idea to explore.

  • locohost

    yep.

  • MrShortee

    Good to know. Fixed.