Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Tetris

Author
Message
SAnTA
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location:
Posted: 3rd Jan 2005 03:32


Full tetris source code free to use as you wish

http://www.atnasonline.com/index.php?page=tetrisdb&type=1
Cliff 3degs network
21
Years of Service
User Offline
Joined: 23rd May 2003
Location: Sweden
Posted: 4th Jan 2005 13:38
Thanks man i am an crappy coder and cant code things like that so it was really usefull for me as my brother have bin bugging me about making tetris but i haved told him it was to hard for me.
i have used your code and modified it alot with new gfx an menue and high score list.
alot left to do but you can get an sneak peek at the attached image of my version.
thanks again.
could you maybe help me out on how to get an preview of the upcomming block that comes after the one on screen?
as its your code?

AMD ATHLON 1.8 XP WITH AN GEFORCE 4 TITANIUM 4600 (128 MB) AND 256 MB DDRAM (266).

Attachments

Login to view attachments
SAnTA
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location:
Posted: 4th Jan 2005 22:13
Its great to see someone making use of my code I've just returned home from a nice long shift at work but when i have had some sleep i will change the code and make it show a next piece image just for u

Keep me posted with your version, it interesting to see. Your graphics look very swish.
SAnTA
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location:
Posted: 5th Jan 2005 03:18
Added next piece preview. New tetris game here:
http://www.atnasonline.co.uk/darkbasic/tetris3.zip

If you do a quick find on my code you will find anywhere where make_piece(random_number) is called will have 2 or 3 lines added to it.

Their is also a new function at the end that has 2 variables that will let you position the preview box.

Let me know if you have any problems, and don't forget to let me see what you make
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 5th Jan 2005 03:20
Cliif, how are you crappy? I mean that Alien Breed Game is awesome!

Have a heart and join my message board.And now my messageboards work again!Woot!
Cliff 3degs network
21
Years of Service
User Offline
Joined: 23rd May 2003
Location: Sweden
Posted: 5th Jan 2005 06:39
I dont know wath to say as simple stuff can i do some arrays and stuff and games like my alien breed like game but games like tetris and mine sweep with some hard calculations and stuff i would never be able to do stuff like that.
i still call my self newbie.
mostly of the stuff i know did the guy that made that game return to phobos teach me and helped me with his source.
so i have decided to release my tetris game with all the source and stuff later and a large cred to santa off cource hope it will help another newbie like i was when that nice guy with phobos helped me.
And thanks santa iam going to lok at it at once and trye to implent it.

AMD ATHLON 1.8 XP WITH AN GEFORCE 4 TITANIUM 4600 (128 MB) AND 256 MB DDRAM (266).
Cliff 3degs network
21
Years of Service
User Offline
Joined: 23rd May 2003
Location: Sweden
Posted: 5th Jan 2005 07:59
i yust tested it it works great.
be patient so will i upload an demo soon.
yust think of that i work on my other project to so it could take its time.

AMD ATHLON 1.8 XP WITH AN GEFORCE 4 TITANIUM 4600 (128 MB) AND 256 MB DDRAM (266).
Cliff 3degs network
21
Years of Service
User Offline
Joined: 23rd May 2003
Location: Sweden
Posted: 5th Jan 2005 20:27
yust wanted to inform you santa a little of wath iam doing here.
today did i remove 54 sprites that was not neaded because i rewrote parts of the code you had for the border.
I wanted to make it easier for the newbies to change the play are and move it.
old----------------
`draws the boarder pieces
x_value = 60
for x = 11 to 24
sprite bottom, x_value,420,8
x_value = x_value + 20
rem hide sprite x
next x
y_value = 420
for x = 25 to 45
y_value = y_value - 20
sprite x, 60,y_value,8
hide sprite x
next x
y_value = 420
for x = 46 to 67
y_value = y_value - 20
sprite x, 320,y_value,8
hide sprite x
next x
end old----------------------------
new code---------------------------
` ----------------------playfield border
border_bottom=11
border_left_side=12
border_right_side=13
sprite border_bottom,60,420,1
SIZE SPRITE border_bottom,280,20
sprite border_left_side,60,0,1
SIZE SPRITE border_left_side,19,420
sprite border_right_side,320,0,1
SIZE SPRITE border_right_side,20,420
end new-----------------
so if an starting coder dont understand the new code so do i not know how they would be able to code.
and if there is someone else out there using santas code so here is the parts to change in the code.
right before the loop change this..........
dropped_piece = 18

-------------->and change here to
`loop to delete lines
for Start_y = -20 to 400 step 20
`makes check sprite if it doesnt exist
-------------->if sprite exist(14) <> 1 then sprite 14,80,Start_y,10
pieces_on_row = 0
`counts pieces on row
-------------->FOR x = 17 TO (dropped_piece - 1)
-------------->IF SPRITE COLLISION(14,x) = 1
pieces_on_row = pieces_on_row + 1
endif
next x
`starts a loop if theirs 12
`pieces on row
if pieces_on_row = 12
`deletes the row
-------------------->FOR x = 17 TO (dropped_piece - 1)
-------------------->IF SPRITE COLLISION(14,x) = 1
delete sprite x
endif
next x
------------------>FOR x = 17 TO (dropped_piece - 1)
if sprite exist(x)
if sprite y(x) < start_y
new_x=sprite x(x)
new_y=sprite y(x)+20
new_image=sprite image(x)
delete sprite x
sprite x,new_x,new_y,new_image
endif
endif
next x
endif
------------------------>delete sprite 14
pieces_on_row = 0
next start_y
Yet again santa thanks and enjoy to the rest an complete source and media will be released later.

