Map Database  •  FAQ  •  RSS  •  Login

Classic Tetris Game with MissionScriptsDynamic

<<

eaydin79

Serf

Posts: 6

Joined: 12 Dec 2015, 20:48

KaM Skill Level: Average

Post 12 Dec 2015, 21:35

Classic Tetris Game with MissionScriptsDynamic

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
You do not have the required permissions to view the files attached to this post.
Last edited by eaydin79 on 13 Dec 2015, 20:09, edited 2 times in total.
<<

Tiank

User avatar

Knight

Posts: 592

Joined: 15 Sep 2013, 13:11

KaM Skill Level: Skilled

Location: Poland

Post 13 Dec 2015, 03:00

Re: Classic Tetris Game with MissionScriptsDynamic

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.
Without honour, victory is hollow.
<<

eaydin79

Serf

Posts: 6

Joined: 12 Dec 2015, 20:48

KaM Skill Level: Average

Post 13 Dec 2015, 03:31

Re: Classic Tetris Game with MissionScriptsDynamic

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
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 13 Dec 2015, 09:30

Re: Classic Tetris Game with MissionScriptsDynamic

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?
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

eaydin79

Serf

Posts: 6

Joined: 12 Dec 2015, 20:48

KaM Skill Level: Average

Post 13 Dec 2015, 19:56

Re: Classic Tetris Game with MissionScriptsDynamic

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
<<

RandomLyrics

User avatar

Sword Fighter

Posts: 298

Joined: 21 Jul 2013, 02:15

KaM Skill Level: Fair

Post 14 Dec 2015, 12:49

Re: Classic Tetris Game with MissionScriptsDynamic

Cool map and works well ! :D
<<

thibmo

User avatar

Council Member

Posts: 124

Joined: 03 Aug 2015, 09:12

KaM Skill Level: Skilled

Website: https://kp-wiki.org/

Location: the Netherlands

Post 15 Dec 2015, 17:32

Re: Classic Tetris Game with MissionScriptsDynamic

The idea itself is amazing already. :D
Will give it a try soon :)
~~ The magic wizard of PascalScriptus. ~~

KP-Wiki :
  • Information about Knights Province scripting ( unofficial )
  • Information about several hosting/server maintenance basics
  • Other random stuff
<<

thibmo

User avatar

Council Member

Posts: 124

Joined: 03 Aug 2015, 09:12

KaM Skill Level: Skilled

Website: https://kp-wiki.org/

Location: the Netherlands

Post 15 Dec 2015, 18:32

Re: Classic Tetris Game with MissionScriptsDynamic

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
~~ The magic wizard of PascalScriptus. ~~

KP-Wiki :
  • Information about Knights Province scripting ( unofficial )
  • Information about several hosting/server maintenance basics
  • Other random stuff
<<

eaydin79

Serf

Posts: 6

Joined: 12 Dec 2015, 20:48

KaM Skill Level: Average

Post 15 Dec 2015, 20:20

Re: Classic Tetris Game with MissionScriptsDynamic

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
<<

thibmo

User avatar

Council Member

Posts: 124

Joined: 03 Aug 2015, 09:12

KaM Skill Level: Skilled

Website: https://kp-wiki.org/

Location: the Netherlands

Post 15 Dec 2015, 23:39

Re: Classic Tetris Game with MissionScriptsDynamic

Not sure about classes either, types are for sure. :)
~~ The magic wizard of PascalScriptus. ~~

KP-Wiki :
  • Information about Knights Province scripting ( unofficial )
  • Information about several hosting/server maintenance basics
  • Other random stuff

Return to “Dynamic Scripting”

Who is online

Users browsing this forum: No registered users and 10 guests