Super ZZT Land

Housing for low income families.

Moderators: nuero, Ando

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

Re: Super ZZT Land

Post by bitbot »

How about a memory card game like in SMB3?

Image
Last edited by bitbot on Sun Oct 07, 2012 7:28 pm, edited 1 time in total.
Image Image
User avatar
bitbot
Official Clamp School Defender
Posts: 328
Joined: Thu Mar 01, 2012 3:00 am
Location: earthbound
Contact:

Re: Super ZZT Land

Post by bitbot »

Image Image
User avatar
Commodore
fgsdfs
Posts: 2471
Joined: Wed Mar 12, 2003 5:44 pm
Location: :noitacoL
Contact:

Re: Super ZZT Land

Post by Commodore »

As far as mario crossovers go, this is pretty cool:

http://stabyourself.net/mari0/
*POW* *CLANK* *PING*
User avatar
bitbot
Official Clamp School Defender
Posts: 328
Joined: Thu Mar 01, 2012 3:00 am
Location: earthbound
Contact:

Re: Super ZZT Land

Post by bitbot »

Hah, good one! Also stumbled on this ridiculous speed run:
http://www.youtube.com/watch?v=z5o3d104SKQ#movie_player

Can I get some help with randomization?
Last edited by bitbot on Sun Oct 07, 2012 7:31 pm, edited 2 times in total.
Image Image
User avatar
Saxxon
the Gargoyle.
Posts: 608
Joined: Tue Jul 25, 2006 10:02 am
Contact:

Re: Super ZZT Land

Post by Saxxon »

You can use randomization with 2^x or 4^x possibilities depending on how you code the objects. How many possibilities were you looking for? If it isn't exactly one of those numbers, then some choices will have to be more likely than others.

#BECOME <color> OBJECT also works in SuperZZT, but it does not in ZZT.

If that is the layout you are going to use, for the white border, you can save objects by using Web instead, and you can place an object on top of the web with the same color and character without messing it up (web checks for adjacent webs under objects too)
User avatar
Commodore
fgsdfs
Posts: 2471
Joined: Wed Mar 12, 2003 5:44 pm
Location: :noitacoL
Contact:

Re: Super ZZT Land

Post by Commodore »

you can get 1 out of 3 if you discard the 4th result

@rnd3
#end
:rnd
#change red invisible empty
#put rndp rndne red invisible
#if blocked w #one
#if blocked e #two
#if blocked s #three
#rnd
:one
:two
:three

Actually in thinking about it, it might be a good (the only?) use for the bottom row #put bug.

edit: oh yeah, szzt I'm guessing that bug does not exist there.
*POW* *CLANK* *PING*
User avatar
bitbot
Official Clamp School Defender
Posts: 328
Joined: Thu Mar 01, 2012 3:00 am
Location: earthbound
Contact:

Re: Super ZZT Land

Post by bitbot »

Saxxon wrote:You can use randomization with 2^x or 4^x possibilities depending on how you code the objects. How many possibilities were you looking for?
Commodore wrote:you can get 1 out of 3 if you discard the 4th result
Okay, so would two randomization objects (3x3) create 9 combinations?
Saxxon wrote:#BECOME <color> OBJECT also works in SuperZZT, but it does not in ZZT.
Useful tip!
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: Super ZZT Land

Post by Quantum P. »

Can't remember if I've shared it before, but here's a simple random number generator (replace gems with the counter of your choice):

Code: Select all

'object blocked to east, unblocked to north
:choose
#if blocked rndne give gems 1
#if blocked rndne give gems 2
#if blocked rndne give gems 4
#if blocked rndne give gems 8
This will give you from 0 to 15 gems. Using counter math, you can fine-tune the range fairly easily; here's a modification that causes it to pick between 1 and 10 (you can make it much simpler if you don't care about fairness):

Code: Select all

'gems range: [0, 15]
#take gems 10 success
'gems range: [0, 5]
#take gems 4
#take gems 2
#take gems 1
'gems == 0; now we can try again
#choose
:success
'gems range: [0, 9]
#give gems 1
I find this very convenient, but it has the disadvantage of taking up a counter and displaying a number to the player. If the random choice has to be kept secret from the player, you might want to do something to disguise the number (e.g., add some magic constant to it), or generate some decoy numbers.



