• 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.

Qoy

Transparency Question

7 posts in this topic

Check you've turned off anti-aliasing in PSP. It may be that some pixels that you intend to be black are not precisely RGB(0,0,0).
0

Share this post


Link to post
Share on other sites
I was having that problem before, but I turned it off, and I have exhaustively checked the perimeters of the text objects to make sure they are indeed (0,0,0) and they are... And just to be sure, I used the "Count Colors" function in PSP, and there are 4 colors used in the picture. That's just enough, because I have 2 colors of text, 1 color of template lines, and then the (0,0,0).
I just don't know if this is a problem with the color keying (I used the DDSetColorKey function from ddutil.cpp to set it) or with the bitmap format (I doubt that) or with, I don't know what...

HELP!!!

0

Share this post


Link to post
Share on other sites
Here is exactly what's happening:
If I make a change from ANY color to the transparent color (meaning if one pixel is not transparent, and the next few are, the next pixel to the right (or maybe 2 pixels, I cant really tell) show up as black on the screen. I don't know if they are actually showing up as RGB(0,0,0) or something very close, but I know they are (0,0,0) in the bitmap file. I don't know if it's a problem saving the bitmap, loading it to a surface, or blitting it (it happens with both Blt and BltFast).

please help... I'm gonna have a heart attack soon if this doesn't get fixed

[This message has been edited by Qoy (edited December 14, 1999).]

0

Share this post


Link to post
Share on other sites

Cool, I thought it was just me. I've been saving Poser models into bitmap form on a black background, but the models always end up with a black outline when they are blt/bltfast.

------------------
Still Learning...

0

Share this post


Link to post
Share on other sites
I talked on #gamedev on Afternet last night to some people, and they said it was probably a problem with my card in 32 bit color modes. They suggested I change the bit depth to 16 bits. Does anybody think the problem could be anything else? I am now trying to convert the game to run in 16 bits, but am having trouble converting the bitmaps, and simply even displaying colors to the screen. Does anybody know where I can find an example of converting a 24 bit bitmap to 16 bits, or of building up a 16 bit RGB value?
I'll post some of my code so people can see if it's really convoluted, and see if they know what my problem is...

Here is my code for checking the pixel format:

code:

// check the pixel format (555 or 565)
gMask = desc.ddpfPixelFormat.dwGBitMask;
// check the 27th bit from the right in the mask (bit number 26)
// if it's 1, then it's 565, else it's 555
// it's the 27th bit because it's the 3rd from the beginning of the first byte,
// but gMask is 4 bytes
// 2^26 = 67108864
if(gMask | 67108864)
pixelFormat = 565;
else
pixelFormat = 555;

Here is my code for building up a 16 bit rgb value:

code:

#define RGB555(r,g,b) ((b % 32) + ((g % 32) << 6) + ((r % 32) << 11))
#define RGB565(r,g,b) ((b % 32) + ((g % 64) << 5) + ((r % 32) << 11))

I can probably handle the converting the bitmap if I can just get this stuff working...

0

Share this post


Link to post
Share on other sites
here's a thought...

you said this was a bitmapped lettering system, correct? does this mean that there are essentially two colors in your bitmap(black and the letter's color)?

if so, then you may as well design your letters on a monochrome bitmap.

if there's actually a pattern(more than just the two colors), then thats another story.

0

Share this post


Link to post
Share on other sites
Well, the letters are just two colors, but this stuff has to work for other bitmaps too
0

Share this post


Link to post
Share on other sites
I am implementing a bitmapped text function for my game, and it works alright so far, but I am having one problem. This doesn't just occur with the text. I am using source color keying, with RGB(0,0,0) as the color key for transparency. Whenever I use Blt or BltFast to blit the rectangle containing a letter to the back buffer, some of the pixels don't show up transparent, instead, they show up black (I have the backBuffer filled gray, so I can see where it't not working). It seems to do this on pixels that are directly to the right of pixels of different colors (non-black). But it only does this sometimes. I am using the DDLoadBitmap function from ddutil.cpp to load the bitmap, and am using the DirectX 5 headers/libs. I am using Paint Shop Pro 6 to make the graphics, so I don't know if it's a problem in the bitmap format... My surface is 32 bit, and all my bitmaps are 24 bit.
Does anybody know what the problem could be?

------------------
http://qoy.tripod.com

0

Share this post


Link to post
Share on other sites