elfprince13 wrote:
You don't still use that Python spriting tool I made for the Sonic project do you?
As far as the text compression scheme goes, to what extent have you analyzed the relevant probability distribution, or have a corpus available for analysis?
D'oh! I'll need to look in my backup disks and recover the Sonic folders. I haven't looked into the statistics yet. I'll probably post the full text later this weekend, but here's an excerpt below. Breifly I started looking at Markov chains compression. I would guess this might be especially handy for English texts since we use a relatively small chunk of the full TI-8x character space.
Code:
; DIALOG 27
dia_dr_hiri_intro:
.db HIRI
.db "You were attacked by",0
.db "battle bots today?",0,dEND,d2ND
.db HIRI
.db "I thought that",0
.db "technology was",0
.db "outlawed!",0,dEND,d2ND
.db HIRI
.db "Curious",$EE,shELLIPSIS,dEND,d2ND
.db HIRI
.db "Could you capture one?",0,dEND,d2ND
.db EDGAR
.db "Uh",$EE,shELLIPSIS,"Well",$EE,shELLIPSIS,0,dEND,d2ND
.db HIRI
.db dITEM_DROP,30 ; <-- Borrowed Zapper is dropped for the player
.db dITEM_DROP,23 ; <-- Battery is dropped for the player
.db "Great! Stun one with",0
.db "this ZAPPER. And bring",0
.db "it here.",0,dEND,d2ND
.db HIRI
.db dSTORY_TRACK,0,(1<<TalkedToHIRI) ; <-- Signal the game that you met HIRI
.db "I must see for myself!",0,dEND
Some side notes: Right now, this system is very heavy on end-of-line characters, which I might try to fix during this code cleanup. But basically, it's mostly plaintext, with occasional escape characters to trigger special events. Also, I think my use of the escape character for the elipsis might be obsolete due to recent code changes. This could be another code cleanup item.
To limit overhead, imagined using a PC-based utility to rank the most-frequent words in the entire game. The output would be 1 dictionary source file containing only highly-ranked words (maybe the top 256), plus 1 compressed file which would use an escape character and an index to reference a word from the dictionary.
Also, I did try out the current graphics compression algorithm on the text. This had negative compression for most text strings. I'll upload the full dialogs source file later this weekend, since the Oceanside story seems to be pretty much done.
Quote:
Recently (ie within the past year or two) there were several 89 games (ports of games on old phones and stuff) written by a Chinese programmer. The 89 screen is a bit better suited for Chinese characters, but we could probably work something out for the z80 calcs, for example this set of fonts:
http://www.china-e.com.cn/en/fonts/Bitmap.htm (some supposedly as small as 12x12). There was also a GB project to display Chinese characters (http://www.mqp.com/fun/gb_chi.htm), unfortunately there was no source code released for the version with Chinese (simplified/traditional) support, but i believe the fonts are available (you may need to use archive.org to get to them, though). I also just came across this discussion at Stack Exchange:
http://chinese.stackexchange.com/questions/16669/lowest-pixel-resolution-needed-to-support-chinese
16x16 would be ideal (that's what most GBA/NDS games use), but we could probably get by with 12x12. When the text is finished, i could help translate it into Chinese (i've got a few Chinese friends who could help out as well). If you wanted any help with other small stuff in the engine (eg. text wrapping) i could do that, as well. Text wrapping is convenient, but space-wise it doesn't really save anything, since you're basically replacing the line break with a space. But my text engines generally have text wrapping since i hate writing computer programs, i prefer just to use asm Razz
Yessss! It was Zhen Zeng's Magic Land for TI-68K(神州) that I was thinking of. For simplified Han, I think the 8x8 to 12x12 range looks reasonable. The character dialogs might require some creative re-writing to avoid characters with a very large number of strokes. 12x12 or 16x16 larger would be a must for Kanji or traditional Han. Right now, the text buffer is a 96x19 pixel area. This can be extended a few more pixels if needed.
In progress:
- [Next] Boss HP meter
- Boss balancing (attack rate / armor)
- Adding text source to repository
- Code cleanup
- Spell-checking
- (Optional) Wrap text at runtime