0 Favourites

How do I white tile game ?

  • hi

    i facing problems creating tile and moving from top to bottom

    i have to use array ?

    at this time iam using this :

    for creating black tile at random position

    every 0.8 seconde create object (black tile) x=int(random(4)+1)*161-80.5 and y = 122

    and for moving black tile

    every tick set y to blacktile.y+5*60*dt

    now but facing problem .... i dont know how to set speed ....

    and i want to create white tile randomly but only on the place that there is no black tile ... and when touched the white that spawn red tile and game over and vise versa

    thanks for help

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Hi,

    do you mean "Creating moving background ?"

  • yes or moving object...

  • Moving object is the same as moving background, but you can do both with many technics and tricks!

    take a look at my tutor here and subscribe:

    Moving background:

    https://www.scirra.com/tutorials/1023/h ... background

    to move an object, background, you need to do it by "Bullet" behavior, or by "Sin" behavior.

    try and let me know .

  • that not help me a lot i dont know ...

  • I created GemTap game on playstore which is same as don't tap the white tile games:

    https://play.google.com/store/apps/details?id=com.mrcoparmsgmail.com.gemtap

    I created 4 sprite objects as my tiles outside of the layout up top. Once lined up i setup a 4x1 array with the x-coordinates of the 4 sprites. set tile y value to a variable say y-coord

    set tilespeed = 7

    on every tick -> set y of tile object = tile.y + tilespeed

    at a point when you need to generate the next line of tiles (I detect when my background behind the tiles y value reaches -195) call a function to generate the next line of tiles:

    create tile at (array(i),y-coord) with i=0 to 3

    maybe i can write up a tutorial on how i did gemtap if it would be any benefit or interest to any one

  • mmmm ok thanks i see your game its funny good idea

    but i have some questions

    what about touch tile fonction ? what u use ?

    and this mini tutorial is for arcade gameplay ...

    what about classic mode ? you use the same about moving tiles and you replace every tick by touching tile ? yes ?

    thanks in advance

  • So mines pretty simple, not sure if it is the most efficient method. runs smooth on my S3.

    First I setup if the Black Tile touched is the lowest Instance UID, as you can't touch any other black tile until the lowest is touched first.

    Set instance vars on black tile: IsLowestUID = bool false. InstanceUID = 0

    BlackTile object - Pick Instance with lowest IsLowestUID -> set IsLowestUID to True

    Else

    Set to IsLowestUID False

    Create GameMode global var as text.

    Create GameOver global var as number=0

    Create ClassicMoveTiles global var as number = 0.

    Then on touch blackTile:

    On Touched BlackTile and BlackTile Is IsLowestUID and GameOver=0->

    Subevent ->

    GameMode ="Classic" -> set ClassicMoveTiles = 1

    System Every Tick ->

    Subevent ->

    GameMode="Classic" and ClassicMoveTiles=1

    -> set y to background.y + tilespeed

    -> set y to blacktile.y+ tilespeed

    -> set y to whitetile.y + tilespeed

    Subevent again ->

    Background y>=0 -> set ClassicMoveTiles = 0

    -> set background y to -195.1 (this value depends on your bkground object position, have to play around)

    -> call GenerateTiles function.

    On touch WhiteTile and gameover =0 with trigger once -> set whitetiletapped=1 and gameover=1 (or call your gameover code)

    If they didn't hit a whitetile and just missed the black tile past the screen, flash the tile they missed:

    System Gameover=1 and whiteTiletapped=0 -> set y to background.y-200. set blackTile to blacktile.y-200, set whitetile to whitetile.y-200

    subevent -> blacktile pick instance with lowest InstanceUID -> blacktile flash

    hope that all makes sense i've quickly typed it out. pm if need any other help dude.

    cheers

  • can you send me .capx please ?

  • hi,

    can you send me the .capx ??? please its urgent

    i can pay you

  • hi,

    can you send me the .capx ??? please its urgent

    i can pay you

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