March 28, 2024, 09:05:08 PM

Username
Password

Pages: [1]   Go Down
Print
Author Topic: Question about 4 bit 8 bit etc  (Read 17021 times)
0 Members and 2 Guests are viewing this topic.
lordbraprus
Crossbowman
*
Offline Offline

Posts: 713


wiiiii


View Profile WWW
« on: January 26, 2013, 06:38:30 PM »

Hi, i really try to understand but i cant...

How does really work the BIT thing in games?

For example, i read that 8 bit, can have a 256 colour per pixel, so, why if i google "8 bit" it only appears imagenes of games with 8 colours... shoudldnt it have like 256 colour?.. why if i put " 4 bit" appears games with only 4 couours, shouldnt it have up to 16 colour palete?

Why a 32 bit computer like http://en.wikipedia.org/wiki/Atari_TT uses 8 bit instead of 32 bit colour? ..

for example, why dark omen, that has 3D grapchis (videos) and 256 colours pallete (8 bit) in menu, maps etc, has only 8 colours per sprite?

the thing is, WHY if i google 8 bit, it appears a 8 colours sprite instead of a 256 colours (as maximum) sprite? i DONT UNDESRTAND Smiley



ANd the examples that i need; the games Heroes of might and magic I (1995) and FANTASY GENERAL from 1996.. they have.. ? 256 colours? 8 bit? .. or 16 colours 4 bit... OR WHAT Sad

EDIT: here is what i am talking about; this game:



says that in the first image, black and white, it is 2bit BUT 2 bit SHOULD BE 4 COLURS! 1 bit is 2 colours... omg WHY, and the last one is 16 bit...

what i see is that they call bit to each colour.. 4 bit, 4 colours, 8 bit 8 colours.. but, why? it is a mistake? or the colours and monitor bit are diferent stuff :s.

so, if dark omen can have up to 256 colours it is 8bit, OR IT IS 256 bit JESUS CRIST :MAD:
« Last Edit: January 26, 2013, 06:47:49 PM by lordbraprus » Logged

ito maquiesves
Ghabry
Developer
*
Offline Offline

Posts: 1020



View Profile
« Reply #1 on: January 27, 2013, 01:56:58 AM »

You are correct. 1 Bit is 2 Colors, 2 Bit 4, 8 Bit 255 and so on.

The only special case is how the colors are defined.
e.g. 16 Bit can have 5 5 5 for Red/Green/Blue and 1 unused Bit.

8 Bit is usually an indexed pallete (so you have an value up to 255 and if you look it up you get usually a 24 bit value)

As you can see on the right side of the Article of the Atari TT the number of colors decreases with higher resolutions. Thats because it only has a very limited amount of graphic memory. Less colors = Less used memory. It doesnt have enough for 24 bit.

Why only 8 colors for Sprites in DO? To save memory Wink

Fantasy General probably has 256 colors (1996, very late DOS Game) and Might and Magic. Hm, depends on the System were it ran I guess. Screenshots look sometimes like 4 bit and sometimes like 8.
Logged

lordbraprus
Crossbowman
*
Offline Offline

Posts: 713


wiiiii


View Profile WWW
« Reply #2 on: January 27, 2013, 02:09:06 AM »

So, dark omen is 8 bit/256 colours right? and it has 8 colour sprites, to use low memory, reserving the 256 colour to menu and terrain becuase they are static images?

Now, i will tell what i understood and you tell me if i am right: so, the old games can have 256 however in a low resolution, wich gives the games that special "pixeled touch", fantasy general loosk like an 256 coluour game however it doesnt looks like if a take a photo with my 5megapixel camera and then convert the image to 256 colour, that would be due to the resolution of thegame wich is... 640x 480?  800x600¿¿

so, in resume, in a 16 32 bit computer, the games are with lower resolution and colour palete to take less memory and be faster.

A typical 1994/5/6 D.O.S game is 256 colour, with low resolution?

