Jump to content

Photo

TI-99/4a disk-based CRPG


248 replies to this topic

#226 PeteE OFFLINE  

PeteE

    Chopper Commander

  • 148 posts
  • Location:Beaverton, OR

Posted Thu Aug 17, 2017 10:29 AM

Which LZW algorithm do you use?  I'm looking into using LZW and Huffman coding to compress pattern tables.  My goal is something very simple to decompress since I want the decompression code to take up as little space as possible.  I've made a sprite compression scheme that takes advantage of horizontal/vertical symmetry and reflection/rotation, but it won't work as well on pattern tables.



#227 adamantyr OFFLINE  

adamantyr

    Stargunner

  • Topic Starter
  • 1,338 posts

Posted Thu Aug 17, 2017 11:33 AM

I use a custom one. I essentially created a library of common english letter combinations that are used by the bottom 31 characters. Characters 32-127 are stored as normal. 128-255 are used to denote a leading space character for the other characters. This gets me around 18-20% compression.

 

I tested using some LZW creator applications, but they all get way too complex too fast, attempting to encode the ENTIRE text block and use an entire word (16 to 32 bit) for encoding. Plus almost all of them strip out punctuation and are case-insensitive, which I NEED both of.

 

My only thought is if I could use the 128-255 range for more keyword replacement, I may get slightly better results, but I would need a means to analyze a large text block and cleanly identify the most optimal matches. I've decided for now to forge forward with my current system since it's better than nothing; I can always investigate better compression later.

 

Here's an assembly snip of my encoding/decoding algorithm:

Spoiler


#228 adamantyr OFFLINE  

adamantyr

    Stargunner

  • Topic Starter
  • 1,338 posts

Posted Fri Aug 25, 2017 1:08 PM

New blog entry up!

 

EDIT: Or not... Yahoo is being terrible with Wordpress lately, and it appears Wordpress is refusing to publish new posts (even though it SAYS it's published). The direct link is:

 

http://adamantyr.com...ng-it-together/



#229 Vorticon OFFLINE  

Vorticon

    River Patroller

  • 3,220 posts
  • Location:Eagan, MN, USA

Posted Sat Aug 26, 2017 9:28 AM

Looking really good  :thumbsup: It's great to see that you seem to have little difficulty coming back to complex code and picking up where you left off even if it's been a while. I on the other hand really suck at this, and I have to literally relearn the entire code before picking it up again... This is particularly true for ALC.



#230 adamantyr OFFLINE  

adamantyr

    Stargunner

  • Topic Starter
  • 1,338 posts

Posted Sat Aug 26, 2017 2:24 PM

Looking really good  :thumbsup: It's great to see that you seem to have little difficulty coming back to complex code and picking up where you left off even if it's been a while. I on the other hand really suck at this, and I have to literally relearn the entire code before picking it up again... This is particularly true for ALC.

 

It helps that I comment my code pretty heavily, and the original structure has become pretty ingrained in my head...

 

That said, turning into a module-based structure helps because I do have to go over ALL the code. I haven't touched the travel portion of the code in years so I'm looking forward to going in and optimizing it.



#231 adamantyr OFFLINE  

adamantyr

    Stargunner

  • Topic Starter
  • 1,338 posts

Posted Thu Aug 31, 2017 11:25 AM

Did some analysis of my text encoder... it's actually pretty good, all things considered, with room for improvement!

 

I copied all my text for the first disk to a large text file and did some case-sensitive searches for my suffix replacement, and the results are interesting... The "value" listed is the length of the suffix multiplied by the number of occurrences.

 

Also note that the longer suffixes are done first, so "the" supercedes "he", which then loses count. This has been accounted for in the numbers.

Suffix	Count	Value
the	536	1608
in	635	1270
er	601	1202
you	324	972
and	319	957
es	450	900
re	439	878
ea	395	790
to	379	758
on	374	748
is	367	734
it	356	712
of	304	608
or	282	564
an	274	548
at	256	512
as	246	492
he	233	466
for	136	408
hat	134	402
ti	192	384
are	127	381
so	185	370
we	183	366
th	172	344
ent	104	312
can	76	228
ion	52	156
tio	39	117
has	39	117
by	36	72
tis	2	6

The last one, "tis", is definitely going to be replaced. :) I think what I'll do is replace the bottom five, requiring at least a value of 200.

 



#232 adamantyr OFFLINE  

adamantyr

    Stargunner

  • Topic Starter
  • 1,338 posts

Posted Sat Sep 2, 2017 8:07 PM

Okay, so I've written a new text encoder. It now uses 160 characters (0-31, 128-255) for dictionary key value replacement. I wrote up an encoder that takes in a dictionary list of values and produces a score sheet (how many of each was replaced) so I can actually see which ones work and which ones don't.

 

In order to determine the appropriate n-grams, I wrote up a utility to calculate ALL the n-grams in the given block of text that comprises the first disk. I think the word usage is general enough it should be re-usable for all the disks.

 

I also tested out using a bit-wise approach, with the most "common" letters being stored in 4-bit increments with a length nybble, while non-common characters are stored as a full 8-bit value. In practice, though, it didn't produce any better results.



#233 adamantyr OFFLINE  

adamantyr

    Stargunner

  • Topic Starter
  • 1,338 posts

Posted Mon Nov 13, 2017 10:58 PM

Just a heads up, you can see all my latest updates on this project on my blog!

 

http://www.adamantyr.com/blog

 

Solved my earlier problem with Yahoo by moving to AWS as well. :D



#234 adamantyr OFFLINE  

