dop2000's Forum Posts

  • 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

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Use a sprite or TiledBackground object instead of the progress bar. It's very easy - set origin point on the left and update its width, for example:

    Bar Set width to 300*(Player.health/100)

    where 300 is the maximum width, and 100 is the maximum health.

    Here is a demo:

    howtoconstructdemos.com/simple-healthbar

  • You mention the package.json, you can simply edit this in the official launcher to pop the /r218 link directly in?

    Yep. However, I had to use an older version of this file. I guess that launcher does something similar, but the process is automated.

  • I don't know, I'm with Ashley on this one.. I cannot imagine what an enormous task it must be supporting Construct, so forcing people to use the most stable version seems like a solid idea.

    I believe most C3 users are happy with auto-updates. Moreover, many people update to the latest beta the moment it's released.

    OP's problem seems more like a workflow issue, this situation is not common. And there are already a few solutions available - use a launcher, or edit package.json. I tested the second one and it works fine for me, folder saving and everything.

  • I'm not sure I understand the problem, but I still have a few ideas :)

    Before saving, you can generate a new seed string. When loading, set seed to that saved string.

    Or you can probably generate and apply a new seed on every step. So when a game is loaded at step 155, for example, you can tell Advanced Random to use seed "seed_step_155".

    Or maybe you don't need random to be seeded after loading the saved game? In this case, simply disable it.

  • You can parse CSV with events, or you can use ported CSV addons for C3:

    github.com/erenertugrul/construct-plugins/tree/master/ported_plugins/plugins

  • If you don't need the physics to be very accurate, you can do this:

    B on collision with A:
     A Apply Impulse 100 at angle angle(B.x, B.y, A.x, A.y)
    

    Use image point 0 or -1

    To apply rotation, you can get the difference between angle(B.x, B.y, A.x, A.y) and B.angle (or angle of motion). Let's say this difference is 20 degrees, so you apply an angular velocity in the opposite direction, -40 for example.

    Again, this will not be very accurate, but should probably look ok for most collisions.

  • Jim Smith This is correct. All iterations in the loop are executed immediately in one tick. However, actions after "Wait" are scheduled to run later. So if you put "Wait 1 second", all 20 iterations will run after 1 second, but if you put "Wait 0.5*loopindex", they will run with 0.5s intervals.

  • gustavoChico

    I'm not a fan of third party stuff, and I think this is a legitimate issue.

    You can edit the package.json file manually, put "https://editor.construct.net/r218/" there. I don't know if it will still prompt you to update, but it should run r218.

    I don't like auto-updating software either, but I believe in case of C3 it's justified. There are lots of bug fixes in every release, without the auto-update people will continue using old versions and endlessly complain about things that have been fixed a long time ago.