AutoHotkey Community

It is currently May 26th, 2012, 12:29 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 40 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: December 11th, 2008, 6:33 pm 
Offline

Joined: November 24th, 2005, 8:16 am
Posts: 851
ManyTetris 0.17

This is the result of complete boredom... :)
I once had a handheld tetris game, which had many variants of tetris inside, with many different pieces.
It was monochrome.

So, I have created this little script.
It is completely non graphic (i.e. there are no bitmaps) - all is done by color GUI elements.

The nice thing about it (to me anyways) is that you can quite easily create additional games, by creating a new game template file.

In this template, you can define some variables of the game + define the piece shapes.

I have added some minimal sounds for completeness.
Also, some options (colors etc) are configurable in the INI.

Download this ZIP archive for source + readme + sounds + some game variations.

_________________
Sector-Seven - Freeware tools built with AutoHotkey


Last edited by Icarus on June 18th, 2011, 11:23 pm, edited 6 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 11th, 2008, 8:55 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
Very nice. :D

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 11th, 2008, 11:25 pm 
I still have that tetris

It's was so cash because it showed to the world that some things could be changed

And I could say you are brought that thought back to life


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 11th, 2008, 11:36 pm 
Offline

Joined: November 24th, 2005, 8:16 am
Posts: 851
Heh :)
I am not sure it is the same one, back then there were many tetris games - it was popular.

Mine looked something like this, in black.
Image
The writings are familiar, so I may had the exact model.

If you still have it - maybe you can tell me if I missed any piece shape (or added one that did not exist).
Check the Deluxe Tetris template - this was supposed to be a replica of that game, as I remember it.

_________________
Sector-Seven - Freeware tools built with AutoHotkey


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 12th, 2008, 2:49 pm 
Very nice,
Thanks.

Here ist the first "mod":
Code:
; ChaoTris.txt - ManyTetris.ahk Game-File
; ; is a comment
; # is a directive (middle spaces allowed, trailing spaces not allowed)
; Empty line is ignored
; All the rest, piece definition where
; = is a piece state separator (when rotated)
; * is a beginning of a new piece

#Rows 21
#Cols 7
#BoxSize 28
#DropSpeed         200
#DropSpeedIncrease 10
#MaxDropSpeed      900

+
*

+-
-+
=
-+
+-
*

+-
-+
=
+-
+-
=
-+
+-
=
++
--
=
+-
-+
=
-+
-+
=
-+
+-
=
--
++
*

++
*

-++-
=
++++
*

-
-
-
+
=
-
-
+
+
=
-
+
+
+
=
+
+
+
+
*

-+-
++-
-+-
=
-+-
-+-
-+-
=
-+-
-++
-+-
=
-+-
-+-
-+-
*

++
++
=
+-
+-
*

+-+
+-+
+-+
=
+++
---
+++
*

+--
-+-
--+
=
-+-
-+-
-+-
=
--+
-+-
+--
=
---
+++
---
*

---
-+-
---
=
+++
+-+
+++
*

+++
+-+
+-+
=
+++
--+
+++
=
+-+
+-+
+++
=
+++
+--
+++
*

-+-
+-+
---
=
-+-
--+
-+-
=
---
+-+
-+-
=
-+-
+--
-+-
*

+-
--
=
++
--
=
++
-+
=
++
++
=
+-
++
=
+-
+-
*

---+---
--++---
=
+++++++
-------
*

-+-
+-+
-+-
=
+-+
-+-
+-+
*

-----
+++++
-----
=
++---
-+++-
---++
=
--+--
-+++-
--+--
=
---++
-+++-
++---
*
+---
++--
=
+---
+++-
=
+---
++++
*

---+
--++
=
---+
-+++
=
---+
++++
*

---+
++++
---+
=
--+-
++++
--+-
=
-+--
++++
-+--
=
+---
++++
+---
*
--+++--
-++-++-
++---++
=
-------
-+++++-
+++-+++
=
-------
-------
+++++++
*

-+
+-
-+
=
+-
-+
+-
*

---
---
--+
=
---
-++
--+
=
---
++-
+--
=
-+-
-+-
-+-
=
---
-++
-++
=
+--
-++
--+
=
+-+
-+-
-+-
*

----
-+-+
=
--+-
-+-+
=
+++-
-+-+
=
+-+-
-+--
*

---
+++
=
+-+
+++
=
+++
+++
=
+++
+-+
=
+++
---
*

+
*

-
+
-
=
+
-
+
*

+-+
+++
+-+
=
+++
-+-
+++
*

---
---
+--
=
---
-+-
+--
=
--+
-+-
+--
*

---
+++
---
=
+--
-+-
--+
=
-+-
-+-
-+-
=
--+
-+-
+--
*

+++
---
-+-
=
+--
---
-+-
=
--+
---
-+-
*

+
*

+
*

+


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 12th, 2008, 3:36 pm 
Offline

Joined: November 24th, 2005, 8:16 am
Posts: 851
Z_Gecko wrote:
Very nice,
Thanks.