adamantyr

    Stargunner

  • Topic Starter
  • 1,338 posts

Posted Mon Dec 25, 2017 8:38 PM

Merry Christmas! Here is a video of the title screen music... I'm still making some adjustments here and there:

 



#235 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 9,789 posts
  • Location:Hustisford, WI

Posted Wed Jan 3, 2018 9:17 AM

Hey, sweet!!!! :D

#236 adamantyr OFFLINE  

adamantyr

    Stargunner

  • Topic Starter
  • 1,338 posts

Posted Wed Jan 3, 2018 1:28 PM

Thanks! I actually just fixed it today so it has proper note decay... It sounds SO MUCH BETTER now.

 

I still hear the odd-ball off note here and there that I want to investigate. I know two of them I can do nothing about because the note is below the TI's range to create, but there's a few other anomalies I'd like to fix...



#237 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 9,789 posts
  • Location:Hustisford, WI

Posted Wed Jan 3, 2018 2:32 PM

Sounds epic. Cant wait to dungeon crawl listening to that!

#238 adamantyr OFFLINE  

adamantyr

    Stargunner

  • Topic Starter
  • 1,338 posts

Posted Wed Jan 3, 2018 2:43 PM

Music is played only during the title screen.

Music and CRPGs can be done; Dungeons of Asgard does it quite well. I just decided I wanted to focus on sound for effects.

Also, I have no musical writing ability, and I readily acknowledge there is serious skill and talent required to make music that doesn't distract or get annoying.

#239 mizapf OFFLINE  

mizapf

    River Patroller

  • 3,273 posts
  • Location:Germany

Posted Wed Jan 3, 2018 3:22 PM

Also, I have no musical writing ability, and I readily acknowledge there is serious skill and talent required to make music that doesn't distract or get annoying.

 

Burger Time. Nuff said. :)



#240 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 9,789 posts
  • Location:Hustisford, WI

Posted Wed Jan 3, 2018 3:27 PM

Hen Pecked

#241 adamantyr OFFLINE  

adamantyr

    Stargunner

  • Topic Starter
  • 1,338 posts

Posted Wed Jan 3, 2018 3:36 PM

Oh yeah Burgertime... :P

 

All versions are maddening with the silly NEVER STOPS jingle music, but the TI is worse because Data East's software engineers apparently didn't understand they didn't HAVE to stop the music for every sound effect and start it over. :P



#242 TheBF OFFLINE  

TheBF

    Dragonstomper

  • 616 posts
  • Location:The Great White North

Posted Wed Jan 3, 2018 3:39 PM

Music is played only during the title screen.

Music and CRPGs can be done; Dungeons of Asgard does it quite well. I just decided I wanted to focus on sound for effects.

Also, I have no musical writing ability, and I readily acknowledge there is serious skill and talent required to make music that doesn't distract or get annoying.

 

If you composed this piece then you have musical skills. 

This is called polyphonic music best exemplified by J. S. Bach.



#243 adamantyr OFFLINE  

adamantyr

    Stargunner

  • Topic Starter
  • 1,338 posts

Posted Wed Jan 3, 2018 3:55 PM

 

If you composed this piece then you have musical skills. 

This is called polyphonic music best exemplified by J. S. Bach.

 

I did not compose this piece. :) It's called "Caverns of the Heart", by Fred Nachbaur. He wrote it along with a number of other pieces for an unreleased CRPG in the early 2000's.

 

Sadly, he passed away around 2004, but I obtained permission from his daughter to use the song, so long as I give appropriate credit in both game and any manuals, which naturally I will do. (Although that was a LONG time ago... I may have to send her the completed piece and make sure she's all right with it's use again.)



#244 adamantyr OFFLINE  

adamantyr

    Stargunner

  • Topic Starter
  • 1,338 posts

Posted Thu Feb 1, 2018 3:15 PM

And here is the title screen with music playing...

 



#245 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 9,789 posts
  • Location:Hustisford, WI

Posted Thu Feb 1, 2018 4:19 PM

:D

RoA


How do I long for thee....

#246 InfernalKeith OFFLINE  

InfernalKeith

    Dragonstomper

  • 716 posts
  • Location:Toledo, OH

Posted Sat Feb 3, 2018 1:55 AM

Just trying to imagine showing this to anyone in 1983 and telling them this was their TI 99/4A at work... heads would explode!



#247 Iwantgames:) OFFLINE  

Iwantgames:)

    River Patroller

  • 2,255 posts

Posted Mon Feb 5, 2018 6:59 AM

Man this looks and sounds so good :)

#248 adamantyr OFFLINE  

adamantyr

    Stargunner

  • Topic Starter
  • 1,338 posts

Posted Wed Apr 18, 2018 10:43 AM

Okay, time for an update on this thread!

 

I'll be showing off the game and my development tools for it at Fest West this year. The engine is about 65% complete, combat is still in "rectification" from the old code base, and I won't have it anywhere near to done in time for Fest West. So I'm spending time on tuning and polishing the rest to make sure it looks good and plays well.

 

On a side note... If you try and visit my blog and it times out, it's due to a plug-in I installed called Jetpack to try and track metrics. The stupid thing seems to cause instability though, probably because it's trying to do something an AWS t2.micro can't really handle. I'm getting close to disabling it, for now, I've been just resetting the server when that happens because it's really useful to know how many visitors I'm getting.



#249 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 9,789 posts
  • Location:Hustisford, WI

Posted Thu Apr 19, 2018 6:47 AM

Excited to see your progress, sir!!!




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users