How do I have block randomly move left/right (Like Kaboom)

0 favourites
  • 7 posts
From the Asset Store
Merge Blocks - Full Game
$19.60 USD
60% off
Place blocks on a board, join them together to form even bigger blocks!
  • Hi...

    I'm trying to make the old school game where a character would randomly move left/right on the screen -- and then gradually increase its speed as time passes. I'm basically looking to make a game very much like the old atari 2600 game Kaboom (screenshot attached).

    Oh... here is a short video I found on Youtube just incase you don't remember the game:

    I am trying to make the character you see at the top of the screen dropping bombs -- he is randomly moving left/right and moves faster over time.

    Unfortunately, I can't seem to figure out how to make the character move randomly left/right on the screen.... If somebody could let me know the EXACT command to do it, it would be be greatly appreciated.

    PS: Basically.. the character moves only left and right on the screen.. It randomly moves from one end of the screen to the other... and then the character gradually increases his speed over time...

    Thanks in advance. <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • First idea is to use Sine-Horizontal, then you can Set period to shorter after X seconds or after X bombs are dropped.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I fiddled with the "sine-Horizontal" but I couldn't figure out how to make it RANDOM. I do NOT want it to always go from the left to the right and back forth... it needs to be random like in the video. Hence, I'm stumped. I'm sure that I use the random command some how but I haven't figured out exactly how. <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad">

    Wait! I just found this tutorial:

    https://www.scirra.com/tutorials/190/random-movement

    I THINK I understand it a little better now... I'll give it a try when I get home.. thanks for the info on Sine.. I didn't realize it apparently has a random feature included. <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • NOPE.. I'm still confused.. I looked very closely at the above tutorial which added 2 'sines' to it.. and i see that it put in 'random' numbers in the sine behavior.. but if you watch the pattern, it really is NOT random... it repeats the same pattern over and over... Plus... It doesn't make sense why I woulid need TWO (2) signs if I tell the first sign to use RANDOM anyway... so I'm REALLY confused now.

    Hence.. I'm still confused.. if anybody could show me EXACTLY how to make a RANDOM character go back and forth, please do show me. Thanks greatly in advance.

  • Made an example file for ya. Instead of using Sine i used Bullet behavior and changed its speed randomly.

    You can playtest the example here: (Use touch or mouse to drag the catcher left and right, you got 3 lives then you die)

    https://www.frostyelk.se/bomberman/

    Get the file here:

    https://www.frostyelk.se/bomberman/BomberMan_Demo.capx

  • Wow! Wow! Wow!!

    Thank you soooooooooooo much for taking the time to create that example. It is ENORMOUSLY appreciated.

    At first, when I looked at it, I STILL could not figure out how you got the character to randomly go in the opposite direction for no particular reason (via the bullet object)... but then I FINALLY realized you used a NEGATIVE speed to make it go backwards. I never would have thought of that!

    Thank you again very very much.

  • Your welcome! Glad i can help!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)