z2

I agree. Take me to the spicy page.
It is currently Tue Dec 12, 2017 12:10 pm

All times are UTC




Post new topic Reply to topic  [ 235 posts ]  Go to page Previous  1 ... 12, 13, 14, 15, 16
Author Message
 Post subject: Re: ZZT Ultra
PostPosted: Thu Oct 19, 2017 5:33 pm 
Offline
OH YES! USE VINE WHIP! <3
User avatar

Joined: Tue Sep 11, 2001 9:11 am
Posts: 1743
Location: scabsboro
Keep us updated!

_________________
<asgromo> Dr Dos; What is this monstrocity?
<Spectere> Aura 2
<asgromo> This thread is useless... I'll just... read the Featured Games article.
<asgromo> ... I'll just look for boners.


Top
 Profile  
 
 Post subject: All of a sudden
PostPosted: Sun Oct 22, 2017 5:27 pm 
Offline
Official Clamp School Defender
User avatar

Joined: Tue Nov 18, 2014 4:57 am
Posts: 180
Starting to get a lot happier about the HTML 5 progress being made. Most ZZT and Super ZZT games now load correctly, title screen and gameplay seem to work marginally well, scrolling and dissolve transitions work well (albeit rather slow), GUIs and scroll interfaces seem to work well (once again, a bit on the slow side).

What doesn't work so well: GUI and world editors (not tested yet), sound (not working at all yet), and some worlds do not load (no idea why at this time).

Most peculiar of all is the player movement--the controls seem strangely "floaty" as if arrow keys are being double-registered half the time. I had griped about inconsistent character and scan codes across browsers in the past; this is likely that problem coming home to roost now.

Something I've noticed with Chrome, too: Chrome hates it when you try to pre-load local image files in the browser. When I make the HTML 5 downloadable copy available, I'll include instructions to modify the Chrome shortcut to have "--allow-file-access-from-files" on the command line. Yes, I know, it's more secure to prevent local file access, but we kind of need those image files for sprites!


Top
 Profile  
 
PostPosted: Sat Oct 28, 2017 3:25 pm 
Offline
Official Clamp School Defender
User avatar

Joined: Tue Nov 18, 2014 4:57 am
Posts: 180
Looks like the HTML 5 version of ZZT Ultra can fully play many adventures now, including some games that are technically impressive. CATCAT.ZZT plays perfectly.

Everything is still very silent, though...I'm not looking forward to having to re-design my entire sound system.

Performance metrics have given me some interesting data. At least on my computer on Firefox, I can update around 500 tiles at once without dropping frames. But when you need to update many more than this (e.g. scrolling screens, scroll interface open/close, palette color changes), the update rate drops to only about 4 FPS. I had always been concerned that HTML 5 would be worse on the performance front; I'll need to use some creativity to support the higher-load games.


Attachments:
File comment: Cat, Cat, That Damn Cat plays perfectly in HTML 5 version
html5_progress_catcat.png
html5_progress_catcat.png [ 26.32 KiB | Viewed 195 times ]
Top
 Profile  
 
 Post subject: Re: ZZT Ultra
PostPosted: Mon Oct 30, 2017 5:05 pm 
Offline
the Gargoyle.
User avatar

Joined: Tue Jul 25, 2006 10:02 am
Posts: 602
Great progress!


Top
 Profile  
 
 Post subject: Re: ZZT Ultra
PostPosted: Mon Oct 30, 2017 9:35 pm 
Offline
fgsdfs
User avatar

Joined: Wed Mar 12, 2003 5:44 pm
Posts: 2423
Location: :noitacoL
What audio format are you using? Just throwing it out there without any knowledge of its viability, but maybe a single file with all the possible sounds in it and timestamp indexed. Since the sounds (excluding the drums) are all uniform waveforms, the samples could be quite small and set to repeat depending on length of the required note, making the file small too, but I don't know if the response time would be quick enough to not have gaps.

Maybe you could even have attack and decay that way:

Code:
   ______
  /      \
 /        \
/          \


|    | play once
   |    | repeat n times
      |    | play last time

_________________
*POW* *CLANK* *PING*


Top
 Profile  
 
 Post subject: Getting much closer now
PostPosted: Fri Nov 10, 2017 4:03 am 
Offline
Official Clamp School Defender
User avatar

Joined: Tue Nov 18, 2014 4:57 am
Posts: 180
Since most ZZT and SZT files play in the HTML 5 version of Ultra, I decided to work on WAD files. DEMO.WAD now plays completely, including the sample boss. This means nearly all of the advanced ZZT-OOP commands function properly, not to mention most of the WAD loading code.

Palette changes are painfully slow, though--you have to assume the worst-case scenario when you change palette color registers. This is because you must update the whole screen should the color be registered everywhere. Previously-mentioned performance problems take a real beating here.

Character set updates also need work. Shouldn't be too hard.

Does Smash ZZT play yet? Heh heh heh...no. I made an ugly discovery that will require some juggling of data formats: nearly all JSON parsers assume you are reading and writing UTF-8 format. But as any ZZTer knows, the DOS text we are all used to employs CP-437, which adopts a one-character, one-byte model. Not so good with codes >= 128 when UTF-8 is expected. But JSON parsers can't be arsed to mark up these codes with the \unnnn syntax--oh no! They just choose arbitrarily whether to mark up the code or not mark up the code based on how they feel that day.

The JSON parsing issue is one of the many frustrations I've faced so far. This leads me to my next logical course of action: proposing an international treatise banning Unicode (not really).


Top
 Profile  
 
 Post subject: Re: ZZT Ultra
PostPosted: Fri Nov 10, 2017 8:34 pm 
Offline
OH YES! USE VINE WHIP! &lt;3
User avatar

Joined: Tue Sep 11, 2001 9:11 am
Posts: 1743
Location: scabsboro
I had to do the same with the Museum's file viewer for displaying special characters in object code.

https://museumofzzt.com/static/js/file_viewer.js has a CP437_TO_UNICODE dictionary that links the two character sets up. I also remember an issue with one of the musical notes also being the carriage return character and having to also replace those with <br> since I'm displaying HTML, so there's that one exception in the dictionary.

_________________
<asgromo> Dr Dos; What is this monstrocity?
<Spectere> Aura 2
<asgromo> This thread is useless... I'll just... read the Featured Games article.
<asgromo> ... I'll just look for boners.


Top
 Profile  
 
PostPosted: Fri Nov 17, 2017 1:08 am 
Offline
Official Clamp School Defender
User avatar

Joined: Tue Nov 18, 2014 4:57 am
Posts: 180
This has been a wild ride...my progress has been derailed for a bit while I swapped out my hard drive. The previous one was starting to give out, so I had to port stuff over to the new one.

Unfortunately, creating a system image wasn't possible because the old drive was saying screw you. So that meant a complete re-install of Windows.

...ON A SYSTEM WITHOUT A PLUG-AND-PLAY NETWORK ADAPTER. So, no downloading updates until I manually copied over the driver files.

By this time I was feeling good and frustrated. But then the havoc truly started.

Copying over the ZZT Ultra project files seemed to be a straightforward operation, but a few days worth of updates had been lost. How, I don't know, since I can vouch for the exact dates I made the copies from the old hard disk, but there is fortunately very little to re-do.

I then got the shock of my life. Previously-mentioned slow scrolling and palette speeds suddenly went lightning-fast! I hadn't even tried to fix the problem, and it fixed itself.

Until I updated Firefox. Then the performance problems came back. NO!!

Being completely honest, this really isn't that much to get upset about. It's a first-world problem. But frustration, it appears, never goes away, no matter how convenient the rest of your life might be.


Top
 Profile  
 
PostPosted: Mon Dec 04, 2017 2:54 am 
Offline
Official Clamp School Defender
User avatar

Joined: Tue Nov 18, 2014 4:57 am
Posts: 180
Great progress--I've been able to get Smash ZZT to play comfortably within the HTML 5 version of ZZT Ultra! The character set mods and palette color changes all had to function, plus a whole mess of other features as well, for the game to run.

It is still slow, but I'm going to focus on performance improvements next. The only two major hurdles remaining are the editor (nearly 7,000 lines to debug!) and the sound system (not a trivial re-architecture operation).

I'm currently exploring the use of window.requestAnimationFrame as a way to throttle the update rate if overall performance would otherwise suffer. The engine is not doing this now; this has the consequence of making each frame run just a bit slower than it would in AS3.


Attachments:
File comment: Smash ZZT plays in HTML 5
smash_zzt_html5.gif
smash_zzt_html5.gif [ 41.48 KiB | Viewed 50 times ]
Top
 Profile  
 
 Post subject: Performance solved!
PostPosted: Sat Dec 09, 2017 4:10 pm 
Offline
Official Clamp School Defender
User avatar

Joined: Tue Nov 18, 2014 4:57 am
Posts: 180
Yes!! I got the performance problem licked. Now the update rate is nearly as fast as AS3, including during scroll and dissolve transitions. Palette fades are still slow, and that's due to an unavoidable quirk I found with putImageData.

Basically, in JavaScript, rendering a canvas to a context is fast (drawImage, etc.) but rendering an ImageData to a context is very slow (putImageData, etc). I think putImageData is inefficient and likely not hardware-accelerated.

Smash ZZT plays pretty well, now!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 235 posts ]  Go to page Previous  1 ... 12, 13, 14, 15, 16

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