Oh and sorry all the questions, but, master of monster, from 1991.. it is 16 colour? 4bit? here images in good size

http://alforje.wordpress.com/2011/12/01/master-of-monsters-mega-drive/

sometimes it look like it has more than 16 colours, for example you have the hex-map colours + the unit images colour + menu colour..
« Last Edit: January 27, 2013, 05:22:15 AM by lordbraprus » Logged

ito maquiesves
lordbraprus
Crossbowman
*
Offline Offline

Posts: 713


wiiiii


View Profile WWW
« Reply #3 on: January 27, 2013, 04:52:40 PM »

oh, and the pixel/inch is 72 in all? atleast in the 1990´s games ?
Logged

ito maquiesves
Ghabry
Developer
*
Offline Offline

Posts: 1020



View Profile
« Reply #4 on: January 27, 2013, 09:25:24 PM »

Dark Omen sets 16 bit color depth on start.

The colors and resolutions used by games on consoles depend on the system (and less colors/resolutions to save more memory and should run faster, right)
See also:
Megadrive (Wikipedia article):
"The Sega Mega Drive/Sega Genesis used a 9-bit RGB palette (512 colors, 1536 including shadow and highlight mode) with up to 61 colors on-screen at once without raster effects (4 palette lines of 16 colors each, palette indices $x0 are definable but considered as transparent, and can only be used as the background color)."

For dpi/ppi you need the display resolution and the size of your display:
Calculator
But all that dpi stuff is usually only useful if you want to print something (so it appears on a real life paper from a dead tree Wink). Computers dont really use this otherwise (you can only change the dpi in the control panel if you want a larger font size e.g.)
Logged

olly
Global Spokesperson
*
Offline Offline

Posts: 2268



View Profile
« Reply #5 on: January 27, 2013, 09:56:40 PM »

Nice topic and helped my own understanding, thanks.

Smiley

Logged

and back in Nuln, the ageing Graf Berhardt smiled his secret smile of pride whenever he heard the latest tales of his eldest son's ever growing chain of glorious victories -(sothr manual)
lordbraprus
Crossbowman
*
Offline Offline

Posts: 713


wiiiii


View Profile WWW
« Reply #6 on: January 28, 2013, 03:31:09 AM »

thanks for answer, now my last doubt is about how a game is organized, an old game, with the sprites/animation and static images colours.

the main game i have in mind is  master of monster, from 1991, here i put some images, you google it and have more of course:







The sprites of units, they look like 8 colours, the thing is, when youplay there are 3 elements that i see , wich  makes me think, first, the interface grapchis/colours (yellow, black and other colours), then, the map  colours, the colours of terrains and finally, the colour of the units that appears in the mini menu.

so my question is , the screen of the game allow "X" (256?) amount of colours, that colours , the pallete, are.. how many? cause, the units, lets say they are 8 colours, like dark omen, but bigger sprites, and then the map has X colours, and the menu X colours...

The result of the adding of all colours is the number if colours that the game screen allows?

this is MESSY but the right example is in dark omen, the game has images with 256 colours, however in the game, when you play you have, the colours of each unit, the colour of terrain textures etc etc and that is a lot more of 256 colours? it doesnt matter how many objects are being displayed as long as each of them has less than 256 colours.

when i talked about the "adding" of colours in the screen play of master of monster i refered to that; if wi add the colours of each unit in the game, lets say 7 colours X 20 squads, we already have 140 diferent colours in the units, and then, the textures... we have a lot more of 256 colours.

So with that, i htink, it doesnt matter the amount of objects, as long each one has a limited palete 4, 8 16 256 colours.

but.. is that, the same way in an older game? like master of monster, i dont see MoM having 10000 diferent colours in screen but with each sprite/image with no more than 8/16..

so, does MoM and other early 90´s games, have a pallete of  8/ 16/64/128/256 colours, and that colours are divided in all the games sprites?

same for DO? 16 bit is how many colours? if 8 bit is 256 colurs, 16 well, is obviusly more. so it has a maximum of colurs and from there, it has sprites and textures with lots of diferents colours. Smiley

