VBGamer |
|||||||||||||||||||||||||||
8 Bit Transperancies and Use of Masks....Help!!! Yukon Jack (1 reply, 0 views) (2000-Sep-14) Good Day
I new to game programmer and am trying to wrapo my head around learning DX7 programming in VB6.
Ive surf the net and pulled down alot of infomation covering various topics in terms of basic bit map loading and sprite
animation. The one thing that has me confused and Ive never seen a tutorial on this the use of masks and 256/ 8 bit color depth
to put sprites onto the screen.
My situation is one in which I'm part of a group of open source developers, ( we want to publish our game to about 1000
active play by email wargamers) who, being frustrated with the lack of pre WWI turn based wagames, have decided to make
our own. I have volunteered to program this project and thus have been busy learning all I can on what is needed.
Basically we want to put a big ,say 1500 by 1500 px bit map of our battle into memory... then use 800 x 600 resoulution or
the next higher 1024 x 768 to show the map.... and then paint it with all our army units, and do simple animation to it as the
units move from hex to hex.... their could be up to 50 small units on the screen at once to animate....
Thus I thought we needed to make the map and the unit in 8 bit color to save on the resources involved....
So to start my learning I used the big multi screen map and unit art work from one of my games and tried to get them loaded
and do a bit of anmation.... to learn DX programming....well the big map size kept crashing my window... so I croped it to my
screen size and which loaded fine... but then tryed to get the sprite to render without the back ground color (white).. using this
code:
Dim key As DDCOLORKEY
Dim TransCol As Long
TransCol = RGB(255, 255, 255)
key.low = TransCol
key.high = TransCol
Animsurf.SetColorKey DDCKEY_SRCBLT, key
well the unit showed up as well as the transparent white rectangle of the sprite ..in other words I couldnt get the bloody
transperancy to work....
Then I noticed that the game I took the art work from used these masks of the unit sprites somehow in its rendering
process...(by masks I mean negative images of the units), and from what I understand in 16 bit colcor depth masks are not
need and the colorkey code above works just fine.... The art work I m using from the game is 256....
So Im wondering are masks particular to 256 .... and why... and how do I use them....?
How do you tell if a 256 bit map is using a funky palette?
and further Ive read about different pallettes for use with 256 but I get the impression that there is a standard predefined
windows pallette that the paint prorgams delaut to and that DX code recognizes....
I wish there was a tutorail on the net to explain transperancies with 258/ 8 bit ..
or am I just missing something obvious here?
further I was wondering if there is a way to get a large several meg bit map file to load in one go into ram/and video memory
as I need to get our big battle maps loaded so we can scroll around on them to see the various areas of the battle.... from a
windowed app that is...
I am very grateful in advance for any suggestions/help.
Darren
|