How to increase the speed of something ?

ofekezofekez Member, PRO Posts: 95

Ok , first of all, im sorry if i will have an English problems cause i live in Israel ...
My question is how to increase the speed of something like on the Piano Tiles game (Don't touch the white tiles...)
I've tried making a real attribute and then to make an timer that say that every 5 second the spawning will be "attribute" plus 20 and it didn't work !
What should i do ?

Thanks your help !

Br,

Ofek Ezon

Comments

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    It depends on how you have your game set up but I am working on a game right now that spawns obstacles that move toward the player and I have mine set up like this:

    Integer Game Attribute called: gameSpeed

    Each of my obstacles has a Move Behavior moving at the speed of: gameSpeed

    I have a game controller actor on my scene that is unlocked so I can have access to the Attribute Scene Time. This actor increases the value of gameSpeed over time using this expression:

    Change Attribute: game.gameSpeed to ceil(scene.Time)+400

    I only use the +400 because I want the minimum speed of my obstacles to be 400.

    Hope this helps.

  • ofekezofekez Member, PRO Posts: 95
    edited May 2014

    Thanks ! but i didn't get what is the actor do and what is behaviors... (Game controller actor) , do i need to put him on the screen or what ?

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    I've attached a sample project here.

    To see the rules of the control actor you'll need to double click it on the stage since it is an un-locked instance of the prototype actor.

  • ofekezofekez Member, PRO Posts: 95

    Weird ...
    When i'm trying opening the project file i get an alert that saying that the file is newer then my gamesalad version ...

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    It's created in the latest Macintosh version...

  • ofekezofekez Member, PRO Posts: 95

    I have Windows , that's matter ?

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    I guess it must. The Windows version used to be able to open Macintosh version files, I'm guessing that must have been broken in the latest update.

    @CodeWizard‌, can you confirm that the Windows version can not open files from the latest Macintosh version? If so do you expect this to be fixed at some point soon?

  • ofekezofekez Member, PRO Posts: 95

    P.S. when i click on Help --> Check For Updates i get this error : "Unable to find resource on server. Please check if the URL is correct .....

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    @RThurman, thanks for the video. However I think the issue is a new one, after the recent Macintosh update to Beta .11.0.13. Seems like that has broken the backward compatibility to Windows versions. I suppose this is because the Windows version is still at Beta .10 or even earlier.. not sure.

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881

    Hmmmm....I didn't know that. Perhaps @ofekez‌ can confirm that the solution outlined in the video no longer works.

  • ofekezofekez Member, PRO Posts: 95

    Wow , weird but it doesn't worked about 10 minuets ago and now it does ... Thank you all for helping me :) ... and about the DEMO , Wow , you are amazing but how do i make the squares go faster ? (from 100 to 110 and then to 120 and etc. ?)

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    edited May 2014

    So @ofekez‌, you were able to open the project on Windows then? Did you follow the video posted above or did it just open for you like normal?

    If you let the demo run you'll see the square moves faster and faster over time, it's using the scene.Time to increase it's speed. Let it run for a while and you'll see the numbers count up on the square, that is the speed it's moving at.

    If you want the square to increase its speed more quickly you could update the Expression in the Control Actor to something like this:

    (ceil( scene.Time )*10)+100

    Adding the *10 will make it increase 10 times faster than the way it's set up to start.

  • ofekezofekez Member, PRO Posts: 95

    Yes , i just open it up Normally ...
    Thank you so much for all of your help !
    Thank you for taking your time for me!

  • ofekezofekez Member, PRO Posts: 95

    And how do i increase the speed of something until specifically speed like 1000 or something ... ?

  • ofekezofekez Member, PRO Posts: 95

    Ok , im sorry for all those comments but i am trying to do the same like you did and i cant find the Scene option on the constrain attribute behavior , i only have : game , devices , services , actorname ...

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    @RThurman, just wanted to tag you so you can see it looks like things are fine between the Mac and Windows versions still. I'm going to do a quick check when I get home this evening just to be sure as well, but it sounds like things are still compatible. :)

    @ofekez, to get access to any scene settings or attributes you need to un-lock and actor in that scene. Then from that un-locked actor you can get access to those things. I did this with the Control Actor in the demo above.

  • ofekezofekez Member, PRO Posts: 95

    Thank :) , it's possible to make the opposite ? start in 1 and end on -1 in 5 seconds or something ?

Sign In or Register to comment.