Palettes in modern games?

Miscellaneous Forums/General Discussion/Palettes in modern games?

Is it possible to get Blitz to use palettes? Most of my projects are old-school, and I want to create a full, integrated program with limited resources for graphics (a palette of about, oh, as many colors as 16-bit consoles had,) and sound (the tracker files I make use only sounds from a library of samples I created especially for my games.) Because quite frankly, I'm a bit tired of the slick, prerendered graphics and perfect-fidelity MP3 soundtrack in today's 2D games, I'm wanting to make something simpler and retro.

This should probably be in one of the programming forums, but no, it isn't possible without a library, and unless you've got a very specific purpose for one, it's probably not a good idea.

In your case, I'm not sure why you need a paletted video mode. If you want to use less colors, use less colors. It doesn't sound to me as though you need to actually enforce that. Just create the graphics and only use X colors.

What Gabe said. My PC doesn't even HAVE any non-"truecolor" display modes.

Why not just define your palette by drawing a line of coloured blocks into a small image, then draw all your art assets using only those colours and nothing else?

Something like this:


I wonder tho what's easier to draw. Using such a palette with gradients, or just in 24bit RGB and then using some color-reduction function.

Anything produced in this century will run true 32-bit colour stuff full speed, so why bother with lesser displays?

Barney

For nostalgia reasons I guess, and maybe for cartoon-quality reasons.

Seems like a lot of effort for nothing, IMO, since with truecolor, you can simply use as many, or as few colours as you need.

To emulate a palette GFX mode, you'd also have to have your own image format and renderer, where each pixel in the image is an index into a CLUT (colour look up table), instead of the usual direct RGB components. Such a renderer would likely be pretty damn slow.

The only practical use for a palette mode that I can think of is palette cycling effects.

You can often create a lot more atmosphere with limited resources than you can with a 2560x1600 24bit colour display and 96KHz 7.1 channel surround-sound.

Presented with a minimal of visual and audio information, people use their imagination to fill in the gaps. This is why you get a different feel when playing a game from the 80's and early 90's than you do when you play FIFA '08, Forza Motorsport or FarCry.

Try this link for the excellent "Extended Blitz 2D v. 1.60" :

www.blitzbasic.com/Community/posts.php?topic=23561

One reason to miss palettes is the sort of animation effects you can create by altering the palette in realtime.

No big deal but I've missed it on occasion. Even something as simple as making a sprite flash white is a lot more involved without palettes.

funny enough I've kind of implemented a 16 colour pallete for my blockgame framework.

Why ?.. I dont have much time for home coding and I was wondering if I limit myself to a small resolution/pallete and simple sounds I would be able to actually complete something.
It also means I can create games where anyone else with BlitzMax can simply cut/paste the code and run it with no external media. It would be like the old games magazines where they printed out the listings for people to copy.

To this end I have a simple framework that I can extend. It creates a tiny 160x120 pixel window ( scaled up x4 so it doesnt look like a postage stamp ).

It has 2 abstract methods that must be implemented. An Init() method called when the game starts and Update() which is called between frames.

It has simple methods to create multiframe sprites and to populate them with the 16 available colours. I have a couple of sound methods which allow me to create simple sound effects. Thats it ( so far ) .. I will probably implement collision detection using bounding box and pixel perfect.
If all a bit rough round the edges.. the actual game engine draws each pixel within a sprite using DrawRect. Its fast enough for such a small resolution but if I decide to go for 320x240 it might need re-writing.

I cant remember why I replied to this thread now... Oh yeah !.. ermmm.. you would have to implement a Look Up table yourself.

Good Luck !

Yeah, I must admit I do miss being able to use groovy colour cycling effects, as I used muchly in this game. :P

Cobra and PureBASIC can do it - or you can mimic the effect as suggested above.

Even something as simple as making a sprite flash white is a lot more involved without palettes.
Pixel Shaders are your friend.

Not in Blitz3D, they're not.

Not in Blitz3D, they're not.
You're starting to sound like that DB fella. :o>

There's certainly something very appealing about the minimalist style old games were forced to use, and sprite graphics can be sooooooo gorgeous - Metal Slug for instance - Wow!

3D graphics just don't have the same appeal to me - there's something about a well animated sprite game that just looks so good, has so much character and charm...

Check these out:




Erm, excuse the size of that post, I thought they'd show as links, however, they look ACE!

double post....doh.

You're starting to sound like that DB fella. :o>
Nah, I couldn't give a toss if Blitz3D supports shaders, or not. :)

Vorderman: Yes, MS is a pixel art tour de force. ;)

Metal Slug! I love Metal Slug! That's exactly what I'm going for.

And QuietBloke, where can I get that framework?

Hi D2,

Your welcome to have what Ive currently got.. like I say.. its rough around the edges. Its my first attempt ( having spent about 2 weeks on it ).
I'll email it to you later.

I assume the email you gave is correct.

I think that classic pixeled 2d has its value, but these days everything seems to need to move in a 3d world. That's perhaps what killed those 2d gfx in recent times, not their quality but their application became extinct. I'd say, do me a 2d game with those gfx any day over a 3d game. It's not just the 2d gameplay that appeals to me more than 3d/FPS, but also the detail in the gfx: pixel-detail.

Hi D2,

I was gonna email the source but I realised your using BlitzPlus so its probably no use to you.
Anyway.. if you still want to look at the framework you can get it from my website.. look in the TBlock Games menu.