z2

I agree. Take me to the spicy page.
It is currently Mon Aug 21, 2017 10:18 am

All times are UTC




Post new topic Reply to topic  [ 561 posts ]  Go to page Previous  1 ... 34, 35, 36, 37, 38
Author Message
 Post subject: Re: Lyon
PostPosted: Mon Feb 02, 2015 4:33 am 
Offline
the Gargoyle.
User avatar

Joined: Tue Jul 25, 2006 10:02 am
Posts: 601
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.


Top
 Profile  
 
 Post subject: Re: Lyon
PostPosted: Mon Feb 09, 2015 9:54 am 
Offline
viovis
User avatar

Joined: Tue Oct 05, 2004 3:55 am
Posts: 48
Location: jorja
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


Top
 Profile  
 
 Post subject: Re: Lyon
PostPosted: Fri Jul 29, 2016 4:37 pm 
Offline
the Gargoyle.
User avatar

Joined: Tue Jul 25, 2006 10:02 am
Posts: 601
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_congruential_generator

The formula is:
Code:
state = (state * 33797) + 1;
return state % n;

The range of random numbers you get is 0 to n-1


Top
 Profile  
 
 Post subject: Random number generator
PostPosted: Sun Jul 31, 2016 1:46 pm 
Offline
Official Clamp School Defender
User avatar

Joined: Tue Nov 18, 2014 4:57 am
Posts: 168
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.


Top
 Profile  
 
 Post subject: Re: Lyon
PostPosted: Mon Aug 01, 2016 12:43 pm 
Offline
the Gargoyle.
User avatar

Joined: Tue Jul 25, 2006 10:02 am
Posts: 601
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:
state = (state * 33797) + 1;
return (state >> 16) % n;


Top
 Profile  
 
 Post subject: Re: Lyon
PostPosted: Mon Aug 01, 2016 5:59 pm 
Offline
the Gargoyle.
User avatar

Joined: Tue Jul 25, 2006 10:02 am
Posts: 601
What does it take to generate the drum sounds ZZT makes?

This table of frequencies:

Code:
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 561 posts ]  Go to page Previous  1 ... 34, 35, 36, 37, 38

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot 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:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group