• 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

16 bit images in directx

7 posts in this topic

In 16 bit,it have 565 and 555 mode.So maybe no one use 16 bit images.You can convert
8/24/32 bit images to 16 bit surface in DX.
Check the DDUTIL.CPP in your DirectX SDK.
The DDLoadBMP function can do this.
0

Share this post


Link to post
Share on other sites
Dark Worl is right.

You will have a very hard time finding a program that saves images in 16 bit mode. The sollution most of us take, I suspect, is saving images in 24 bit colour and dropping the least significant bits when loading. I hate the way this looks on some images because it introduces banding in gradiants. I just make a special effort to do my art very very carefully.

0

Share this post


Link to post
Share on other sites
Hello. You can create surfaces on system memory rather than video memory. I think this is how you would do it:
When you are setting up your DDSURFACEDESC structure, and you are putting in the ddsCaps flags, you can plug in the DDSCAPS_SYSTEMMEMORY flag.
Look up DDSCAPS and DDSURFACEDESC in the DirectX SDK documentation for more information.
Hope this helps,
Qoy
0

Share this post


Link to post
Share on other sites
Another Suggestion:
You could use Targas. You can save those in 16bit color mode and they're simple to load. Plus, just about every art package (excluding Windows Paint :p) supports them.

--TheGoop

0

Share this post


Link to post
Share on other sites
I usually store my images on disk as 24 or 32-bit, then convert them to whatever my texture format is at load time.

If I need to save space, I use DXTn compression (4-bits per pixel) if it doesn't degrade the image too much (usually not) and decompress at load-time, if necessary.

0

Share this post


Link to post
Share on other sites
to load a bitmap (of any format) onto a surface (of any pixel format):

1-Create a compatible system DC with CreateCompatibleDC
2-Load the bitmap with LoadImage
3-Select the bitmap into the system dc
4-Create the surface with the proper dimensions
5-Get the DC of the surface with GetDC
6-BitBlt from the system dc onto the surfaces dc
7-release the surface dc, reselect into the system dc the old image, destroy the bitmap, and destroy the system dc

code:

//the code
HDC sysdc=CreateCompatibleDC(NULL);
HBITMAP hbmnew=LoadImage(NULL,"Bitmap1.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE);
HBITMAP hbmold=(HBITMAP)SelectObject(sysdc,hbmnew);
BITMAP bmp;
GetObject(hbmnew,sizeof(BITMAP),(LPVOID)&bmp);
DDSURFACEDESC ddsd;
memset(&ddsd,0,sizeof(DDSURFACEDESC));
ddsd.dwSize=sizeof(DDSURFACEDESC);
ddsd.dwFlags=DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS;
ddsd.dwWidth=bmp.bmWidth;
ddsd.dwHeight=bmp.bmHeight;
ddsd.ddsCaps.dwCaps=DDSCAPS_OFFSCREENPLAIN;
LPDIRECTDRAWSURFACE lpdds;
lpdd->CreateSurface(&ddsd,&lpdds,NULL);
HDC surfdc;
lpdds->GetDC(&surfdc);
BitBlt(surfdc,0,0,bmp.bmWidth,bmp.bmHeight,sysdc,0,0,SRCCOPY);
lpdds->ReleaseDC(surfdc);
SelectObject(sysdc,hbmold);
DeleteObject(hbmnew);
DeleteDC(sysdc);

0

Share this post


Link to post
Share on other sites
I've got a related question - I have written an image loader to load 8-bit PCX files into 16 bit DirectDraw surfaces for use under Direct3D as textures. My decompression uses 565 format, but I don't know whether this will be supported by all cards. If I support 555 and 565, would that ensure compatibility for most of the major accererators?
0

Share this post


Link to post
Share on other sites
Hello, having just started in DirectX I have got some functions to load bitmaps. The only problem is that I am using 800 x 600 x 16bit and the images are 24 bit.

None of the programs i have (neither Photoshop or paint shop pro) allow images to be 16 bit.

Of course, I could go up to 24 bit in the game - but my video card doesn't have enough onboard memory , or go down to 640x480 - which isn't a desirable option...

Anyone know of an art package that lets you use 16 bit? Or a way or creating a surface (i think) that isn't on the video card memory? (i have 64 meg ram but only 2 meg graphics card...)

I know this message probably should have gone in the Art section, but it seems that not many people frequent that board.

Thanks all,

Shifty Bastard

0

Share this post


Link to post
Share on other sites