If i finally understood (i am loud thinking), master of mosnter have a MAIN colour pallete from wich each image file uses a limited number .. wich is the only thing i dont know.. but things look like 8.. the main menu maybe is 16 colour? and ... the main pallete, how many colours may have? :0


« Last Edit: January 28, 2013, 03:36:56 AM by lordbraprus » Logged

ito maquiesves
lordbraprus
Crossbowman
*
Offline Offline

Posts: 713


wiiiii


View Profile WWW
« Reply #7 on: January 28, 2013, 08:47:25 PM »

So, here i put images of the reason i am asking all this; i am trying to make a tabletop game taht makes kind of "honour" to old games, but well, i had all that doubts about pixel and colours.

what amazes me, is the diference betwen this images i made, wich i passed it to 18 colorus (hehe no one will notice the 2 extra)



and this one, a image from google, wich i passed to 16



so with this i finally understand that master of monster might be 16 colours per image file, right?
Logged

ito maquiesves
Leisheng
Troll
*
Offline Offline

Posts: 1


View Profile
« Reply #8 on: April 08, 2014, 09:55:23 PM »

The result of the adding of all colours is the number if colours that the game screen allows?

this is MESSY but the right example is in dark omen, the game has images with 256 colours, however in the game, when you play you have, the colours of each unit, the colour of terrain textures etc etc and that is a lot more of 256 colours? it doesnt matter how many objects are being displayed as long as each of them has less than 256 colours.

Maybe I'm a bit late here, but I will answer.

There is one palette of 256 (or 16) colors for entire screen. All sprites, textures, menus and other stuff just choose needed colors from it. And hence, sprites must be compatible with this global game palette. If you insert a sprite which was drawn for another palette then all colors for this particular sprite will be screwed up. If you put a new sprite, colors are not added to the screen palette. The sprite is forced to use colors which are already there. Each color can be shared by different sprites unlimited number of times.

The game can also change palettes if programmed to do so. But it can set only 1 palette at a time. So, different sprites can possibly use different palettes, but they can not be displayed at the same time. X-Com series games were made like this: they had strategic mode and tactical mode. Sprites had different palettes, but they were sorted out: there were sprites for strategic mode only and others - for tactical mode only.

The game also can replace colors in the sprite if programmed to do so. Strategic games such as CnC, Warcraft and others colorize units automatically depending on player choice. One color (usually, orange) is marked as replacable by developers. The game replaces it by color chosen by player.

But there is also so-called "truecolor" system with no palette where all sprites and textures store RGB color components for for each pixel. All images beginning from 15 bits per pixel and higher are truecolor. In this particular case a pixel takes 2 bytes (16 bits), 5 bits for red, 5 bits for green, 5 bits for blue, 1 bit is unused. Each component can be from 0 to 31. Number of combinations is 32767. This is number of colors which is possible to display at the same time. 16 bits per pixel is the same, but unused bit is moved to green. So, green component has 6 bits and can be from 0 to 63. But it does not mean that green is brighter. 63 for green means the same brightness as 31 for others, but green halftones are smoother. 24 bits per pixel is 8 bits for each color component. It is the most widely used system for now.

but things look like 8.. the main menu maybe is 16 colour? and ... the main pallete, how many colours may have? :0
Your screenshot has 16 colors: they are black, white, 3 shades of blue as well as some shades of green, brown and violet. Must be 16 colors total. This is the answer. Palette has 16 colors only, not more. Each pixel is coded by 4 bits and can hold numbers from 0 to 15 which represents number of color in palette.
Logged
lordbraprus
Crossbowman
*
Offline Offline

Posts: 713


wiiiii


View Profile WWW
« Reply #9 on: May 24, 2014, 05:14:30 AM »

Thanks leisheng, i am still alive and preciate your reply Cheesy
Logged

ito maquiesves
Pages: [1]   Go Up
Print
Jump to: