Guizmus's Recent Forum Activity

  • NECROKRIEG

    You didn't understand the goal of clamp. clampx(val,min,max) is a function that will return :

    val if min<val<mx

    min if val < min,

    max if val > max

    By changing like you did, you set the minimum progress to 0.5, so the movement was half done from the start.

    I modified your last capx to include a textbox for you to change the speed on the go, and see how it works. On my computer, you could clearly see the difference between 0.1 and 10 for example.

    Capx

  • You have to understand how the lerp works here.

    lerp(a,b,x)

    0 <= x <= 1

    returns the point between a and b, proportionally to x. So you have to play on x and how fast it goes up to 1, to change the speed.

    Let's say you have a global variable called "speed", being a float between 0 and Infinite, Infinite being max speed, 0 being not movable. The total animation will have a duration of 1/speed seconds.

    In your last .capx, just change the line where you set progress to clamp(progress + dt, 0, 1) to clamp(progress + dt*speed, 0, 1)

    You will then keep the frame independancy, and will be able to set the speed as you like.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Very good work on this !

    I had hard time to really take a grip over the bird physics though, but once it's done, it's fun !

    Just one thing, very good idea to do a tutorial like this, but maybe it should cover the full extend of the gameplay ? Not just grab the first 3 triangles, but also drop them in their respective nest ?

  • This computer specs : Windows 7 SP1 64bits, 4Go RAM, dualcore AMD 1.8GHz, Graphics : AMD Radeon HD 6380G (low config)

    Without clicking anywhere : 60FPS

    Drops to 40 FPS at first destruction. Next clicks let me in the range of 50 to 60FPS.

    Spamming click drops down to 30FPS

  • Just to be precise, don't think of functions in C2 as "defined functions". It's more of an event called. You can have multiple "On function XXX" events, they will all trigger when you call the function. Functions are not defined, don't think of it as in JS for example.

  • Hey CrudeMik !

    So what you need is a white tilde background, positioned and sized over the area you want to invert.

    Add the effects "overlay" and "inverse" to it, and here you go.

    Here is a sample capx demonstrating it. The overlay has drag&drop to test it out.

  • To make it faster requires to optimize the forEach loop mostly. In this loop, we are looking for the point that has :

    • exactly 1 neighbor
    • isn't plot already
    • has minimum weight

    The problem is that every time the loop is done, neighbor count is recalculated for every (X,Y). I tried to add a 3rd Z layer on the Array, storing the number of neighbor for every point, and maintaining it every time we plot one more time (so only in the plot function). This let me remove completely the greedy calculation of the local "neighbors", that was removed too.

    Last optimization, changing the organisation of the ForEach Loop to check the conditions in a special order :

    • first, neighbor count, as the set of cells with only 1 neighbor is finite and minimal in the maze
    • second, applying the "not constructed" condition"
    • last, the most greedy, the "minimum weight" check

    It works consistantly on a bigger maze, I didn't try to go higher than 100x100 though

    capx

  • hi,

    you have the same tools for windows or web at http://www.bfxr.net/

    I use this for all sfx in my game, it's very good.

    Thanks a lot anata ! Great link !

    I'm not very good at it though, I can try to make something, but it's likely to be garbage ^^

  • Well...

    I liked that subject...

    I made a key mapper with C2...

    Please send a screenshot when you've set all the keys, if the gamepad is detected by the the browser.

    It's quite self explaining otherwise, input in center of joystick is by clicking on the joystick. X and Y Axis of the joysticks are "hit" when the joystick hits 100% bottom or right respectively (left and up are not to check).

    capx

    Screenshot

  • Ok, so I updated the gamepad test capx. Could you try again ?

    After testing with XboX pad, it works fine. Sprite should be moving with the gamepad.

    Clear button is usefull to check if any gamepad is detected, and print its ID.

  • I have the last Beta, you have an old version I think, surely the last stable, but that is no problem. My mail by MP.

    (you don't need to spam you know, don't be impatient, never open 2 thread for the same question...)

  • What setup do you use ? Grid size ? Do you have any moving obstacle and/or regular "regenerate obstacle map" ?

    Once the obstacle map is generated, paths are computed on demand, and a path asked multiple times is search only the first time (it directly triggers the OnPathFound next times).

    If you have a path finding on every unit, and if every unit is itself a moving obstacle, and all move simultanously, yes, your CPU will melt. I will then melt again, and again, just to say it's not happy.

    Moving obstacles in particular are a biiiiig hit on the FPS as they disable the behavior's "cache".

    Knowing more on your game could help detect the problem though.

Guizmus's avatar

Guizmus

Member since 26 Mar, 2013

None one is following Guizmus yet!

Trophy Case

  • 11-Year Club
  • x4
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies