R0J0hound's Forum Posts

  • 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

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

  • Aphrodite I like that algo you found there. Inspired I found a way to extend it beyond 32 elements. The idea is to use another array of 1's and 0's instead of just a number, and update the array with a simple function to add 1 in binary.

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

    It looks like counting sums of zero works, but it's also counting the case of none of the numbers added together. That case could be discarded by not using it when loopindex=0.

    Edit:

    Under further tests something seems broken with my capx.

    Edit2:

    Fixed

  • Try Construct 3

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

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

    Effects only work in paster currently. And unfortunately there isn't a simple way to do a coloring effect in just canvas. Also development of both plugins is currently suspended due to time and procrastination on my part, but they are in working order for what they do now.

    leofenix

    Floodfill is a slow operation as it is so it would make sense it would be slower on android.

  • +1 for me as well. I've had situations where it would've been handy to simplify some expressions.

    Construct Classic had it and it's true that it could be done with existing expressions, but the same can be said for lerp, clamp, abs and probably others.

    I also don't agree that it isn't supported everywhere, it can be done in js with just a few comparisons so it would work everywhere. Anyway, it isn't absolutely needed but I imagine it is as easy to add as qarp, cubic and cosp.

  • From the plugin list