LINK II

Housing for low income families.

Moderators: nuero, Ando

User avatar
bitbot
Official Clamp School Defender
Posts: 328
Joined: Thu Mar 01, 2012 3:00 am
Location: earthbound
Contact:

Re: LINK II ZZT

Post by bitbot »

Commodore wrote:that looks great :tie:

I wish I could help on the idle front but I am clueless.
Thanks! It should be fun.
Let me rephrase that:

MOD2ZZT is very accurate at calculating idles.
I want to know how it works, so I can tweak the theme song and ensure loops have the "correct" number.
Quantum P?
Last edited by bitbot on Tue Mar 20, 2012 4:07 pm, edited 1 time in total.
Image Image
User avatar
Quantum P.
Level 17 Accordion Thief
Posts: 1433
Joined: Fri Sep 12, 2003 1:41 am
Location: Edmonds, WA
Contact:

Re: LINK II ZZT

Post by Quantum P. »

At #cycle 1, a sixteenth note has the length of 1 idle. So the following is exactly idle-d:

Code: Select all

#cycle 1
'nothing playing right now
#play tcd
'each note takes 1/2 of an idle
/i
#play se
/i
#play if
/i/i
#play qg
/i/i/i/i
#play ha
/i/i/i/i/i/i/i/i
#play wb
/i/i/i/i/i/i/i/i/i/i/i/i/i/i/i/i
'music stops exactly here
Minor technical-correctness detail: this assumes that ZZT is running at the default speed (see setting "Game Speed" on the title screen menu; default is where the arrow points at the ":" in "F....:....S"). But default speed is pretty much assumed (the user would have to go out of his way to change it), so don't worry about what I just said here.
bitbot wrote:I have a sneaking suspicion that results may vary on different machine speeds... Is this correct?
It's possible, but I don't think it would be significant. The only way I can see machine speed figuring into it is if your ZZT-OOP completely bogs down ZZT (which would make idles longer -- in which case you have more serious problems, like the player only being able to take a step every 2 seconds).
bitbot wrote:What I've done is created a music object that sets/clears flags for each #PLAY so when you enter the next room, a duplicate object continues playing where it left off... It works pretty well.
Holy cow, that's pretty impressive! I'm looking forward to seeing this in action. But if it starts to become too much work, don't be afraid to rework it -- that's above-and-beyond effort right there.

Do you literally have flags for every #play statement, or are you clustering #play statements together? If you put one #play immediately after another, with no commands in-between, I'm pretty sure that there's no way for the player to leave the board after the first one but before the second one.
User avatar
bitbot
Official Clamp School Defender
Posts: 328
Joined: Thu Mar 01, 2012 3:00 am
Location: earthbound
Contact:

Re: LINK II ZZT

Post by bitbot »

Quantum P. wrote:At #cycle 1, a sixteenth note has the length of 1 idle. So the following is exactly idle-d:

Code: Select all

#cycle 1
'nothing playing right now
#play tcd
'each note takes 1/2 of an idle
/i
#play se
/i
#play if
/i/i
#play qg
/i/i/i/i
#play ha
/i/i/i/i/i/i/i/i
#play wb
/i/i/i/i/i/i/i/i/i/i/i/i/i/i/i/i
'music stops exactly here
Thanks mate, you answered my question!
So if:
SX @ Cycle 1 = 1 idle
TX @ Cycle 1 = 1/2 idle

Does:
TX @ Cycle 2 = 1 idle
TX @ Cycle 3 = 1 1/2 idle
TX @ Cycle 4 = 2 idle

etc???
Quantum P. wrote: Holy cow, that's pretty impressive! I'm looking forward to seeing this in action. But if it starts to become too much work, don't be afraid to rework it -- that's above-and-beyond effort right there.

Do you literally have flags for every #play statement, or are you clustering #play statements together? If you put one #play immediately after another, with no commands in-between, I'm pretty sure that there's no way for the player to leave the board after the first one but before the second one.
Thanks. I won't let you down! It's actually kinda simple ZZT logic... When I got it working, It was music to my ears! It does need a little cleanup.
You are correct. The #play statements are separated and are only called with the appropriate flags.
(:m22, :m23, :m24, etc.)

Having music traverse boards is really worth the effort. It wouldn't be possible without KevEdit and MOD2ZZT.
Thanks for taking the time out of your busy schedule! Shouldn't have too much trouble from here...
User avatar
Quantum P.
Level 17 Accordion Thief
Posts: 1433
Joined: Fri Sep 12, 2003 1:41 am
Location: Edmonds, WA
Contact:

Re: LINK II ZZT

Post by Quantum P. »

No, #cycle doesn't affect how fast the music plays -- it only affects how long the idles are.
User avatar
bitbot
Official Clamp School Defender
Posts: 328
Joined: Thu Mar 01, 2012 3:00 am
Location: earthbound
Contact:

Re: LINK II ZZT

Post by bitbot »

I'll rephrase. Most of the ZZMs use cycle 4 for example.