AMD ATHLON 1.8 XP WITH AN GEFORCE 4 TITANIUM 4600 (128 MB) AND 256 MB DDRAM (266).
SAnTA
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location:
Posted: 5th Jan 2005 23:01
well i wrote it in about a hour so dont be too harsh hehe
Cliff 3degs network
21
Years of Service
User Offline
Joined: 23rd May 2003
Location: Sweden
Posted: 5th Jan 2005 23:17

Some more updates are currently working on the menue so that the player can change tile sets for the blocks and the gfx for the background separately gives more variation and any one can make skins and stuff to replace the old iam thinking of about 5 backgrounds and the same amount of tile sets.
screenie of the menue is attached.

AMD ATHLON 1.8 XP WITH AN GEFORCE 4 TITANIUM 4600 (128 MB) AND 256 MB DDRAM (266).

Attachments

Login to view attachments
Cliff 3degs network
21
Years of Service
User Offline
Joined: 23rd May 2003
Location: Sweden
Posted: 5th Jan 2005 23:19 Edited at: 5th Jan 2005 23:22
and of the effect i coded for when the blocks disapear.
it flashes and rains stars must be seen in action looks really cool.
i used my classic tile set and background here.
iam going to work on so that the more lines you take away at the same time the better score you get and more stars it rains.

AMD ATHLON 1.8 XP WITH AN GEFORCE 4 TITANIUM 4600 (128 MB) AND 256 MB DDRAM (266).

Attachments

Login to view attachments
Cliff 3degs network
21
Years of Service
User Offline
Joined: 23rd May 2003
Location: Sweden
Posted: 8th Jan 2005 23:49
Hi santa yust wanted to show of the latest stuff sorry for the double post i still have no ftp
first screen is one of the 5 themes in its menue mode.
its going to be 5 background themes and about 10 tile sets to choose from during play.
i dont know wath to say i have about 700 lines of code for the tetris game right now and will not be finished until late next week i hope.
if you want santa so could i email you an beta if your account can handle larger files the zipped version is 2 mb.

AMD ATHLON 1.8 XP WITH AN GEFORCE 4 TITANIUM 4600 (128 MB) AND 256 MB DDRAM (266).

Attachments

Login to view attachments
Cliff 3degs network
21
Years of Service
User Offline
Joined: 23rd May 2003
Location: Sweden
Posted: 8th Jan 2005 23:50 Edited at: 8th Jan 2005 23:52
And one of the other themes ingame its called art.
O and bye the way did i mention that all the code will be released later on as an tutorial.

AMD ATHLON 1.8 XP WITH AN GEFORCE 4 TITANIUM 4600 (128 MB) AND 256 MB DDRAM (266).

Attachments

Login to view attachments
SAnTA
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location:
Posted: 10th Jan 2005 08:57
damn that last screen looks amazing. You say you have no ftp, i would be happy to host the file for you. Give me a shout on messenger Santa_2000_@hotmail.com
Cliff 3degs network
21
Years of Service
User Offline
Joined: 23rd May 2003
Location: Sweden
Posted: 12th Jan 2005 01:35
my brother have some ftp space for me.
and he is helping me out with some art and music.
i sadly dont have an messenger account any more alot of problems and i do only go online when to search on the web or email as my connection is crapp 64 k.
but the game will still be released this week with all source code.
and santa thanks.

AMD ATHLON 1.8 XP WITH AN GEFORCE 4 TITANIUM 4600 (128 MB) AND 256 MB DDRAM (266).
Cliff 3degs network
21
Years of Service
User Offline
Joined: 23rd May 2003
Location: Sweden
Posted: 24th Jan 2005 07:08 Edited at: 25th Jan 2005 01:58
sorry for the delay but here is me and my brothers version.
hope you all like it.
we had so much other stuff that got in the way so its not an tutorial but the source code is included.
we could probably make it better but we dont have the time right now.
http://www.okraft.nu/3d-egs/Clifftris.zip

AMD ATHLON 1.8 XP WITH AN GEFORCE 4 TITANIUM 4600 (128 MB) AND 256 MB DDRAM (266).
Cliff 3degs network
21
Years of Service
User Offline
Joined: 23rd May 2003
Location: Sweden
Posted: 25th Jan 2005 04:33
Download updated and fixed game here now with the same link as before.
yust uploaded the new one if you have version 0.04 so is it right.

AMD ATHLON 1.8 XP WITH AN GEFORCE 4 TITANIUM 4600 (128 MB) AND 256 MB DDRAM (266).

Login to post a reply

Server time is: 2024-11-23 17:21:47
Your offset time is: 2024-11-23 17:21:47