VN32X - A tool to make visual novels for the 32X

Ask anything your want about the 32X Mushroom programming.

Moderator: BigEvilCorporation

haroldoop
Very interested
Posts: 105
Joined: Sun Apr 29, 2007 10:04 pm
Location: Belo Horizonte, MG, Brazil

Re: VN32X - A tool to make visual novels for the 32X

Post by haroldoop » Sun Jan 07, 2018 10:40 pm

Muzzy wrote:
Fri Jan 05, 2018 10:23 am
Well, I don't have TrueType font. I made it pixel by pixel in PhotoShop - so I have raster file. White letters with black borders - Image
I see... one option would be to provide your own FNT file (which is actually a plain text file) to map coordinates within the PNG file to the corresponding characters. If you open it within a text editor, you would see something like this:

Code: Select all

info face="DejaVu Sans" size=15 bold=0 italic=0 charset="" unicode=1 stretchH=100 smooth=1 aa=2 padding=0,0,0,0 spacing=1,1 outline=0
common lineHeight=15 base=12 scaleW=1790 scaleH=16 pages=1 packed=0 alphaChnl=1 redChnl=0 greenChnl=0 blueChnl=0
page id=0 file="font_dejavu_sans_0.png"
chars count=191
char id=32   x=1632  y=0     width=4     height=15    xoffset=0     yoffset=0     xadvance=4     page=0  chnl=15
char id=33   x=1471  y=0     width=5     height=15    xoffset=0     yoffset=0     xadvance=5     page=0  chnl=15
char id=34   x=1401  y=0     width=6     height=15    xoffset=0     yoffset=0     xadvance=6     page=0  chnl=15
(... and so on ...)

An alternative would be to create a custom version of the 'font_conv' utility that would convert the image in a more direct way, though unless you're using some fixed width font, you still would need some way to specify the offsets.
Muzzy wrote:
Fri Jan 05, 2018 10:23 am
Also in blocklyvn32x-portable-0.10.0 got some error messages while trying "run" or "compile": popup system error from pngnq.exe - zlib1.dll are not found on the computer, try to reinstal the program.
And Error -1073741515 Compilation failed! in status bar.
That's weird... perhaps I should have included the DLL in the pngq directory, as I had done with 'libpng13.dll'. :P

Anyway, until I fix this, one option would be to donload the DLL directly from sourceforge: http://prdownloads.sourceforge.net/libp ... p?download ; just add the copy of 'zlib1.dll' that comes inside this zip to the 'pngnq-0.5-i386-win' directory.

Muzzy
Interested
Posts: 10
Joined: Mon Jun 19, 2017 5:06 pm

Re: VN32X - A tool to make visual novels for the 32X

Post by Muzzy » Mon Jan 08, 2018 9:20 am

