R0J0hound's Forum Posts

  • Hi Kicks and kayin,

    I missed this topic.

    You'll need the full version of the profuis lib to be able to build the ide. Jayjay while I can build the ide I have one issue that I can't solve that makes the builds unusable, namely comboboxes don't work.

    As for the second question the runtime exes have the game data inserted as a resource when CC exports.

  • Off hand you could try the rotate method I used in this topic.

    scirra.com/forum/resize-handles-example_topic54023_post378368.html

    There may be other topics that have ways to rotate knobs that may help.

  • Joannesalfa

    For interacting with solid objects you just need to check to see if a solid object is at it's destination before it moves. Yann made an example of grid movement with walls that should give a good idea how it could be done.

  • I don't know if you can call it faking it as the physics object is just faking it too. All you're doing is the math for it yourself and bypassing all the other calculations the physics behaviors does.

    Damping can be done by multiplying the speed by a number a little less than one. The closer it is to one the less damping occurs.

    Every tick:

    set speed to self.speed*0.99

    Your method of applying a negative acceleration is another method often used and it would look something like this:

    Speed > 0:

    set speed to self.speed - 50*dt

    Speed < 0:

    set speed to self.speed + 50*dt

    For elasticity for one object it can be done something like this:

    On collision:

    set speed to -elasticity * self.speed

    Where elasticity is 1 for a full bounce and 0 is just stop. Of course this will only make it bounce in the opposite direction to what it was moving. Search for "reflecting laser" for a way to bounce correctly against an angled surface.

  • I'm pretty sure it doesn't end the function, it just sets the return value. I don't have access to C2 atm but you can test it by making a simple function with two return actions. Make the first return 1 and the second 2. Then call the function from an expression. If the action stops the function you'll get 1 otherwise you'll get 2.

  • herniewise

    Check your pm, it's fixed. The gameboy background was corrupted and had to be removed. You'll have to re-add it.

  • herniewise

    That's no good that it got corrupted. If you pm me the cap I can see if I can fix it or at least recover as much of it as possible.

    One thought though... Have you tried opening up the task manager and see if any temp.exe are running? They are the preview executables and from time to time they don't close properly and still take up VRAM.

  • I'm on my cell so i can't open you capx but there's an example for solitaire here:

    http://www.scirra.com/forum/solitaire-game-with-construct-2_topic60938_post374424.html#374424

    It should still work. I forget if I commented it but at least it should help a bit.

  • Well, you could test it with an export and see what happens...

    Just did and it makes a 1x1024 file.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can calculate the total velocity of an object with the physics behavior with:

    sqrt(sprite.physics.VelocityX^2+sprite.physics.VelocityY^2)

    Then compare that with your 'velocity threshold' with a 'on collison' trigger.

  • Here's one such way to implement it:

    https://dl.dropboxusercontent.com/u/5426011/examples18/tile_engine.capx

    With 32x32 sized tiles then a total of 336 objects would be used.

  • 1) Use the the "for" loop condition to set ranges in an array. For example with a array of size 100x100 this will set the bottom right quarter of it to one:

    For "col" from 50 to 99

    For "row" from 50 to 99

    --- Array: set at (loopindex("col"), loopindex("row")) to 1

    2)Same answer as for 1, just use different ranges with the for loops.

    3) There are a few topics on this. Best results come from finding a method and tweaking it till it's satisfactory. If you specify exactly what you want the terrain to look like then we could help you better.

  • Guizmus I like the idea of adding another layer to the array to keep track of the number of neighbors. Here is an updated example that also has a major optimization of only scanning through the edge positions where a cell can be made. It should be much faster, and the main slowdown will be from drawing all the sprites.

    sirrance i added some comments to help show what's being done.

    dropbox.com/s/gr2b0phywb7ycvq/maze_prim_faster.capx

    Edit: thinking about it there may be a certain amount of bias with me using the repeat condition. There is no visual indication of this but not all the edges will be considered as the 10 created ones won't be picked until the next toplevel event. It may be of no relevance at all now but may be an issue if the capx were redesigned to make the maze instantly instead of progressively.

  • I had a crack at it and here's my result:

    dropbox.com/s/ufmptfuadafxz76/maze_prims.capx

    I used an array of size (20,20,2) to store the weights and weather or not a bit was plotted there (0 or 1).

    It is rather slow since it scans the entire grid every time a piece is added. It can be made much faster if you find a way to only scan through neighboring cells.

  • Yes, it is possible. You could use webstorage to store the state and time of last access, and when you open it you could see how much time has elapsed and cause things to happen as if it was running the whole time.