[SAMPLE APP] TETRIS

101 views
Skip to first unread message

Symbroson Development

unread,
Aug 21, 2016, 4:49:52 PM8/21/16
to DroidScript
I finally finished the tetris app!!!
spk attached.
I will add correct the position if the object was outside the game when rotated.
I hope you'll enjoy :D

ps: I changed my DropboxFolder. Heres the new link: https://www.dropbox.com/sh/0i6c7w50elnu1s6/AABo5e4n_EMkmadcg-NAL5S5a

Tetris.spk

Symbroson Development

unread,
Aug 21, 2016, 5:32:42 PM8/21/16
to DroidScript
Please give a feedback if you tested it.
If you have Ideas how to improve pls tell me :)

Symbroson Development

unread,
Aug 21, 2016, 5:57:49 PM8/21/16
to DroidScript
Cool fact: it looks like I'm the first person in this community made this :D

Rogue Jedi

unread,
Aug 21, 2016, 6:31:25 PM8/21/16
to DroidScript
Would a single stage of super mario be easy to build?

Symbroson Development

unread,
Aug 21, 2016, 6:47:11 PM8/21/16
to DroidScript
I don't think so...

Symbroson Development

unread,
Aug 21, 2016, 6:49:33 PM8/21/16
to DroidScript

Netpower8

unread,
Aug 21, 2016, 8:10:20 PM8/21/16
to DroidScript
Got an error. SetEnable not defined.

When i try to rotate thr block. correct() not defined.

I used the spk attacked.

Standard droidscript v1.34 from google playstore. Not beta version.

Game seem to work when a full line was built. It disppeard.

Manuel Lopes

unread,
Aug 21, 2016, 9:41:44 PM8/21/16
to DroidScript
netpower try the dropbox version not have the error we get) alex the line not remove when make the line(i test the spk of dropbox) and if you want a more real tetris change the down button to when llongpress the down button the speed down increase more fast;thanks

Netpower8

unread,
Aug 21, 2016, 11:50:50 PM8/21/16
to DroidScript
i still had an error on the line this.SetEnabled(false) on the StartGame() function

nice game. works. wish there was a preview on the next piece. so you can plan where to put it next.

also its better to have the arrow keys line up together. i had problems with the down an rotate key. wish both of them switched because when i was in a hurry i pressed the down instead of the rotate. =P hahaha

Symbroson Development

unread,
Aug 22, 2016, 12:11:06 AM8/22/16
to DroidScript
Do you get the newest version of DroidScript? Theres a new version released on GP.
Otherwise you I can remove it.

The buttons you can modify like you want in the CreateButtons() function on the bottom of the code.

The KeyOnLongTouch Function and show next obj I will added.

Thanks for the tips :)

Steve Garman

unread,
Aug 22, 2016, 12:32:18 AM8/22/16
to DroidScript
Nelson,
You are quite right, SetEnabled() does not work in the current version of DroidScript.
Try changing the StartGame function to:

//initialisize game
function StartGame() {
if(this.disabled) return
nextObject()
resetArray();
layKeys.SetTouchable( true );
setInterval( move, 500 )
//this.SetEnabled(false);
this.disabled = true;
}

Chris M

unread,
Aug 22, 2016, 2:03:43 AM8/22/16
to DroidScript
correct() is not defined at this stage, sadly.

Looking good though - just as I had an idea for a version stacking newborn aliens pumped out of a huge sky-womb to be mercilessly crushed once a line is completed, heads and limbs left behind in a pool of alien blood (OBSTETRIS)

Good excuse for a new version of Korobeiniki, anyway. :)

Netpower8

unread,
Aug 22, 2016, 2:54:26 AM8/22/16
to DroidScript
Thanks for the suggested .
Message has been deleted
Message has been deleted
Message has been deleted

Symbroson Development

unread,
Aug 22, 2016, 9:08:22 AM8/22/16
to DroidScript
I apologize for posting and deleting many versions :/ hope you can forgive me 😯
Now I use try{}catch(e){} to jump over the rotate bug. :D (now it hangs in the border XD)
Added:
-longtouch auto move
-different colors
-show next object
-objects will drop faster if a row was deleted

Hope you'll enjoy ;)
Tetris.spk

Manuel Lopes

unread,
Aug 22, 2016, 9:21:11 AM8/22/16
to DroidScript
if anyone have virtusl buttons add this line:

app.SetScreenMode( "Game" );

because when game autorotate the right part where virtual button is the image is cut by buttons

Message has been deleted

Symbroson Development

unread,
Aug 22, 2016, 1:04:20 PM8/22/16
to DroidScript
Update:
-play in portrait or landscape mode
-points
-pause
-little bug fixes

I think more people prefer portrait mode ^^

Tetris.spk

Symbroson Development

unread,
Aug 22, 2016, 1:53:28 PM8/22/16
to DroidScript
Netpower8 wrote:
> i had problems with the down an rotate key
I added the possibility to change 'Down' and 'Rotate' key for you ;)
Tetris.spk
Message has been deleted

Symbroson Development

unread,
Oct 8, 2016, 4:56:49 AM10/8/16
to DroidScript
Now all objects are colored - fixed objects too :)
https://www.dropbox.com/s/szpiidovzy7yq03/Tetris.spk
Reply all
Reply to author
Forward
0 new messages