Page 1 of 1

Classic Tetris Game with MissionScriptsDynamic

PostPosted: 12 Dec 2015, 21:35
by eaydin79
Hi guys, actually this is not a map, more like snake and space invaders demos comes with kam remake.
Classic tetris game made with action script. How to play : place road plan at the shape like direction keys on keyboard where right bottom corner on the map. i hope u enjoy it. Thanks to Kromster80 for info at https://github.com/Kromster80/kam_remak ... ptsDynamic

Edit : Bug fixed version added. (i hope so :D) please send bug report if there is any bug
score, hi-sore added

Re: Classic Tetris Game with MissionScriptsDynamic

PostPosted: 13 Dec 2015, 03:00
by Tiank
This is great, I love it! :D It only lacks a high score system, but other than that, it's really good work! I like that you've put sounds as well :)

I noticed a kind of bug, which don't really affects the gameplay and you're probably aware of it: when you try to rotate that long brick near a border, there's this message coming up and game freezes for a while Image

Oh, and one more thing. The rotate "button" should be different imo, so it's not confused with other buttons. Maybe just a vineyard tile and maybe it'd better if it's not connected with "movement" buttons.

Re: Classic Tetris Game with MissionScriptsDynamic

PostPosted: 13 Dec 2015, 03:31
by eaydin79
This is great, I love it! :D It only lacks a high score system, but other than that, it's really good work! I like that you've put sounds as well :)

I noticed a kind of bug, which don't really affects the gameplay and you're probably aware of it: when you try to rotate that long brick near a border, there's this message coming up and game freezes for a while Image

Oh, and one more thing. The rotate "button" should be different imo, so it's not confused with other buttons. Maybe just a vineyard tile and maybe it'd better if it's not connected with "movement" buttons.


Thank u for debugging :) .i found that error and am working on it. It is out of range error for some matrix, not a big deal.
Rotate button good idea, i can add another button, also tetris music would be good

Re: Classic Tetris Game with MissionScriptsDynamic

PostPosted: 13 Dec 2015, 09:30
by Krom
OMG1 This is awesome! :-)

Though, one minor flaw - got a lot of:
2015.11.13 17:55:56.429 Exception in script 'Out Of Range' in procedure 'PLAYINTRO'
Also there's a UnitAdd UnitKill code, what does it do?

Re: Classic Tetris Game with MissionScriptsDynamic

PostPosted: 13 Dec 2015, 19:56
by eaydin79
OMG1 This is awesome! :-)

Though, one minor flaw - got a lot of:
2015.11.13 17:55:56.429 Exception in script 'Out Of Range' in procedure 'PLAYINTRO'
Also there's a UnitAdd UnitKill code, what does it do?

i dont get that error in PLAYINTRO, but other errors fixed and updated. i hope so :)
UnitAdd and kill code actually not about tetris game. When u loose a game click 'continue watching' and u will see my name on the map building by laborers. if the playintro error stopping the game u can delete that procedure and other referrences from the script. Thank u for debug info

Re: Classic Tetris Game with MissionScriptsDynamic

PostPosted: 14 Dec 2015, 12:49
by RandomLyrics
Cool map and works well ! :D

Re: Classic Tetris Game with MissionScriptsDynamic

PostPosted: 15 Dec 2015, 17:32
by thibmo
The idea itself is amazing already. :D
Will give it a try soon :)

Re: Classic Tetris Game with MissionScriptsDynamic

PostPosted: 15 Dec 2015, 18:32
by thibmo
So far so good, script works just fine. :)

I did have a tiny look at your script and it looks rather well constructed.
I hope you don't mind me saying this, though:
I am still learning a lot about Delphi and programming in itself, trying to create stuff here and there and doing my best to contribute to KMR. (I do slip mistakes often enough myself. :P)
Something I learned rather quickly is that when you create variables it is wise to make it easy for yourself by using the things you have at hand.
The first thing I noticed was this bit:
  Code:
const preparing = 0; ready = 1; playing = 2; paused = 3; gameover = 4; intro = 5; // Snip var // Snip gameState: Byte; // Snip
You can do this a bit neater and easier by creating a type like so (might also help when debugging later on):
  Code:
type TGameState = ( gs_preparing, gs_ready, gs_playing, gs_paused, gs_gameover, gs_intro ); // Snip var // Snip gameState: TGameState; // Snip
The rest of the code can rather much remain the same that way. (Except for the part that use the "gameState", these simply need a "gs_" in front of them) :)

Just a friendly advise, I enjoy playing it, though. :D

Re: Classic Tetris Game with MissionScriptsDynamic

PostPosted: 15 Dec 2015, 20:20
by eaydin79
So far so good, script works just fine. :)

I did have a tiny look at your script and it looks rather well constructed.
I hope you don't mind me saying this, though:
I am still learning a lot about Delphi and programming in itself, trying to create stuff here and there and doing my best to contribute to KMR. (I do slip mistakes often enough myself. :P)
Something I learned rather quickly is that when you create variables it is wise to make it easy for yourself by using the things you have at hand.
The first thing I noticed was this bit:
  Code:
const preparing = 0; ready = 1; playing = 2; paused = 3; gameover = 4; intro = 5; // Snip var // Snip gameState: Byte; // Snip
You can do this a bit neater and easier by creating a type like so (might also help when debugging later on):
  Code:
type TGameState = ( gs_preparing, gs_ready, gs_playing, gs_paused, gs_gameover, gs_intro ); // Snip var // Snip gameState: TGameState; // Snip
The rest of the code can rather much remain the same that way. (Except for the part that use the "gameState", these simply need a "gs_" in front of them) :)

Just a friendly advise, I enjoy playing it, though. :D

Yes, u r absolutely right. This is my originial delphi code for tetris game
  Code:
type TGameState = (gsPreparing, gsReady, gsPlaying, gsPaused, gsGameOver); TBlock = class p:array[1..4,1..4] of byte; sizeX,sizeY:byte; procedure rotate(direction:shortint); end; TMatrix = class p:array[1..lx,1..ly] of byte; blx,bly:shortint; block,next:TBlock; hiScore,score,level,breaked:integer; speed,blink,land:byte; mute,newRecord:boolean; end;
i just cant be sure if there is a support for type or class structures

Re: Classic Tetris Game with MissionScriptsDynamic

PostPosted: 15 Dec 2015, 23:39
by thibmo
Not sure about classes either, types are for sure. :)