R0J0hound's Recent Forum Activity

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 157 followers

Connect with R0J0hound