Levels with 24bit PNG assets

dblstk

New member
I've read that it's possible to use 24bit PNG files in level design, but whenever I save in PNG-24 (in Photoshop) the game shuts down upon loading the level. "Error loading file 'data/bgs/gym/gym.png'" Is there something I'm doing wrong? Level loads fine if the image is in PNG-8 but looks awful...
 
Welcome to Chronocrash dblstk.

24bit .png is supported for panels and layers, so you shouldn't have any problems unless you're using a really old version of OpenBOR. Saving 24bit .png is pretty straight forward, so I'm not sure what the issue is. The only thing I can think of is you might be trying to use them on a panel type entity, but I'm assuming that's not the case. Why don't you attach one of your files, and maybe we can see if there's anything with it.

DC
 
I think the palette is not indexed and the image still in RGB mode but, like DC said, it would be better if you can post an image to see what the problem is.
 
kimono said:
I think the palette is not indexed and the image still in RGB mode but

kimono those issues don't apply here because we are talking about 24bit .png, which by definition is RGB and does not have a color table.
 
Hey, Damon. Thanks for the kind welcome.

Err, actually, I am using it for a panel. I'm assuming that's wrong.

Code:
music		data/music/empty.bor
settime 0
direction both

panel		data/bgs/gym/gym.png

order	aaa



#---------------------

spawn	Yashiro
coords	380 161
at	800

wait
at	900

I'm pretty new to level design and haven't been able to find many tutorials. Granted, I haven't looked as well as I could be.
 
dblstk said:

No, this all looks fine. When I mentioned "panel entity", that's a different thing. OpenBOR allows you to declare a model (as in the same thing you use for players, enemies, and other entity types) as a Panel type. This lets you spawn entities that scroll like a panel or layer. Because they are full fledged entites you can have animations, scripts, and whatever else - but like any model they must use indexed color images.

It's easy to confuse that with level design panels. Anyway, since there doesn't appear to be a problem with your level design text, it would help greatly if you attached the offending image so I or someone else can test it.

DC
 
Thanks for clearing that up, Damon. Here's the image I'm trying to use that makes OpenBOR shut down upon load.

Edit: Read in another topic that I should clarify whether the engine is "shutting down" or "crashing" so I figured I'd edit to reflect that.
 

Attachments

  • gym.png
    gym.png
    334.5 KB · Views: 33
it works 100% cause i had exact the same convo with DCand hes right, lookup my old posts or search for  png 16 bit 24 bit etc on forums and youll find it, i forgot what were requirements to make it work, i think only bgs folder worked? not sure
or im vonfusing everything, in my case extension was wrong
http://www.chronocrash.com/forum/index.php?topic=3857.msg63597#msg63597
 
OK looks like 8 bit png works for levels, but 24 works only for titleb/title screens, strange, why is that ?
My titleb is 24bit png and works as title screen, but once im using this image for panel on stage, engine closes down
 
The screenshot I made is with the 24png on a stage. It works as a the background, a background layer, or fgayer, and should work as panel (though I'm not 100% sure on the latter).

It will NOT work as a panel type entity.

DC
 
Can You try this with 24bit png , for me it works as title but not as panel

panel data/bgs/titleb.png
png:
32hzY.png


Does not work for me in 4.0 recent version, its strange how it works as titleb and the same image does not work as panel or fglayer
Or is it 32bit  somehow? But i saved it in paintXP from windows xp, without alpha

Code:
Loading models...............	Done!
Object engine init...........	Done!
Input init...................	No Joystick(s) Found!
Done!
Create blending tables.......	Done!
Save settings so far........	Done!


Loaded 32-bit background 'data/bgs/logo'
Loaded 32-bit background 'data/bgs/titleb'
Level Loading:   'data/levels/forest.txt'
Total Ram:  4127756288 Bytes (  3936 MB )
 Free Ram:  1168592896 Bytes (  1114 MB )
 Used Ram:    36884480 Bytes (    35 MB )


********** An Error Occurred **********
*            Shutting Down            *

Error loading file 'data/bgs/titleb.png'Total Ram:  4127756288 Bytes (  3936 MB )
 Free Ram:  1171111936 Bytes (  1116 MB )
 Used Ram:    35037184 Bytes (    33 MB )

Release level data...........
Level Unloading: 'data/levels/forest.txt'
Total Ram:  4127756288 Bytes (  3936 MB )
 Free Ram:  1171107840 Bytes (  1116 MB )
 Used Ram:    35041280 Bytes (    33 MB )

RAM Status:
Total Ram:  4127756288 Bytes (  3936 MB )
 Free Ram:  1171107840 Bytes (  1116 MB )
 Used Ram:    35041280 Bytes (    33 MB )

Done!

Release graphics data........	Done!
Release game data............

Unload 'Flash' ............Done.
Unload 'dust' ............Done.
Unload 'MANDALORIAN' ............Done.
Unload 'yoda' ............Done.
Unload 'fix' ............Done.

Release game data............	Done!
Release timer................	Done!
Release input hardware.......	Done!
Release sound system.........	Done!
Release FileCaching System...	Done!

**************** Done *****************

Error loading file 'data/bgs/titleb.png'
Log says lodaed 32bit backgrounds, but they are both 24bit
 
Will it accept shadow effects when character stands on it ? I have some stages that dont realy do well with 256 colours
View attachment 4416

If I understand your question correctly, shadows are the same as anything else. Whether they overlap a panel/layer/whatever just depends on Z layer position. By default, shadows are one one layer position behind their parent entities, which makes them appear over panels, and any fglayers you place behind the play area.

DC
 
Back
Top Bottom