Bennu Game Development

English Forums => Other DIV-likes => PixTudio => Topic started by: Grew on February 25, 2016, 10:41:14 AM

Title: Images not displayed
Post by: Grew on February 25, 2016, 10:41:14 AM
Hi !

I've a problem with PixTudio, in certain cases, the graphs are not displayed (from load_png, from fpg, and from fnt too !).
I've reported the bug in BitBucket weeks ago, but we did not found from where the bug comes.
Here is the BitBucket ticket : https://bitbucket.org/josebagar/pixtudio/issues/25/graph-not-displayed-from-png-and-fpg (https://bitbucket.org/josebagar/pixtudio/issues/25/graph-not-displayed-from-png-and-fpg)

Can somebody help me by doing this :
I'm on Windows 10 64 bits.
Can you tell here if it works on your computer, and which version of Windows are you running.

Thanks !
Title: Re:Images not displayed
Post by: panreyes on February 25, 2016, 11:53:34 AM
Could you share a ZIP with the PRG and files that aren't working? Thanks.
Title: Re:Images not displayed
Post by: Grew on February 25, 2016, 02:26:05 PM
The PRGs that doesn't works are all in the example folder. They all fail.
They compile without any error but the images are not displayed.
Have you tried in your computer (I mean in Windows) ?
Title: Re:Images not displayed
Post by: panreyes on February 25, 2016, 04:25:14 PM
I just tried some of them, and they worked flawlessly.
Title: Re:Images not displayed
Post by: Grew on February 25, 2016, 04:31:46 PM
What is your Windows version ?
Title: Re:Images not displayed
Post by: panreyes on February 25, 2016, 04:41:35 PM
This one:
https://www.dropbox.com/s/rrbwpdujy65w2g3/pixtudio-win32.zip?dl=0

It was build a few weeks ago
Title: Re:Images not displayed
Post by: Grew on February 25, 2016, 05:00:45 PM
No I mean, what is your OS ? Windows 10 ? Windows 8 ? 32bits/64bits ?
Title: Re:Images not displayed
Post by: panreyes on February 25, 2016, 05:14:20 PM
I'm using Windows 10 x64 in every platform, but I've tested pixtudio in XP, Vista, 7 and 8 (x86 and x64) with a benchmark I made some time ago.
Title: Re:Images not displayed
Post by: Grew on February 25, 2016, 06:15:26 PM
You can see the bug in this video.
https://youtu.be/s-1_o6gVbRc
The bug is the same for all the exemples. I've tried in two differents computer, both on Windows 10 64bits.
I cannot be the only one with this bug !  :'(
Title: Re:Images not displayed
Post by: panreyes on February 25, 2016, 06:31:02 PM
It's pretty easy. You're running your code from another folder.

Instead of:
pxtp ..\..\..\route\whatever\example.dcb

You should be in DCB's path and do something like this:
..\..\project\qt\bin\pxtp example.dcb
Title: Re:Images not displayed
Post by: Grew on February 25, 2016, 08:03:58 PM

Ok, It works for the FPG and PNG files. But the FNTs are still not displayed.
I didn't know that I should be in DCB's path to run it because it's not the case with BennuGD. With BennuGD, this code works well :
c:\bennugd\bin\bgdi.exe c:\game_folder\source\main.dcb
Thanks for your help. Any idea concerning the FNTs ?
Title: Re:Images not displayed
Post by: Drumpi on February 25, 2016, 08:08:05 PM
I'm going to suggest to use FILE_EXISTS function to know is file is really where you are looking for. Also, use CD() function to know where is the main path of your game. Maybe you're looking in the wrong folder.
Also, check if FNT are correctly loaded.
Title: Re:Images not displayed
Post by: panreyes on February 25, 2016, 08:14:50 PM
Grew, you'll need 32 bit FNT (by now, it will be automatically converted from 8 to 32 in the future)
Title: Re:Images not displayed
Post by: Grew on February 25, 2016, 08:23:17 PM

Quote from: Drumpi on February 25, 2016, 08:08:05 PM
I'm going to suggest to use FILE_EXISTS function to know is file is really where you are looking for. Also, use CD() function to know where is the main path of your game. Maybe you're looking in the wrong folder.
Also, check if FNT are correctly loaded.
Thanks for the suggestion. But I'm sure I'm in the right path. The FNT is loaded (fnt_load returns 1).

Quote from: PiXeL on February 25, 2016, 08:14:50 PM
Grew, you'll need 32 bit FNT (by now, it will be automatically converted from 8 to 32 in the future)
How can I create 32bits fonts ? As far as I know FNT Edit can only create 8bits fonts.
Title: Re:Images not displayed
Post by: panreyes on February 25, 2016, 08:41:36 PM
You can use FNT Edit, but I don't know where to download it.

But... why don't you use TTF? :D
Have look at examples\19_mod_text_freetype.prg
Title: Re:Images not displayed
Post by: Grew on February 25, 2016, 08:51:54 PM

Quote from: PiXeL on February 25, 2016, 08:41:36 PM
You can use FNT Edit, but I don't know where to download it.


But... why don't you use TTF?
Have look at examples\19_mod_text_freetype.prg
I doesn't use TTF because I wanted to port my BennuGD game (which has many FNT) to PixTudio (because of my bug : http://forum.bennugd.org/index.php?topic=4195.msg66768).
But I think I will take the time to change my game to use TTF instead of FNT.


Thanks for you help !