Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: BMPs and PNGs  (Read 1558 times)

0 Members and 1 Guest are viewing this topic.

King Tetiro

Leader of Phoenix Heart
BMPs and PNGs
« on: September 17, 2008, 07:54:22 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3549
Basically, Im thinking of making some of my game external. This is so that the game can be improved without people losing their save progress. It's more work for me but it'll be cool. Now there is a snag. GM6.1 can only load (externally)bmp, jpg and gif files. Jpg is off (Wonder why?). Gif is off because Im not using animations. So I need to use bmp. So here's the thing

When I convert my PNG to BMP, what should type of BMP should I save it as and what will be the difference of graphics between the PNG and BMP?
Logged
  • Phoenix Heart
Re: BMPs and PNGs
« Reply #1 on: September 17, 2008, 08:12:02 am »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3374
I thought it could load png, or is that 7?
Logged
Quote from: Jason
Your community is a bunch of stuck up turds.

King Tetiro

Leader of Phoenix Heart
Re: BMPs and PNGs
« Reply #2 on: September 17, 2008, 08:16:34 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3549
I dunno...lemme check. No. I think it's just 7.
Logged
  • Phoenix Heart
Re: BMPs and PNGs
« Reply #3 on: September 17, 2008, 10:02:10 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 2245
The secret is to draw the png to a surface, and create a sprite from the surface.
Logged

Xiphirx

wat
Re: BMPs and PNGs
« Reply #4 on: September 17, 2008, 07:29:41 pm »
  • Xiphirx
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3007
Gif doesnt necessarily mean an animation.
Logged
  • For The Swarm
Re: BMPs and PNGs
« Reply #5 on: September 17, 2008, 08:15:59 pm »
  • (y)(;>.<;)(y)
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3293
Someone'll need to correct me on these if I am wrong.

The bits are to do with colours. 24bit is 'true-colour', 32bit is evil and rarely, if ever supported (made worse by some programs choosing to store it as XBGR and others as BGRX), and 8 and 16bit (the latter of which is also rarely used but still more common than 32bit) use palettes.

A PNG is usually 32-bit, but since that should remain out of the question for various reasons, to maintain the best colours 24bit is the best thing to use, though you lose the alpha channel meaning transparency must be done via chroma keys and so-on.

You could always track down a .dll which provides .png-loading functionality...or learn a real language.
« Last Edit: September 17, 2008, 08:17:40 pm by TheDarkJay »
Logged
Re: BMPs and PNGs
« Reply #6 on: September 17, 2008, 10:52:26 pm »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3374
TDJ, I know very little about graphics, but why do you consider 32 bit "evil"?
and also, what does the X stand for? Transperency/alpha?
Logged
Quote from: Jason
Your community is a bunch of stuck up turds.
Re: BMPs and PNGs
« Reply #7 on: September 18, 2008, 03:15:25 pm »
  • (y)(;>.<;)(y)
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3293
Is is Transparency, and when I said it's considered evil in BMPs I meant in my experience it was because very few programs support it, and I've seen some disagreement over whether to store it as XBGR or BGRX (probably because some programmers store it as RGBX others as XRGB.).
« Last Edit: September 18, 2008, 06:00:23 pm by TheDarkJay »
Logged

mit

Re: BMPs and PNGs
« Reply #8 on: September 18, 2008, 03:28:32 pm »
  • QBASIC programmer since age 4. Take that, world.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 1079
I would very strongly recommend GIFs. It's a lossless format, and while limited to 256 colours, the pallet can be defined by you, and for sprites you'll almost never need more than that.

I don't think many people realise how big bmp files are. A single screenshot of a 1024x768 desktop, in bmp, will be about 2.3mb, whereas in GIF/PNG it'll probably be less than a hundered kb.
Logged
Programmer / Spriter / Level designer / Game Director / Web Designer / Music Sequencer for
Random Highscore table:

Play the Kousou Arcade today!
  • Kousou Games
Re: BMPs and PNGs
« Reply #9 on: September 18, 2008, 03:31:04 pm »
  • (y)(;>.<;)(y)
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3293
Of course generally once the actual texture is loaded file format means jack-all, so really it just depends on how big your initial images are, and how many colours you used.
Logged
Re: BMPs and PNGs
« Reply #10 on: September 20, 2008, 08:10:53 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 775
I think most serious software writers support 32bit formats completely
Such as Game Maker?
Then again, alpha bitmaps also work well, but its a hazzle to deal with :(
If you had PNG but no 32bit support you could make the bitmap twice the width
where the original image to the left, and the alpha to the right :)
less files, and not much extra filesize
Logged

My Child Is Student of The Month at Neverland Ranch!
  • SSEdit
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.059 seconds with 57 queries.

anything