Lyon

Discuss how totally awesome Bang! is here.

Moderator: Terryn

User avatar
Saxxon
the Gargoyle.
Posts: 608
Joined: Tue Jul 25, 2006 10:02 am
Contact:

Re: Lyon

Post by Saxxon »

I'm excited to have Spectere onboard for OpenGL and cross-platform support. An OpenGL-based terminal has been added as of today.

Looks like using Git is working out extremely well.

ghettoflower
viovis
Posts: 48
Joined: Tue Oct 05, 2004 3:55 am
Location: jorja
Contact:

Re: Lyon

Post by ghettoflower »

wow, a new scramcenter. yeah, I was thinking the unimaginative 80X25 but with uhh,starch or something. Congratulations on the open globe
▒░Vivois▒▓█
-i like elk

User avatar
Saxxon
the Gargoyle.
Posts: 608
Joined: Tue Jul 25, 2006 10:02 am
Contact:

Re: Lyon

Post by Saxxon »

Got momentum again. Games are playable. OOP runs. Scrolls need to be re-added to the UI.

I found out that ZZT uses the standard random number generator from Borland Turbo Pascal. https://en.wikipedia.org/wiki/Linear_co ... _generator

The formula is:

Code: Select all

state = (state * 33797) + 1;
return state % n;
The range of random numbers you get is 0 to n-1

User avatar
Appetite4
Official Clamp School Defender
Posts: 204
Joined: Tue Nov 18, 2014 4:57 am
Contact:

Random number generator

Post by Appetite4 »

Always interesting to find out this information. My day job requires me to convert old Pascal code on occasion.

It does seem weird how C managed to completely supplant Pascal during the 1990s. I guess it was just better.

User avatar
Saxxon
the Gargoyle.
Posts: 608
Joined: Tue Jul 25, 2006 10:02 am
Contact:

Re: Lyon

Post by Saxxon »

Immediately after these findings, I discovered it's not the whole truth :)

The entire 32 bit state is kept, but only the upper 16 bits are considered for the random number- so it's actually:

Code: Select all

state = (state * 33797) + 1;
return (state >> 16) % n;

User avatar
Saxxon
the Gargoyle.
Posts: 608
Joined: Tue Jul 25, 2006 10:02 am
Contact:

Re: Lyon

Post by Saxxon »

What does it take to generate the drum sounds ZZT makes?

This table of frequencies:

Code: Select all

0: 3200
1: 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000, 2100, 2200, 2300, 2400
2: 4800, 4800, 8000, 1600, 4800, 4800, 8000, 1600, 4800, 4800, 8000, 1600, 4800, 4800
3: (empty)
4: 500,  2556, 1929, 3776, 3386, 4517, 1385, 1103, 4895, 3396, 874,  1616, 5124, 606
5: 1600, 1514, 1600, 821,  1600, 1715, 1600, 911,  1600, 1968, 1600, 1490, 1600, 1722
6: 2200, 1760, 1760, 1320, 2640, 880,  2200, 1760, 1760, 1320, 2640, 880,  2200, 1760
7: 688,  676,  664,  652,  640,  628,  616,  604,  592,  580,  568,  556,  544,  532
8: 1207, 1224, 1163, 1127, 1159, 1236, 1269, 1314, 1127, 1224, 1320, 1332, 1257, 1327
9: 378,  331,  316,  230,  224,  384,  480,  320,  358,  412,  376,  621,  554,  426

User avatar
Saxxon
the Gargoyle.
Posts: 608
Joined: Tue Jul 25, 2006 10:02 am
Contact:

Re: Lyon

Post by Saxxon »

Picked this back up now that I have a good sense of direction again. I think by now a ZZT emulation is not as valuable as a good editor with mouse support. Still, I want to have facilities for better debugging ZZT games during development.

We're almost done with moving to IoC+OpenTK. I'm really back in the groove with this project and hope to have something cool to show soon.

User avatar
Dark-Star2018
Ordinery
Posts: 39
Joined: Fri Nov 23, 2018 10:52 pm
Location: Nebraska, USA

Re: Lyon

Post by Dark-Star2018 »

As much as all this programming lingo goes a mile over my head, I'm cheering y'all on as hard as I can.
Energizer - you are invincible
ZZT @narchists unite! Turn off the dark, get free money, defeat death itself!

User avatar
Saxxon
the Gargoyle.
Posts: 608
Joined: Tue Jul 25, 2006 10:02 am
Contact:

Re: Lyon

Post by Saxxon »


Post Reply