• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Archived

This topic is now archived and is closed to further replies.

Guest Anonymous Poster

Bitmap compression

12 posts in this topic

Actually, a 256x256 24-bit BMP file is 192KB, not 2MB

You might think of using PCX files instead, they have built-in compression that usually gives you 25-40% compression. Not as good as WinZip, but hey, it's simple as hell.

The PNG format compresses REALLY well on the images I tested on.

I'm gonna stop talking now, because I don't know all that much about compression and don't want to say something to upset anyone

0

Share this post


Link to post
Share on other sites
Hmmm, not 2meg? Musta done my calculation wrong...

Yah.. it is 190k.. oops...

Hehehehe, I said that 2meg was too big ;-)

0

Share this post


Link to post
Share on other sites
sorry if this sounds stupid, but you figure it out by (256*256)*(24/8)=192*(1024)
is that right, I jus guessed, sorry if its a stupid question, its late and Im not think very clear
later
0

Share this post


Link to post
Share on other sites
PCX files only use their RLE compression (192 cutoff) in 256 colour mode. If you want to compress and dont mind slight quality loss, use truevision targa (TGA) or JPEG.
0

Share this post


Link to post
Share on other sites
This is how you'd figure it:

256*256 = 65536 pixels

65536*3=196608 bytes

You take it times 3 since there are 3 bytes per pixel in 24bpp.

0

Share this post


Link to post
Share on other sites
That's incorrect. ALL PCX bit modes, 8 bit, 24 bit, etc. use RLE compression.
It doesn't stop at 256 colors. (0-255) is the range of the RGB component,
not the number of colors. And who wants to use JPEG which requires you to
use a whole library of complicated code to decode a single image. It only
takes a couple simple functions to decode a image with PCX.

Speck

0

Share this post


Link to post
Share on other sites
Listen, if you don't need compression IN the bitmap (if you are using a global compressor like WinZip to package your resources together) then go with Targa. TGA is basically the easiest format to load (other than RAW files that you know the format of).

- Splat

0

Share this post


Link to post
Share on other sites
If you're doing 3D with Direct3D, you may want to look into DXTC. It stores the image at 4 bits per texel (at least for DXT1) and hardware support is growing, it's in Nvidia's GeForce 256, S3's Savage4 & Savage2000, 3dfx's upcoming chipset.
0

Share this post


Link to post
Share on other sites
Rappler: You're right, except you forgot to add the 54 byte header

kieren_j: Speck is right, PCX files are compressed in all color bit depths, but I find that 24bit PCX files have very low compression, less than 20%, and I don't particularly like the way they're encoded (I studied the PCX file format and wrote my own loader for this format, so I know what I'm talking about )

Splat: I'd have to say BMP files are the easiest to load, hehe! I looked into TGA file format a few months back, and it didn't look that easy. It only uses RLE compression, but the file header is quite a beast. You can cram a whole lot of stuff into that header, I'm beginning to wonder what the origin of that file format was.. looks like it was meant for images used in business apps, because you can have author's name, comments, charts, sales data, memos, phone numbers, la la la... just kidding

I'm looking at the PNG file format at www.w3.org (it's .org)... VERY interesting stuff. They stress the importance of ease of implementation on the developer's part, I'll find out how true that is when I go to implement it (yup, looks like I'm hooked on PNG for now).

If and when I finish my PNG library, I'll offer it up on these boards if anyone is interested.

0

Share this post


Link to post
Share on other sites
Since I have recently suceeded in loading a 24bit bitmap properly, I've noticed something: 24-bit bitmaps are BIG.

So, now I am looking for any suggestions for compression, or where I could get a publicly availible algorithm. Winzip has has a 99% compression ration on bitmaps, and I'd like to get that one, but I doubt it's publicly availible. I'll have to go check out the gzip and bzip stuff, they're open source so maybe I'll use one of those.

Anyone have any algorithms they've used sucessfully? Anyone know where I can find one for sure?

2meg for a 256x256 bitmap seems a bit high ;-)

0

Share this post


Link to post
Share on other sites
If yo only need to load 256 color bitmaps, PCX is they way to go because of the ease of use, and how since yo can right a function to load philes in bout 15 lines.
0

Share this post


Link to post
Share on other sites