Here ist the first "mod":


LOL!
Thats a very nice mod.
I was wondering if I would see some game templates here, but I did not expect that the first one would exploit the rotation states so nicely as you did.

Going to play the "Z_Gecko Wicked Mod" (dot txt)

:)

EDIT:
Did you intentionally make the speeds like this?
Starts with 200ms sleep, then from the second piece on, it will use 900ms constantly.

_________________
Sector-Seven - Freeware tools built with AutoHotkey


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 13th, 2008, 2:29 am 
Quote:
EDIT:
Did you intentionally make the speeds like this?
Starts with 200ms sleep, then from the second piece on, it will use 900ms constantly.

No. :shock:
I totally misunderstood the meanings of this values. And was always wondering why it produced that behaviour. Now i know. :oops:


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 13th, 2008, 3:45 am 
Offline

Joined: October 7th, 2006, 4:50 pm
Posts: 3157
Location: MN, USA
Icarus, that is very professionally done! :!: :o I happily relinquish the title of "Best self-contained AHK game produced to date." You've earned it. I love the option to make my own pieces (and so easily too).

One suggestion (from playing a lot of Tetris over the years) - it can be handy to have the drop button (down arrow) execute a "push" when it's just tapped. Meaning it only drops the piece one row per press and doesn't drop the piece all the way to the bottom until it's been held for a second or two. This prevents an accidental down press from ruining a game, and is useful for sliding one piece under the edge of another in slower levels.

Congratulations. The script is wonderful! 8)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 13th, 2008, 10:27 am 
Offline

Joined: November 24th, 2005, 8:16 am
Posts: 851
jaco0646 wrote:
Icarus, that is very professionally done!

Hey, thanks buddy! :)
I am glad you find it amusing.
If you have created your own game, you can post it here if you want - I can put it in the ZIP package,

Quote:
One suggestion (from playing a lot of Tetris over the years) - it can be handy to have the drop button (down arrow) execute a "push" when it's just tapped. Meaning it only drops the piece one row per press and doesn't drop the piece all the way to the bottom until it's been held for a second or two.


You mean you prefer a soft drop instead of the implemented hard drop. I hear you.
Done.

Will post the updated package up in the first post in a few minutes.

_________________
Sector-Seven - Freeware tools built with AutoHotkey


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 13th, 2008, 10:30 am 
Offline

Joined: November 24th, 2005, 8:16 am
Posts: 851
Version 0.13 is up:
  • Added : Some games (thanks Z_Gecko for ChaoTris).
  • Added : If last played game is no longer found (file deleted/renamed), we will load the first found game.
  • Changed: The start button will now have a fixed size.
  • Changed: Hard drop to soft drop (thanks jaco0646)

_________________
Sector-Seven - Freeware tools built with AutoHotkey


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 13th, 2008, 2:44 pm 
Offline

Joined: April 20th, 2006, 5:11 pm
Posts: 75
Location: Vienna
Hi there!
Nice Game. I like it very. But today, while playing, there are 2 situations where I have questions:

1.) While playing, the dropdownlist changes every time the selection. It doesn't jam the game, but it's a litle bit annoying.

2.) While playing ChaoTris, from time to time error messages appear:
Image

Any ideas?

BTW: After confirming the message, the "Block" doesn't fall further, but you can play, when forcing the Block to drop (holding Arrow Down)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 13th, 2008, 2:46 pm 
Offline

Joined: November 24th, 2005, 8:16 am
Posts: 851
Hold on, taking a look.

_________________
Sector-Seven - Freeware tools built with AutoHotkey


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 13th, 2008, 2:58 pm 
Offline

Joined: November 24th, 2005, 8:16 am
Posts: 851
Found the bug caused by ChaoTris.
Fixed, will be uploaded soon.

I was unable to reproduce your drop down list issue.
You are saying it changes while you are playing?
The code seem to handle it.
What OS are you using?

_________________
Sector-Seven - Freeware tools built with AutoHotkey


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 13th, 2008, 3:03 pm 
Offline

Joined: April 20th, 2006, 5:11 pm
Posts: 75
Location: Vienna
Yeah, it changes while acting with the arrow keys. For me, it looks like Focus stays on the ddl control.

Im using Windows XP Sp3.

Thanks for Bugfix.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 13th, 2008, 3:07 pm 
Offline

Joined: November 24th, 2005, 8:16 am
Posts: 851
Thats weird... Since all the arrow keys are mapped to do something else, they are not supposed to effect the GUI.

I am assuming that if you change the focus (press TAB to move the focus to the Start button) this does not happen. Right?

In any case, in the new version I am moving the focus away from the DDL on startup.

Uploading in a few mins.

Thanks for reporting, and I am glad you like it :)

_________________
Sector-Seven - Freeware tools built with AutoHotkey


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 40 posts ]  Go to page 1, 2, 3  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: bbwht, Cerberus, Exabot [Bot], MSN [Bot] and 29 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group