For shuffling algorithms (and randomizing bitbot's card-matching game is a shuffling problem), the standard is the Fisher-Yates shuffle. It goes like this: (1) march through the list in order, and (2) for each thing in the list, swap it with a random something that comes later in the list. That will produce an unbiased shuffle, but I don't know how much work it would be in ZZT. A simple-but-not-100%-correct algorithm may be good enough.

My advice is to think about this: what is the best way to swap two cards? As soon as you have the ability to swap two arbitrary cards, your randomization problem is effectively solved. You could even make it part of the game, to make it more challenging: every so many turns, two cards light up and swap.

Where/how are you storing the values of the cards?
User avatar
bitbot
Official Clamp School Defender
Posts: 328
Joined: Thu Mar 01, 2012 3:00 am
Location: earthbound
Contact:

Re: Super ZZT Land

Post by bitbot »

Quantum P. wrote:Can't remember if I've shared it before, but here's a simple random number generator (replace gems with the counter of your choice):

Code: Select all

'object blocked to east, unblocked to north
:choose
#if blocked rndne give gems 1
#if blocked rndne give gems 2
#if blocked rndne give gems 4
#if blocked rndne give gems 8
This will give you from 0 to 15 gems. Using counter math, you can fine-tune the range fairly easily; here's a modification that causes it to pick between 1 and 10 (you can make it much simpler if you don't care about fairness):

Code: Select all

'gems range: [0, 15]
#take gems 10 success
'gems range: [0, 5]
#take gems 4
#take gems 2
#take gems 1
'gems == 0; now we can try again
#choose
:success
'gems range: [0, 9]
#give gems 1
I find this very convenient, but it has the disadvantage of taking up a counter and displaying a number to the player. If the random choice has to be kept secret from the player, you might want to do something to disguise the number (e.g., add some magic constant to it), or generate some decoy numbers.



For shuffling algorithms (and randomizing bitbot's card-matching game is a shuffling problem), the standard is the Fisher-Yates shuffle. It goes like this: (1) march through the list in order, and (2) for each thing in the list, swap it with a random something that comes later in the list. That will produce an unbiased shuffle, but I don't know how much work it would be in ZZT. A simple-but-not-100%-correct algorithm may be good enough.

My advice is to think about this: what is the best way to swap two cards? As soon as you have the ability to swap two arbitrary cards, your randomization problem is effectively solved. You could even make it part of the game, to make it more challenging: every so many turns, two cards light up and swap.

Where/how are you storing the values of the cards?
Wow QP, great info.

The shuffle algorithm sparks my curiosity, but I'll keep it simple. I could use ammo as a counter and flags to store the card values. Thanks a lot!
Image Image
User avatar
Commodore
fgsdfs
Posts: 2471
Joined: Wed Mar 12, 2003 5:44 pm
Location: :noitacoL
Contact:

Re: Super ZZT Land

Post by Commodore »

digging the updated screenshot of the match game.
*POW* *CLANK* *PING*
User avatar
Saxxon
the Gargoyle.
Posts: 608
Joined: Tue Jul 25, 2006 10:02 am
Contact:

Re: Super ZZT Land

Post by Saxxon »

If you can manage to keep an iteration of random number generation under 32 commands, you can hide the value from the player (as this is the maximum number of commands that can be run by the OOP interpreter per cycle).

Code: Select all

#if blocked rndne give gems 1
This is one command when it fails and two when it succeeds.

Object order is important. You would want your random number generator to be the lowest possible object number, and the object that cleans up the value as the highest object number.
User avatar
bitbot
Official Clamp School Defender
Posts: 328
Joined: Thu Mar 01, 2012 3:00 am
Location: earthbound
Contact:

Re: Super ZZT Land

Post by bitbot »

Commodore wrote:digging the updated screenshot of the match game.
I'm satisfied. What do you think of the updated crane game?
Saxxon wrote: Object order is important. You would want your random number generator to be the lowest possible object number, and the object that cleans up the value as the highest object number.
I appreciate the tips. No one knows ZZT quite like you.

Image
Last edited by bitbot on Sun Nov 11, 2012 4:27 am, edited 1 time in total.
Image Image
User avatar
Commodore
fgsdfs
Posts: 2471
Joined: Wed Mar 12, 2003 5:44 pm
Location: :noitacoL
Contact:

Re: Super ZZT Land

Post by Commodore »

did you use the webs like i did for the wire? Does it work better than I had it? That was my biggest sticking point about the engine.
*POW* *CLANK* *PING*
User avatar
bitbot
Official Clamp School Defender
Posts: 328
Joined: Thu Mar 01, 2012 3:00 am
Location: earthbound
Contact:

Re: Super ZZT Land

Post by bitbot »

Commodore wrote:did you use the webs like i did for the wire? Does it work better than I had it? That was my biggest sticking point about the engine.
Yup. This is good use of web. The update simply has tighter animation.
No need for me to go heavy duty randomizing the card game. Keep It Simple Stupid.

TODO:
=====
-map engine
-battle system 2.0
-finish levels+bonus
-ending
-testing
-polish

Completion Status:
================
Graphics: 75%
Music: 99%
Level Design: 33%
Programming: 33%

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

Re: Super ZZT Land

Post by bitbot »

Bird's-eye view of overworld map (wip)

Commodore gets his own island:
Attachments
SZZTLAND.PNG
Post Reply