R0J0hound's Forum Posts

  • The color filter by default is white so adding to white will just clamp to white and do nothing. If you initially set the color filter to blue then adding will have an effect.

  • Hmm, even I had a bit of trouble finding the C2 example I made of 2d minecraft-like water. Here it is:

    http://www.scirra.com/forum/what-is-the-attributes-counterpart-in-construct-2_topic79372_post470236.html#470236

    Not the easiest to follow but basically all the water motion is done by checking the contents of grid positions around each water square.

    I started with something simple like this:

    If space below water is empty

    then add a new water below.

    To further extend it if a wall is below the water then new water is added to the left and right if the spaces are empty. Next to make areas fill up with water I treated water the same as a wall if the water had a wall to it's left, right and bottom. The water shares this info to water left and right. The final step I did was to have the water drain if walls were removed. It isn't 100% perfect but it's good enough.

    EDIT:

    Hey the capx in the topic was even in reply to RookieDev.

    Is terraria water that different? I've never played it.

  • That's solvable completely without the canvas plugin. Search for "laser" and you should find a few examples of making a laser that stops when hitting another object.

    Here's one:

    http://www.scirra.com/forum/laser-collision-point_topic44892.html, there are others.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • On a side not C2's runtime will only redraw the screen if something visually changes. So you can carefully setup your events so things only change every 1/30 seconds. Of course as jayderyu mentioned it wouldn't really work with behaviors.

    EDIT:

    To add on to Arima's method you can use events like this:

    Every 1/30 seconds

    • make all layers visible

    Else

    • make all layers invisible
  • newt

    That would look cool, I'll have tinker around with Spriter one of these days.

    irina

    Yes I've seen it. It's approach is similar to what I'm doing in some ways It's even a bit faster since it's all js, however it would be very time consuming to integrate it into a plugin.

    New update: Now boxes match the rotation of the ground sprites on layer 1, also events were cleaned up a bit and an improved perspective transform is now used. Also the rotate function can now rotate around an arbitrary point.

    /examples21/paster_3d_5.capx

    https://www.dropbox.com/s/u0evx030ayn7x ... .capx?dl=1

  • Opps, that post I quoted was wrong. Just fixed it. For your capx the correct equation would be:

    Array.At(0, 0, (int(mouse.y)*Canvas.Width + int(mouse.x))*4 + 0)

    It would be more intuitive like you said, but I was going for it being as fast as possible when I did it and haven't gotten around to a correct fix.

  • [quote:3vz1xzae]NOT user friendly

    No arguments there. It could stand for better organization, and clean up of the events. It's more or less a proof of concept that isn't complete. Not to mention I'm ironing out ideas on a balance between usefulness and ease of use as I go.

    [quote:3vz1xzae]this is totaly unusable at this point!

    For the iphone. It's running quite fast on the desktop for me. There are a few things I could do to speed things up such as making the face objects invisible, but the main reason for the slowdown is safari doesn't have webgl so canvas2d is used.

    Here's the latest wip. Textures now mach the textures of the objects on layer 1, although to do it I copied the textures in two places which isn't very efficient if you want to change them later.

    /examples21/paster_3d_3.capx

    https://www.dropbox.com/s/z85mueru5uwmn ... .capx?dl=1

  • You can make it ease in if you replace the actions in your last event with:

    Camera: Rotate 100/anglediff(Camera.Angle, Pointers.Angle) degrees toward Pointer.Angle

    System: Set layout angle to Camera.Angle+90

    But then the rotation has a jarring stop instead of a jarring start. You could also use clamp to cap the maximum speed to reduce the jarring.

  • I looked into it and for now I'll leave it as is. Both .AsJSON expressions are using the expression I added and the default one that C2 added is not accessible for now.

    For .ASJSON's use I explained it pretty well here:

    http://www.scirra.com/forum/using-pixel-colors-as-reference-for-level-layouts_topic57020_post355255.html?KW=AsJSON#355255

  • Yeah the torrent is often slow due to the low amount of people sharing. I also have issues with the normal download failing as well. It succeeds eventually though.

  • Sure, go ahead.

  • Wouldn't an inverted "is touching inventory_menu" work as a replacement for that condition? The idea of the event is to stop dragging if the first click is just on the invisible part of the scroll_pane. You could just remove the event if worse comes to worst.

  • Lerp isn't actually for easing, it's for getting a position between two points. But I get what you're saying and my guess is you're using keep in an event like this.

    Every tick

    ---Sprite: set x to lerp(self.x, 100, 0.5)

    Which gives the effect of moving fast to slow. What it's doing is just moving half the distance per frame.

    You'll need to add a variable for a reverse effect.

    To start it set the variable to say o.

    Set speed to 0

    Then every tick set a new x and increase the speed

    Every tick

    --- set x to min(self.x + speed, 100)

    --- add 1 to speed

    The min() is to keep from overshooting. Also note this only works for a positive direction. For a negative direction do this:

    Every tick

    --- set x to max(self.x - speed, -100)

    --- subtract 1 from speed

    Also you can fix it up to use dt so it behaves the same regardless of the framerate.

  • Arima

    That does sound like something is broken with it. I'll try to get it working in a day or so.

  • Here's a further extension of the capx that does a 3d platformer like the op.

    It's rather cluttered but here's an incomplete list of what was done:

    z-sorting, shading, improved obj loader, multiple object loading, transformations on individual objects.

    https://www.dropbox.com/s/nwuqaz6xm9gjp ... .capx?dl=1

    /examples21/paster_3d_2.capx

    jayderyu

    With c2's renderer quads are drawn with affine transformations so I can't do perspective correct texture mapping, or at least not easy. One way to reduce it is use more smaller polygons.