Tyger

Discuss how totally awesome Bang! is here.

Moderator: Terryn

User avatar
Dr. Dos
OH YES! USE VINE WHIP! <3
Posts: 1772
Joined: Tue Mar 11, 2003 12:00 am
Location: Washington

Post by Dr. Dos »

My video card died on me recently so now is a good time to work on recreating a text mode game.

I overhauled the controls so that they can be customized.

I also added in Reload/Inventory keys bound to R/I which will #set r/i or #clear r/i depending on whether the flag is already set or not.

This means just one key to bring up the inventory in games that rely on ?+i or ?-i to access an inventory as well as ?+r/?-r for those few games that have reloading mechanics.

The configuration file is structured as "note to self this is the key", the key's scancode, and the string pressing it returns.

Code: Select all

Up	273	up
Down	274	down
Left	276	left
Right	275	right
Space	32	shootflow
F1	282	#change yellow solid white fake
F2	283	null
F3	284	Save
F4	285	ScreenToggle
F5	286	Screenshot
F6	287	null
F7	288	null
F8	289	null
F9	290	null
F10	291	QuitGame
F11	292	SaveQuit
F12	293	null
P	112	Pause
T	116	Torch
I	105	Inventory
R	114	Reload
-	45	PrevBoard
=	61	NextBoard
-	269	PrevBoard
+	270	NextBoard
/	47	CheatCheck

LEAVE A BLANK LINE ABOVE THIS.
You'll notice F1 is bound to a line of ZZT-Oop. It will be possible for games to use custom input this way. One could just as easily avoid checking for the "i" flag and just bind the I key to "#inventory:open".

The code executed in this matter is executed by the player and any clones, whether or not I'll do something to allow multiple lines to be executed is a mystery.
Visit the Museum of ZZT
Follow Worlds of ZZT on Twitter

Apologies for the old post you may have just read.
User avatar
Commodore
fgsdfs
Posts: 2471
Joined: Wed Mar 12, 2003 5:44 pm
Location: :noitacoL
Contact:

Post by Commodore »

maybe have the macro made to open a file and have the customized key read code from the file. Not sure but that might be easier than binding ??? lines of code directly to a key.
*POW* *CLANK* *PING*
User avatar
Quantum P.
Level 17 Accordion Thief
Posts: 1433
Joined: Fri Sep 12, 2003 1:41 am
Location: Edmonds, WA
Contact:

Post by Quantum P. »

What Commodore said would make it easier to write long programs to run on a keypress.

Executing full programs on a keypress raises some issues, such as:
- What happens when the user holds down a key bound to a long-running program?
- At what cycle do these programs run?
- If a keypress program has labels, can messages be sent to it?

But it would also be really interesting to see what people would do with it: with multiple lines, could you put the bulk of the engine in the configuration file? Because the player executes the code, you could write a sidescroller where the player jumps up and down, instead of an object representing the player.

Also consider there’s stuff that just doesn’t make sense for keypress programs, like how direction commands in scrolls will crash ZZT. For example, #bind probably shouldn’t do anything.
User avatar
Commodore
fgsdfs
Posts: 2471
Joined: Wed Mar 12, 2003 5:44 pm
Location: :noitacoL
Contact:

Post by Commodore »

Does following a hyperlink take a cycle?
*POW* *CLANK* *PING*
User avatar
Dr. Dos
OH YES! USE VINE WHIP! <3
Posts: 1772
Joined: Tue Mar 11, 2003 12:00 am
Location: Washington

Post by Dr. Dos »

Commodore wrote:Does following a hyperlink take a cycle?
No.
Visit the Museum of ZZT
Follow Worlds of ZZT on Twitter

Apologies for the old post you may have just read.
User avatar
Dr. Dos
OH YES! USE VINE WHIP! <3
Posts: 1772
Joined: Tue Mar 11, 2003 12:00 am
Location: Washington

Post by Dr. Dos »

Tyger 0.60

Source


I haven't bothered posting something in months.

Changes
Tyger Specific
+ I/R now bound to Inventory and Reload functions which will #set i/r or #clear i/r as needed.
+ Input system overhauled to be easier both for myself and the user. It is also possible to bind keys to execute a line of ZZT-Oop.
+ Added a partial rendering mode which only renders tiles known to have changed. This is on by default.
+ A game or save name can be passed as a parameter at the command line to automatically load a file such as "Tyger.py Town.zzt"
+ Tyger will now open in the center of your screen thanks to an SDL command.
+ Games can now have names which can be displayed in a single foreground/background color on the world select screen. A utility to do this for you is forthcoming.
+ Games can now be saved. Either use F3 to type in a name or F11 to quicksave with the game's name (or your last save name).
+ Cheats and saves are handled in a blue window instead of the console.

Graphics

ZZT Support
+ Spacebar allows you to shoot in the last direction you moved.
+ Full range of elements interpreted (blinking and extra text). The second set of text IS converted to the first and will not be saved differently from traditional text.
+ Ruffians implemented.
+ Slimes implemented but are clearly off when compared to ZZT.
+ Lions implemented.
+ Sharks implemented. Sure is fortunate that they are the exact same thing other than what they move on isn't it?
+ Stars implemented.

ZZT-Oop Support
+ #Change implemented.
+ #Put implemented.
+ #If any now supports colors.

Enhanced ZZT-Oop
+ #Change/#Put/#If any supports enhanced color precision. (#if any red darkred breakable label)

Fixes
+ Screenshots will now always be numbered one higher than the current highest numbered screenshot.
+ Letting go of shift but continuing to hold a direction will no longer cause you to continue shooting.
+ Set and clear now look at the full range of flags (previously it would be impossible to clear the latest flag, and setting it a second time would cause a duplicate flag)
+ Fixed OOP desyncing when using #send <label> rather than simply #<label>
+ Fixed bug with passages not always placing the player on the right tile.
+ ? movement now works properly.
+ #try <dir> <label> will now go to that label, though there is a delay that shouldn't occur.