What is the note length-to-idle ratio for cycles 2 3 & 4?
User avatar
Quantum P.
Level 17 Accordion Thief
Posts: 1433
Joined: Fri Sep 12, 2003 1:41 am
Location: Edmonds, WA
Contact:

Re: LINK II ZZT

Post by Quantum P. »

  • /i at #cycle 1 lasts a sixteenth note (sx)
  • /i at #cycle 2 lasts an eighth note (ix), or two sixteenths (sxx)
  • /i at #cycle 3 lasts a dotted eighth note (i.x), or three sixteenths (sxxx)
  • /i at #cycle 4 lasts a quarter note (qx), or four sixteenths (sxxxx)
#cycle n makes idles take n times as long, compared to an idle at #cycle 1.

I'm guessing ZZMs mostly use #cycle 4 because you only need 1/4 as many idles, and because the math works out conveniently with most music (i.e., most music won't need fractional idles).
User avatar
bitbot
Official Clamp School Defender
Posts: 328
Joined: Thu Mar 01, 2012 3:00 am
Location: earthbound
Contact:

Re: LINK II ZZT

Post by bitbot »

You sir, are a gentleman and a scholar!

Just added a couple more bonus ZZMs... Now comes the fun part, creating puzzles and programming it all. :)
Image Image
User avatar
bitbot
Official Clamp School Defender
Posts: 328
Joined: Thu Mar 01, 2012 3:00 am
Location: earthbound
Contact:

Re: LINK II ZZT

Post by bitbot »

Piece of cake! (yea right)

Code: Select all

@Title
#cycle 4
#play -tc#s.x-ta#xa#xa#s.xta#xa#xa#s.xta#x
/i/i
#play --ta#xa#s.xta#xa#x+c#s.x-ta#xa# txa#
/i/i/i
#play --s.xta#xa#xa#s.xta#xa#xa#s.xta#xa#x
/i/i/i
:loop
#play ta#s.x--ta#xa#x++fs.x--ta#xa#xa#s.x
/i/i
#play ta#x--a#x++a#x+cxdxd#xfs.x
/i/i
#play --tg#xg#xg#s.xtg#xg#xg#s.x
/i/i
#play --tg#xg#xg#s.xtg#xg#x++ta#s.x
/i/i
#play --tf#xf#x++tfs.x--tf#xf#xf#s.x
/i/i
#play ta#x--f#x++a#x+cxdxd#xfs.x
/i/i
#play --tfxfxfs.xtfxfxfs.xtfxfxfs.xtfxfx
/i/i/i
#play ta#s.x--ta#xa#x++fs.x--ta#xa#xa#s.x
/i/i
#play ta#x--a#x++a#x+cxdxd#xfs.x
/i/i
#play --tg#xg#xg#s.xtg#xg#xg#s.x
/i/i
#play +tfx---g#x+++fsxtf#---g#+++g#---tg#x
/i/i
#play +ta#---s.xtf#xf#xf#s.xtf#xf#xf#s.x
/i/i
#play ---tf#+++a#---f#x+++a#sxtg#---f#
/i/i
#play +tf#---f#x+++g#+s.x---tc#x++f#x
/i
#play +tfs.x--tc#xc#xc#s.xtc#xc#x++f
/i/i
#play s.x-tc#xc#x
/i
#play +td#s.xtd#xfxf#s.xt---bxbxbs.xtbxbx
/i/i
#play +tfs.xtd#x---bx+++c#s.xtc#xd#xfs.x
/i/i/i
#play --ta#xa#xa#s.xta#xa#x+++d#s.xtc#x
/i/i/i
#play ---ta#+++xcs.xtcxdxes.x--tcxcxcs.xtc
/i/i/i
#play tx-cx++g+s.x---tcxcx++fs.x-tfxfxf
/i/i
#play s.xtfxfxfs.xtfxfxfs.xtfxfx
/i/i
#play ta#s.x--ta#xa#x++fs.x--ta#xa#xa#s.x
/i/i/i
#play ta#x--a#x++a#x+cxdxd#xfs.x
/i/i
#play --tg#xg#xg#s.xtg#xg#xg#s.x
/i/i
#play +tfx---g#x+++fsxtf#---g#+++g#g#x
/i/i
#play +ta#s.x---tf#xf#xf#s.xtf#xf#xf#
/i/i
#play --s.xtf#xtf#x++++c#s.x----tf#xf#x
/i/i
#play ++tcs.x----tfxfx+++a
/i
#play --s.xtfxfxtfs.xtfxfx+++fs.x---tfxfx
/i/i/i
#play +tf#---sxta#x+c#sxtesxta#x+c#sxtes.x
/i/i/i
#play --texex+++a#s.x---texex+++as.x
/i/i
#play --tfxfx+++fs.x---tfxfx-fs.x-tfxfx
/i/i
#play t+f---s.xtfxfx
/i
#play +tf#---sxta#x+c#sxtesxta#x+c#sxtes.x
/i/i
#play --texex+++a#s.x---texex+++as.x
/i/i
#play --tfxfx+++fs.x---tfxf-xtfs.x tfxfx
/i/i/i
#play t+d---s.xtfxfx
/i
#play +td#---s.xtbxbxbs.xtbxbxbs.xtbxbx
/i/i
#play +tf#s.x---tbxbx+++fs.x---ta#xa#tx
/i/i
#play +tc#---s.xta#xa#xa#s.x
/i/i
#play --ta#xa#x++a#s.x--ta#xa#x
/i/i
#play +tcs.xtcxdxes.x--tcxcxcs.xtc
/i/i
#play tx-cx++g+s.x---tcxcx++fs.x-tfxftxf
/i/i/i
#play s.xtfxfxfs.xtfxfxfs.xtfxfx
/i/i/i
#loop
A little speedy, but it will have to do. All songs loop across all boards without a hitch! :)
Image Image
User avatar
Commodore
fgsdfs
Posts: 2471
Joined: Wed Mar 12, 2003 5:44 pm
Location: :noitacoL
Contact:

Re: LINK II ZZT

Post by Commodore »

I have to say that sounds the best so far!
*POW* *CLANK* *PING*
User avatar
bitbot
Official Clamp School Defender
Posts: 328
Joined: Thu Mar 01, 2012 3:00 am
Location: earthbound
Contact:

Re: LINK II ZZT

Post by bitbot »

I appreciate the encouragement guys, especially during this final phase.

Todo:
Dialogue
Revise battle engine
Overworld side quests
Polish off fishing game
Final level puzzles
Done!

Another dungeon is complete. Here's a spoiler: (Bird's eye view)
Attachments
dungeon2.gif
Image Image
User avatar
Commodore
fgsdfs
Posts: 2471
Joined: Wed Mar 12, 2003 5:44 pm
Location: :noitacoL
Contact:

Re: LINK II ZZT

Post by Commodore »

I really like the style. It captures the zelda feel very well.
*POW* *CLANK* *PING*
User avatar
bitbot
Official Clamp School Defender
Posts: 328
Joined: Thu Mar 01, 2012 3:00 am
Location: earthbound
Contact:

Re: LINK II ZZT

Post by bitbot »

So I hit the 20k limit yet again on the menu screen... and I've got no more corners to cut, something's got to give. :-(
I'm starting to fear that dreaded 350k too.

:safe:

Solved: Moved Soundtest to its own board. If the world gets too tight it will get exported.
User avatar
bitbot
Official Clamp School Defender
Posts: 328
Joined: Thu Mar 01, 2012 3:00 am
Location: earthbound
Contact:

Re: LINK II ZZT

Post by bitbot »

So I've been busy cleaning up the music, and I guess there's something I'm not getting.

Quantum P.
Here's a simple example song. Each line is on beat. Each idle matches exactly.
Why does it fail to loop after a while?

Code: Select all

@ff
#cycle 4
:lp
#play i+a#d#-bg#+g#d#-bg#
/i/i
#play i+gd#-bg#+g#d#-bg#
/i/i
#play i+g#c#-a#f#+f#c#-a#f#
/i/i
#play i+fc#-a#f#+f#c#-a#f#
/i/i
#play i+f#-bg#f+f-bg#f
/i/i
#play i+e-bg#f+f-bg#f
/i/i
#play i+f-a#f#d#+d#-a#f#d#
/i/i
#play i+d-a#f#d#+d#-a#f#d#
/i/i
#play i+a#d#-bg#+g#d#-bg#
/i/i
#play i+gd#-bg#+g#d#-bg#
/i/i
#play i+bec#-a#+a#ec#-a#
/i/i
#play i+aec#-a#+a#ec#-a#
/i/i
#play i++c#-d#-bg#+bd#-bg#
/i/i
#play i+a#d#-bg#+bd#-bg#
/i/i
#play i+a#-bg#f+g#-bg#f
/i/i
#play i+f#-bg#f+f-bg#f
/i/i
#lp
User avatar
Saxxon
the Gargoyle.
Posts: 608
Joined: Tue Jul 25, 2006 10:02 am
Contact:

Re: LINK II ZZT

Post by Saxxon »

It's not timed correctly. I is being used as speed. One tick of I music is 2 cycles. You need to double up on your /i. Alternatively, you can change cycle to 8.

Because of the way cycles work, I advise adding more /i. Cycle values over 7 cause jitter over longer periods of time due to the way the counter wraps (you can find out if the counter will wrap correctly if 420 is divisible by the cycle)
User avatar
bitbot
Official Clamp School Defender
Posts: 328
Joined: Thu Mar 01, 2012 3:00 am
Location: earthbound
Contact:

Re: LINK II ZZT

Post by bitbot »

I always do that. I always mess up some mundane detail.
I'm by no means a mathematician or a musician, but I'm learning. :)

Edit: Wow, this really helped me out. The song I was having trouble with has a part with a different time signature. Adding more idles with a faster cycle accommodated all the notes. Thanks Saxxon!
Post Reply