R0J0hound's Recent Forum Activity

  • For one object you could save it's x,y,angle, etc every frame to an array, then play it back.

    Something like this:

    You could do the same for multiple objects.

    Another idea would be to save the player inputs and play those back. Unfortunately that is tricky to get a perfect replay with since the varying dt will get the timing off quick. It is possible though with a carefully designed game. It may not even matter in the long run as it would give some variation in the long run.

  • You can look at the manual here:

    https://www.scirra.com/manual/66/projects

    1. You can change the "window size" to change the pixel size, and if you set the "full screen in browser" to "letterbox scale integer" which will keep it scaled by a 2x, 3x, 4x... amount depending on the the actual window size.

    2. As above the "full screen in browser" option will help there.

    3. I think this is the snap to grid option on the view tab:

    https://www.scirra.com/manual/38/ribbon

    4 no idea of the context of this question.

  • An array would work well to have a value for each tile. Just make it's size the same as the tilemap's number of tiles, horizontal and vertical. To find if a certain tile is touched you can use the expressions in the tilemap to convert the touch's x and y to a column and row.

  • Try using the "force own texture" layer setting.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The box2d one is per object, whereas the chipmunk one applies to everything. You can replicate per object with a force proportionate to the object's speed and in the opposite direction.

  • Add a sprite to use as a line, and make it's origin centered on the left. Also make it's height 4 or something, that will be the line thickness. Name the sprite "line".

    Then you can use the qarp() expression to do the curve and you could do this:

    global number px=0

    global number py=0

    every tick

    --- line: destroy

    --- set px to start.x

    --- set py to start.y

    repeat 100 times

    --- create line at (qarp(start.x, (start.x+end.x)/2, end.x, (loopindex+1)/100), qarp(start.y, (start.y+end.y)/2+200, end.y, (loopindex+1)/100)

    --- line: set angle toward (px,py)

    --- line: set width to distance(self.x,self.y,px,py)

    --- set px to line.x

    --- set py to line.y

  • I'm on my cell so I can't write a whole lot but:

    1.

    All the old lines are destroyed, and new ones are created every tick.

    2.

    It's done every tick Regaudless.

    Another thought, the variable I had "px" is short for previousX instead of playerX. It better represents what they do. Also the every tick event relates more with event 6 so I had it right above it as I recall.

    In events 4 and 5 the corner that is being added or removed aren't the ones being compared with the distance.

    In event 6 it's looping from the corner that was last added to the one that was first added. I went that way so I could set px before the loop started. So the lines would be created between the locations player,corner,corner...

    I can maybe make up a picture to explain all of it better.

    Edit:

    The motion bit would be best done manually I think. The physics or any of the behaviors aren't really suited for it.

  • Guess I'll cross post this:

    If you have a list of tiles that you don't want to be solid, you can copy the tilemap and remove those tiles when the game runs.

  • Ok, here's an example. Just set toErase to a list of tiles that are decoration.

    The tile numbers are numbered like this:

     0  1  2
     3  4  5
     6  7  8
     9 10 11[/code:rdxv0r8t]
    
    [url=https://dl.dropboxusercontent.com/u/5426011/examples31/partial_solid_tilemap.capx]https://dl.dropboxusercontent.com/u/542 ... lemap.capx[/url]
  • Yeah, that's not an error. Hmm, It's puzzling why the window doesn't show.

  • Here's a capx of the idea:

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

    The movement still needs improving.

  • My reasons for writing a plugin/behavior are these:

    1. Adding a feature that events can't do.

    My paster/canvas plugins are an example of that. They add the ability to draw to a texture which isn't possible otherwise. I think another one was a spritesheet plugin.

    2. Interfacing with some existing JavaScript library or code.

    This kind of blends with one sometimes. Examples include the chipmunk behavior and the peerjs plugin.

    3. Speed improvements.

    The only example I had for this is my isometric behavior. I had it working with just events, but since it had multiple nested loops it wasn't very fast. Actually I think the sorting algorithm was O(n^3) worst case. There is some overhead with the event system so converting to js allowed me to sort 3x as many objects and still not affect the framerate.

    Other than that I'd avoid doing it for something specific to one project. Others do it, but for me it's more tedious.

    I'd recommend playing around with the sdk yourself though, it's fairly easy. I'm not sure it would be simpler to make your idea with a plugin than events though.