R0J0hound's Forum Posts

  • There is a "set stepping iterations" action of the physics behavior that you could try to fiddle with to reduce the accuracy but increase the speed of the physics simulation.

  • tgeorgemihai

    Paster is faster than Canvas when using webgl, and yes it should be possible to use Paster in the same way as Canvas in that example.

  • No, it just means it works with webgl as previously it didn't. Internally it still uses a standard canvas and copy's to a webgl texture whenever it's changed. Paster should be faster with webgl since it doesn't do any image copying. Also if webgl is turned off speeds will be about the same.

  • Do a search for "falling sand", there are a few topics on it and i believe I've made a capx example of it. The physics is even simpler than verlet, for instance to fall each particle just checks if the space below it is free before moving one space down.

    That being said, it's going to be rather slow unless done with the you with shaders like qwazi's cc example. The paster object could help since you can paste objects with effects applied. But there's likely other details to deal with.

  • This book here has a chapter on it that explains it pretty well as I recall.

    http://www.drdobbs.com/parallel/graphic ... /184404919

    The idea basically is to find a y position for each x position. It can be done with the equation of a line.

    Y=m*x+b

    Bresenham's algo differs in that it does it with no divisions among other things.

    I haven't looked at it in a while but the implementation details are a big part of it.

  • I don't know what you've tried but for a text file you'd "request project file" with AJAX and then use "write file" "on completed". But it doesn't work with binary files like png's for instance.

    A png file can be saved but it won't open as a png file. I looked in the contents of the saved file and by comparing it with the original png file it appears to be encoded as a different codepage since it's being treated as text. So in short "invoke download" is the only built in option to get a png project file to save to the hard drive. Although presumably there may be some unexposed node-webkit function that works with binary files.

  • I think the expression you wanted to do was:

    atan(velY/velX) = a

    But it will have issues with pos/neg in some quadrants, but fortunately you can just do this:

    angle(0,0,velX,velY)

  • Ah, I see the issue, Particles and probably shadows aren't drawn if they are off screen. No ETA on a fix though.

  • Particles and shadows paste fine here.

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

  • Cosp() gives a bit of ease in/out. It's not too visible in the example since the transition is only a second long. Here are value vs time graphs of lerp and cosp.

    I also updated the example capx to do the transition in three seconds instead of two.

  • Found the topic about the meaning, It was kind of old so I worked my way from the last results back to find it.

  • All that can be concluded is an example of such a game hasn't been made yet, not that it can't be done.

  • Had no idea what Paper Toss Game was until a few moments ago. Apparently I'm pretty bad at it...

    It is a 3d game so it's harder to do as it will require math to pull off, not impossible but certainly not the best candidate for a first game especially since C2 is geared for 2d games.

    First see if you can make the game in only 2d as a side view and then a top view. The bullet behavior can be used in both cases. For the 3rd dimension you'll need to use a variable to keep track of and adjust the Z position or distance into the screen and change the paper wad's scale based on that. There is a tutorial on psuedo 3d that may help with some of the math as well.

  • My graphics card locks up with that effect so I can't open the capx, but an event like this should work well to make each ColorBox have a different color.

    For each ColorBox ordered by random(1)

    ---Set effect "AdjustHSL" parameter 0 to loopindex*100/15

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok, found the issue. I was looping with width^2 instead of 2^width. Now it gives all results. The bits array works much like getbit but can use many more than just 32 bits. Other than that it works the same way as yours.

    Edit:

    While it's true that you can bypass the getbit expression to access some more bits you'll run into issues once you exceed the number of significant digits in floating point numbers.