Known Issues
+ #if thing !label;A thing. Doesn't work. So much for inventory based games.
+ Pausing is broken
+ Darkness not entirely implemented and can crash
+ #try <dir> <label> will now go to that label, though there is a delay that shouldn't occur.
+ The tile beneath stat elements originally isn't colored properly
+ A lot of things aren't smart about the edge of the board and will look outside of the range crashing Tyger.
+ Re-enter when zapped isn't too picky about what it ends up placing you on top of. Then again maybe not.
+ Custom palletes are a mess.
+ Saves don't currently handle text (as in F4 in the editor) correctly
+ Saves don't handle elements underneath stat elements correctly
+ There is a case where multi line messages will show up as single lined messages. See Aura's level popups.
+ #Put without a color can cause color issues. See Aura's breakable walls when changing auras.
+ Pushing things with stats has issues when you are pushing diagonally or multiple spaces at a time with tweaked X/Y-steps.
+ Blinkwalls will cause a crash if the wall hits the edge of the board. The timing is currently wrong as well.
+ Absurd directions not implemented! Don't use /cw cw rndp opp cw ccw opp cw opp ccw rnd just yet!
+ Fully written directions do not work yet either, as in #go north
+ #locks in :touch statements causes looping messages when enter is used?
+ Bombs exploding off edges (see north board in 0.zzt's hub)
Visit the Museum of ZZT
Follow Worlds of ZZT on Twitter

Apologies for the old post you may have just read.
User avatar
Kjorteo
^o.O^
Posts: 432
Joined: Sat Feb 28, 2004 10:59 am
Location: Kjorteoville or something
Contact:

Post by Kjorteo »

Hey, making some decent progress. Good work. :keen:
"You're alive," said the maker, and smiled at the aardvark.

<Kjorteo> "yiff"
<gbelo> Wanna yiff.
<Kjorteo> yes
<gbelo> No no no.
User avatar
Zandor 12
What has science done???
Posts: 355
Joined: Wed Mar 12, 2003 5:19 am
Location: Neo Dakota
Contact:

Post by Zandor 12 »

Keep up the good work, Dos. This looks better every time you update.
User avatar
Dr. Dos
OH YES! USE VINE WHIP! &lt;3
Posts: 1772
Joined: Tue Mar 11, 2003 12:00 am
Location: Washington

Post by Dr. Dos »

Messages now work properly in every case but one. So #if rope !1;Rope will work.

The one case that doesn't?

Code: Select all

#end
:shot
Line one
#give gems 1
Line 3
#give gems 1
5
#give gems 1
7
#give gems 1
9
#give gems 1
11
#give gems 1
13
#give gems 1
15
#give gems 1
17
#give gems 1
19
#give gems 1
21
#give gems 1
23
#give gems 1
25
#give gems 1
27
#give gems 1
29
#give gems 1
31
#give gems 1
33
#give gems 1
35
#give gems 1
37
#give gems 1
39
#give gems 1
Line one
#give gems 1
Line 3
#give gems 1
5
#give gems 1
7
#give gems 1
9
#give gems 1
11
#give gems 1
13
#give gems 1
15
#give gems 1
17
#give gems 1
19
#give gems 1
21
#give gems 1
23
#give gems 1
25
#give gems 1
This will end up as a single line
Ultimately ends up displaying a multi-line textbox with 25 as well as the single line line. I'm just off by one somewhere.
Visit the Museum of ZZT
Follow Worlds of ZZT on Twitter

Apologies for the old post you may have just read.
User avatar
premchai21
draco somniculosus
Posts: 20
Joined: Thu Oct 01, 2009 1:00 am

Post by premchai21 »

thematrixeatsyou wrote:

Code: Select all

#if#shoot n
Shoots north.
Shoots north only if there's at least one empty flag slot, mwahahahaha.
User avatar
Dr. Dos
OH YES! USE VINE WHIP! &lt;3
Posts: 1772
Joined: Tue Mar 11, 2003 12:00 am
Location: Washington

Post by Dr. Dos »

Text is now saved properly. See, I'm still around!
Visit the Museum of ZZT
Follow Worlds of ZZT on Twitter

Apologies for the old post you may have just read.
User avatar
Kjorteo
^o.O^
Posts: 432
Joined: Sat Feb 28, 2004 10:59 am
Location: Kjorteoville or something
Contact:

Post by Kjorteo »

:agh:
"You're alive," said the maker, and smiled at the aardvark.

<Kjorteo> "yiff"
<gbelo> Wanna yiff.
<Kjorteo> yes
<gbelo> No no no.
User avatar
Dr. Dos
OH YES! USE VINE WHIP! &lt;3
Posts: 1772
Joined: Tue Mar 11, 2003 12:00 am
Location: Washington

Post by Dr. Dos »

Games which start on the title screen start properly again too.
Visit the Museum of ZZT
Follow Worlds of ZZT on Twitter

Apologies for the old post you may have just read.
User avatar
Dr. Dos
OH YES! USE VINE WHIP! &lt;3
Posts: 1772
Joined: Tue Mar 11, 2003 12:00 am
Location: Washington

Post by Dr. Dos »

No not quite...

Image

You are just setting yourself up for another hour of debugging if you comment a section of code as "Easy fix".

Bears implemented.
Visit the Museum of ZZT
Follow Worlds of ZZT on Twitter

Apologies for the old post you may have just read.
User avatar
zamros
my power level is enormous
Posts: 543
Joined: Thu Mar 20, 2003 9:34 pm

Post by zamros »

I love dancing bears
Post Reply