dop2000's Forum Posts

  • Congrats, looks great!

  • Try "On any touch end" with a second condition "Is touching object".

  • You do not have permission to view this post

  • You can ignore it.

  • Check this example:

    dropbox.com/s/thlw3sqw42u9t6y/MoveOnGrid.c3p

    If you need to draw a path on white cells with mouse, and then the sprite to follow it, this will be more difficult.

  • Use Physics action "Enable/Disable Collisions", for example:

    Box Disable collisions with Circle

  • Don't use ProgressBar object for monsters! There are too many problems with ProgressBar, it's not made for such games.

    Use a sprite or TiledBackground, put it into a container with the monster sprite, pin to monster and change its width.

  • runtime.globalVars.textBoard = chess.ascii();

    how can I save chess.ascii() in textBoard directly?

    That was saving chess.ascii() in textBoard directly.

    You don't need Javascript knowledge, I don't have it either.

    few things which I didn't made yet, restricted moves for king, castling and en passent square.

    You think there are only a few things left, but you don't realize how many different rules and restrictions there are in chess. If you look at the chess.js code, there are over 1900 lines of code! It's much easier to use the library, than creating all this logic yourself.

  • Here is a demo. Read the documentation for the library, there are many methods, I used just a couple to make a quick example.

    dropbox.com/s/j0gfaylmr53eoj1/ChessJS.c3p

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Programming chess is a big task, even if you want to do only the basic movement and logic, without the AI. I would suggest using a JS library like this one:

    github.com/jhlywa/chess.js

    All you need to do is call its methods and refresh sprites position on the layout.

  • You can add Platform Info object, it has a bunch of conditions for that.

  • Length-wise it should be fine, but test the performance. I don't know how seeded random is implemented in C3, but I've seen small lags when changing seed too often in Construct 2 (using an addon).

  • the game could potentially get into the millions of steps.

    But the string for the millionth step will still be only 7 characters long :)

    You can build the seed string like this: SeedPrefix&"_"&Step

    Where SeedPrefix is a truly random number you generate at the start of the game.

  • The easiest solution is to pre-generate numbers for all steps, put them into an array. When you need a random number for the next step, just get it from the array.

    You can also try what I suggested earlier - setting a new seed before each step. The entire sequence will still remain seeded. And when you load the game, you set the seed for the current step and continue.

  • A couple of other things to consider:

    1. If object B has Bullet behavior with "Bounce off solids=Yes", its angle of motion at the moment of collision with A may be different. You need to get the angle before the bullet has bounced, so in this case you should disable "Bounce off solids" and use "Bounce off object" action instead.

    2. To make it look more realistic, you need to decrease the impulse with the angle difference. So if the bullet head-on collided with the object A, the impulse is high, the rotation is low. If the bullet hit the corner of object A, the impulse is small, the rotation is high.