Thanks for help, haroldoop. Compilation now running fine. Although I noticed that symbols like "-" or "[]" in file names are not welcomed.
And more question from me - how can I get 32K colors (15-bit) image on the output? I feed in 320x202 32483colors image and on the output i got only 245 colors :( Or at this development stage only 256 colors available?
Image Image

I tried to replace couple of letters/symbols in font_dejavu_sans_0.png and it's work out fine, I guess. But still can't find the way to make outline in black color :( Even if it's black or 95% gray in PNG file - on the output it changes.
Image

haroldoop
Very interested
Posts: 105
Joined: Sun Apr 29, 2007 10:04 pm
Location: Belo Horizonte, MG, Brazil

Re: VN32X - A tool to make visual novels for the 32X

Post by haroldoop » Mon Jan 08, 2018 10:55 pm

Muzzy wrote:
Mon Jan 08, 2018 9:20 am
Thanks for help, haroldoop. Compilation now running fine.
That's good to know! :D
Muzzy wrote:
Mon Jan 08, 2018 9:20 am
Although I noticed that symbols like "-" or "[]" in file names are not welcomed.
I see... it seems the file name validation on the editor is a bit too conservative (the compiler, itself, does not care). :P
I have posted the bug on the repository, so I can take a look at it when possible: https://github.com/haroldo-ok/BlocklyVN32X/issues/20
Muzzy wrote:
Mon Jan 08, 2018 9:20 am
And more question from me - how can I get 32K colors (15-bit) image on the output? I feed in 320x202 32483colors image and on the output i got only 245 colors :( Or at this development stage only 256 colors available?
Image Image
Unfortunately, although the engine is currently running on 15K color mode, the currently implemented converters and the drawing routines are still limited to 256 colors. I gotta find some time to fix this: https://github.com/haroldo-ok/vn32x/issues/1
Muzzy wrote:
Mon Jan 08, 2018 9:20 am
I tried to replace couple of letters/symbols in font_dejavu_sans_0.png and it's work out fine, I guess. But still can't find the way to make outline in black color :( Even if it's black or 95% gray in PNG file - on the output it changes.
Image
I think I now understand what you meant... :P

That's a limitation of how the font rendering is currently implemented: the font is always converted to grayscale, and its brightness is used as the opacity, meaning the whites become fully opaque, blacks become invisible, and grays become translucent; maybe that's a point that could be improved, too; perhaps the engine could be improved to handle multicolored fonts.
https://github.com/haroldo-ok/vn32x/issues/11

Muzzy
Interested
Posts: 10
Joined: Mon Jun 19, 2017 5:06 pm

Re: VN32X - A tool to make visual novels for the 32X

Post by Muzzy » Tue Jan 09, 2018 5:19 pm

haroldoop wrote:
Mon Jan 08, 2018 10:55 pm
multicolored fonts
- that would be very helpful to manage in game content/characters.

Muzzy
Interested
Posts: 10
Joined: Mon Jun 19, 2017 5:06 pm

Re: VN32X - A tool to make visual novels for the 32X

Post by Muzzy » Sat Jan 27, 2018 1:52 pm

One more question from me. How to get compatible "portrait" images :?: In some images the transparent background turns to black or white on the output. If I save those "portrait" files from PhotoShop they show this kind effect. If I re-save them from GIMP - some files works fine on the output, but not all :(

haroldoop
Very interested
Posts: 105
Joined: Sun Apr 29, 2007 10:04 pm
Location: Belo Horizonte, MG, Brazil

Re: VN32X - A tool to make visual novels for the 32X

Post by haroldoop » Mon Jan 29, 2018 9:56 pm

Muzzy wrote:
Sat Jan 27, 2018 1:52 pm
One more question from me. How to get compatible "portrait" images :?: In some images the transparent background turns to black or white on the output. If I save those "portrait" files from PhotoShop they show this kind effect. If I re-save them from GIMP - some files works fine on the output, but not all :(
That's weird... as long as the image had a transparent background, the conversion should have worked "automagically". :P
Could you please show us the images that are being affected?

Muzzy
Interested
Posts: 10
Joined: Mon Jun 19, 2017 5:06 pm

Re: VN32X - A tool to make visual novels for the 32X

Post by Muzzy » Tue Jan 30, 2018 5:57 pm

Here is the example - https://mega.nz/#!is8GyJxS!whJJMNgWwpN7 ... vbF3qsF8oI
-------------------------------input-----------------------------\----------------------------output------------------------------
ImageImage

haroldoop
Very interested
Posts: 105
Joined: Sun Apr 29, 2007 10:04 pm
Location: Belo Horizonte, MG, Brazil

Re: VN32X - A tool to make visual novels for the 32X

Post by haroldoop » Tue Jan 30, 2018 10:29 pm

I did some preliminary checking on the bug; it does not seem to be related to image dimensions, though the number of colors does seem to affect it: reducing the image to 256 colors before importing seems to avoid the bug, though, in theory, the tool should already be performing the conversion. 'neuquant' seems to be reducing the colors correcly and keeping the transparency; by elimination, it looks like the problem lies either with 'apg' or 'sixpack'; failing that, maybe it could be something wrong with the display routine itself.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest