99Instances2Go's Forum Posts

  • In first tutorial :

    Right-click the space at the bottom of the event sheet, and select Add global variable.

    Add a global variable.

    Enter Score as the name. The other field defaults are OK, it'll make it a number starting at 0.

    Adding the Score global.

    Now the global variable appears as a line in the event sheet. It's in this event sheet, but it can be accessed from any event sheet in any layout.

    The Score global variable.

    Or ? Did you name the textbox 'Score' ? In that case rename it to something else (for now).

  • From pixels/tick to pixels/seconds should be pixels/tick * fps.

    If you move something at 5 pixels per tick at a 60 fps, you move it 300 pixels in 1 second.

    If you move something at 5 pixels per tick at a 30 fps, you move it 150 pixels in 1 second.

    But, that illustrates the problem, of course. It should move the same amount of pixels in a second, whatever the FPS.

    So it is pixels/tick * fps * correction.

    Now we really can talk about pixels/seconds, because unit/second also says that it is fps in-depended.

    This correction = (1 /fps) * 60.

    Or 'pixels/second' = ( 'pixels/tick' /fps) * 60 .... and .... 'pixels/tick' = 'pixel/second' * (60 / fps)

    Now .. 60/fps = dt (mathematical). So also 'pixels/tick' = 'pixel/second' * dt

    But dt is in reality caged. Once below 30 fps/sec, dt will not go any higher. You can set this minimal fps with a system action.

    I rather advice you to use dt, above 60/fps. Because once 60/fps gets to high, the system just cant detect collisions and that kind of stuff anymore, because the time taken by 1 tick is just to big. Objects will move to much between ticks.

  • When it needs to follow a moving object with pathfinder, it needs to recalculate its path regular, but not every tick.

    It takes time to find a path, so, if its gonna search for a path every tick, it is looking for a new path before the previous one is calculated, hence it never gets to the point to actual be able to follow that path.

    Regularly means every so much time, the timer solves that for me. When the timer fires, it finds a new path to the moving object. The timer is also is a little bit random to try to make only 1 path find in 1 tick. Spread the work.

    Hope you looked at the visualised obstacle map. Not only for debug purpose, it also helps you to arrange the obstacles in the layout in a good way. How more accurate the obstacles align to the obstacle grid (set in the pathfinder property's) how nicer the paths and how faster they are found. Also, how more narrow the gates can be.

  • Got to add the vector of the platform to the vector of the player on jump.

    https://www.dropbox.com/s/3jxpiwz7k2kyp ... .capx?dl=0

    I used a platform to move the platform. I like that movement.

    But. It has a bug when you jump from beneath against it. Suddenly a zero gravity gets non zero. Lower the upper platform to see it happen.

    The reason why i tried platform to move it, is because you said something about collisions, and i need an already dt corrected vector. (sine is not)

  • That is true, but since you choose for sine (wich pushes things to any and every solid), i did't think that would be a problem. Must manipulate vector X and vector Y. But that gonna be hell if you want it to land on an exact place on the sine.

  • No you dont have to, but that way the 'lines' dont scale. Its uhh more proper.

  • If it is about a premade tilemap that you need to randomize:

    https://www.dropbox.com/s/h7mbvsl6lmisc ... .capx?dl=0

    If it is about procedural terrain generation:

    https://www.google.be/search?q=scirra+t ... scirra.com

    https://www.google.be/search?q=scirra+p ... scirra.com

  • You dont need the pin. When you make a new project, there is a template 'platformer'. It solves your problem.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Competitors ?

  • Talking about events 16 - 18. There is no 1 solution, because there are many problems.

    Lets list up the problems (those i see) , and see if you see how to fix them.

    1/ There is no zombie picked in event 15.

    2/ There is no system (preferable containers) that links a zombie to its ZombieArea. So, even if you picked the zombie, you can not pick its ZombieArea. Overlap condition will not help, because sometimes they are with 4 on almost the same place.

    3/ Since there is no ZombieArea picked (so it is an un-referenced object), the actions addressed to ZombieArea, work on all of them. So, each one is set to solid. And there will be an obstacle region generated around each ZombieArea. You can as well regenerate the whole obstacle map, and have them always solid, if you not gonna pick them.

    4/ The obstacle map is ready in the next tick. But you force them to find a path in the same tick. Before the obstacle map is ready. In event 16.

    5/ And the worst. There is only 1 obstacle map. Every time you send a human out to find a path, it considers the same obstacle map. Now. If you get it to work, then every time you mark a region on the obstaclemap as en obstacle, it stays an obstacle until you clear it. So, the way you do it, in some short time each cell in the obstacle map will be marked as an obstacle. See it as stamps you set.

  • randomly

    See his previous question :

    If it is about this, then i see 4 big problems, an i dont really know how to solve them. I mean, i cant do better then you.

    1. If the 'drawing' (that is basically creating sprites) happens in the same loop as the 'checking', then i cant see any easy solutions. Due the fact that you cant read from a newly created object till the next top level event.

    2. The drawing happens in lines, segments. Not in dots, points. So, there are no coordinates to check.

    3. The solutions for (y) when iterating x are floating numbers. No chance using a 'is the same as' comparison.

    4. Iterating x by 1 is relatively still a big sample rate. Even if you clearly see 2 functions intersect, the sample rate will be to big to capture it.

    Still assuming it is about the same thing in his previous questions.

  • Or.

    Use the X-axes for its index only, meaning : dont store values on the X-axis.

    Store values on the y-axis.

    Now if you need to sort, you just copy the y value (that you want to sort on) to the x axis, sort on x, done.

    Easy as this.

    https://www.dropbox.com/s/trabdwutpnuge ... .capx?dl=0