R0J0hound's Forum Posts

  • When compiling the runtime you can change the preview exe as well. It's just another configuration. You can choose from "Release" and "Debug" from these configurations:

    APP

    APP_p

    APP_pd

    DX9

    DX9_p

    DX9_pd

    "APP" and "DX9" are the two runtimes. "p" means preview, and "pd" means debug preview. These match the exes in the "Construct Classic\data" folder. Also you may notice exes with a "s" as well. That means with python scripting, which is done by building with "#define python" uncommented and renaming the built exe to have an "s" in it.

    So in the simple case an exported project will use DX9.exe and when previewing DX9_p.exe is used.

  • An event like this should do it:

    start of layout

    red overlaps circle

    for each circle ordered by circle.y ascending

    --- wait loopindex+1

    --- destroy circle

  • You'll have to be more specific with what you mean by momentum. If you use the bullet behavior on the cannonball it will move on it's own. You could use the physics behavior instead to make it be able to interact with other physics objects.

  • It would be nice if images could be managed independent to objects. All objects would then just indicate which image to use at any time. Right now each object type manages it's own images, so each object needs to do it's own frame loading and whatnot.

  • Could be. The layout object is a little dodgy.

  • ghost

    Savvy001

    My graphics card is now blacklisted by all browsers currently. On firefox I can force enable webgl but it causes an immediate error when trying to run a C2 game. Chrome and NW.js no longer let me force enable webgl.

    In short unless I get a new computer I'm unable to do anything with webgl right now.

  • If it fails on that lib then you're trying to build the editor. The runtime is a seperate sln file in the runtime folder of the source as I recall.

  • Mipmaps probably can be safely disabled, it's just to improve image quality when an image is small.

    That profuis lib is only needed for compiling the editor. I don't think Ashley has been ever able to share that file.

    That said you can compile the runtime since it doesn't use profuis. It was built with vs2008, but I've been able to build it with the vs2008 express edition.

  • By "fix" I meant fixing the issue of the angle going to right when the speed is zero.

  • Two ways come to mind.

    1. Draw x, then y objects. Then check all the pixels to see if any of x is still visible.

    2. Subtract the y shapes from the x shape. It's then covered if the resultant shape has no area.

    Both aren't too easy. The first one could be done using the third party canvas object, but it would be slow to check all the pixels, and you'd want to make the objects have only one color.

    The second idea can get rather complex, but it can be made simpler if you limit the objects to unrotated boxes.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, the formulas you used for getting the speed and angle of motion, and the last equation in my post for the animation speed.

    To fix the angle to point to the right when stopped, only set the angle when the speed is greater than zero.

  • 1)

    The paste action draws that object onto the paster object where they overlap. So normally you'd stretch the paster object to cover the screen in the editor, then in events you'd just paste the bullet when you destroy it. It should be that simple.

    2)

    That action is for another purpose and just grabs the texture of the object. To get the points positioned correctly you'll have to calculate the corner positions.

  • So just to clarify you have an animation of a 3d ball rolling and you want it to be syncronized with the motion of the ball?

    In the simple case of having an animation of the ball rolling to the right you can set the angle to be the same as the angle of motion as you have above.

    The second thing to do is correlate the animation speed with the speed of the object's motion.

    So depending on the number of frames you can find the time for a full rotation with:

    Time_for_full_rotation=num_frames/animation_speed

    So we can the find angular speed with:

    Time_for_full_rotation*angular_speed=360

    Which then solves to:

    Angular_speed=Animation_speed*360/num_frames

    You can then relate linear speed to rotations with:

    Speed=radius*anglular_speed*pi/180

    Then combining the two:

    Speed=radius*animation_speed*2*pi/num_frames

    And solving for animation speed we get our formula:

    Animation speed=Speed*num_frames/(radius*2*pi)

    Speed can be calculated as you have.

    Radius is half the width of the ball.

  • Two colors would make an interesting art style. This game does it and it looks pretty cool:

    http://dukope.itch.io/return-of-the-obra-dinn

  • smk

    Thanks for the detailed write up. I always enjoy reading about that kind of low level stuff, and I could only gather so much from skimmed through the source. To post links, I've seen newcomers putting then inside

     tags and the forum doesn't erase them.
    
    @spongehammer
    @Logomachine
    I was toying with a way to access pixels to see how fast it could be from construct and here's a working test:
    [url=https://dl.dropboxusercontent.com/u/5426011/examples28/imageData.capx]https://dl.dropboxusercontent.com/u/542 ... eData.capx[/url]
    It's fast but only when using js.
    With a 160x120 image, updating all the pixels took an average of 12 ms on my machine.  For 60fps that plus everything else needs to be 16ms or less.
    The event system on the other hand was way to slow to loop over the pixels.  I actually just looped over a 160x120 array to set each xy to a random number and got an average of [b]230 ms[/b].