• 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.
Sign in to follow this  
Followers 0
TheComet

Colour Cycling - An Old School Technique

10 posts in this topic

Seize the Day was a calendar program made by in 1994 by Buena Vista software. It features graphics that at the time, were revolutionary because of the way they handled color cycling. These images were static bitmaps, but by changing color values, they appear animated. What is also impressive about these images is that they had full day night cycles built in, rendered also through color cycling. A few years ago, a html5 version was made. A copy was uncovered online and there is a way to use the program through DOSbox. As well, one of the original programmers for the project, Iam Gilman, has thought of the idea of remaking it, open sourced, for modern machines.

 
This popped up on my blog today and I wanted to share it with you all. The HTML5 demo can be played here:
http://www.effectgames.com/demos/canvascycle/
 
Make sure to play around with the settings on the right. The guy who implemented the HTML5 canvas program mentions that he improved on the technique by linearly blending the cycling colours to produce smoother transitions.
 
Here are the results of what can be done with colour cycling:
 
tumblr_n4w85syp811s559q7o1_500.gif
 
tumblr_n4w85syp811s559q7o2_500.gif
 
tumblr_n4w85syp811s559q7o4_500.gif
 
tumblr_n4w85syp811s559q7o3_500.gif
 
tumblr_n4w85syp811s559q7o6_500.gif
 
tumblr_n4w85syp811s559q7o5_500.gif
 
tumblr_n4w85syp811s559q7o7_500.gif
 
tumblr_n4w85syp811s559q7o8_500.gif
 
tumblr_n4w85syp811s559q7o9_500.gif Edited by TheComet
0

Share this post


Link to post
Share on other sites

Color cycling is a really great old-school technique -- You could eke out even fullscreen animations that the hardware had no business putting out otherwise.

 

Its kind of a shame you don't see it so much nowadays -- certain games pay homage to it, but almost no one actually implements it realistically (Shovel Knight is the only one I can think of off-hand). I *still* have plans to one day implement a very faithful SNES-style graphics-library capable of employing color cycling, roto-zoom, and scanline effects all on the GPU -- doing so isn't rocket science but its not a trivial exercise, either.

0

Share this post


Link to post
Share on other sites
Pretty images.

I remember those days; one concern was that if you didn't get it completely rotated in time you could get 'snow' noise at the top of your screen. The longer the dma transfer took the farther down the static went on the screen.

They (Buena Vista) weren't the first to use the technique, I remember games that rotated the EGA palette years before 1994. Several of the early mass-market online networks like Prodigy and CompuServe used them in many games, that was in the 1986-1990 era. Even then people talked about the Commodore Amiga's Copper chip, a dedicated co-processor that could be used to mess with the palette mid-draw, allowing things like procedural background gradient colors that could ebb and flow as the palette rotated.

CompuServe's graphics interchange format for those types of animated images evolved and then served as the standard we all know and love today. You can include animated palette blocks rather than, or in addition to, animated pixel blocks. Making a good palette for animation is much harder than just replacing the pixels, but the format supports it for pixel artists who want to invest all those extra hours.

That style of artwork, designing individual pixels in preparation for cycled palettes, is quite tricky and requires skill to do well, probably far more skill than animations that simply swap out pixel buffers. They could also be much smaller which was critical on old systems. Those pictures are great examples.

Thanks for bringing back the memories. Edited by frob
Add some nostalgia
0

Share this post


Link to post
Share on other sites

Chrome crashed, and I lost my initial text, so I will be brief.

 

I was going to say that Deluxe Paint on the Amiga computer had this already around 1989-1991, and doing some research, it seems it is the same pictures that was in the PC version of the same program that is used for this effect.

 

The Amiga computer had this "ability" natively in the way it handled graphics: planar opposed to PC's that were using what was called 'chunky pixels' back then.  Planar means that you had a certain number of bit planes you could activate, and all the bit combinations for a pixel was mapped to a colour register rather than writing the colour directly to the pixel, like you do on PC-computers

 

I do remember one colour cycle animation of a bird flying over the screen, and was pretty fascinated how they managed to calculate the correct colour values to make that work, like magic just cycling a few groups of colours from the palette.  The bird wasn't big, but it was cool to watch never the less.

 

Edit: Frob's response slipped my view lol...

Edited by aregee
0

Share this post


Link to post
Share on other sites

Chrome crashed, and I lost my initial text, so I will be brief.

 

I was going to say that Deluxe Paint on the Amiga computer had this already around 1989-1991, and doing some research, it seems it is the same pictures that was in the PC version of the same program that is used for this effect.

 

The Amiga computer had this "ability" natively in the way it handled graphics: planar opposed to PC's that were using what was called 'chunky pixels' back then.  Planar means that you had a certain number of bit planes you could activate, and all the bit combinations for a pixel was mapped to a colour register rather than writing the colour directly to the pixel, like you do on PC-computers

 

I used to love Deluxe Paint color cycling.  Nothing this sophisticated, but for kicks I liked to take one of the gradient-cycle pens, turn on a bunch of symmetry, and make intricate mandalas.  Then by cycling the colors in the gradient, I would get endlessly looping animated mandalas.  Very easy, but a neat effect.  

 

Historical note: you might be conflating planar vs. linear ("chunky") memory organization and indexed vs. direct color.  Both the EGA and VGA architectures were natively planar, although the famous VGA Mode 13h provided linear addressing.  Color cycling was possible in both planar and linear VGA modes; regardless of how the bits were organized, what they represented was an index into a mutable color table.

 

(Edit: I had said that EGA cycling wasn't possible, because I had made a mental mistake about the EGA color table.  EGA color cycling was possible, too.)

Edited by valrus
0

Share this post


Link to post
Share on other sites

 

I used to love Deluxe Paint color cycling.  Nothing this sophisticated, but for kicks I liked to take one of the gradient-cycle pens, turn on a bunch of symmetry, and make intricate mandalas.  Then by cycling the colors in the gradient, I would get endlessly looping animated mandalas.  Very easy, but a neat effect.  

 

Historical note: you might be conflating planar vs. linear ("chunky") memory organization and indexed vs. direct color.  Both the EGA and VGA architectures were natively planar, although the famous VGA Mode 13h provided linear addressing.  Color cycling was possible in both planar and linear VGA modes; regardless of how the bits were organized, what they represented was an index into a mutable color table.

 

(Edit: I had said that EGA cycling wasn't possible, because I had made a mental mistake about the EGA color table.  EGA color cycling was possible, too.)

 

 

Regarding the "unlimited" colour cycling.  That made me think of the old "bob"-effects where instead of using double buffering, you used 3 buffers to make it look like you were drawing "unlimited" balls on the screen.  (Not clearing the buffers for each drawn frame.)

 

Regarding planar vs. linear addressing, my mind may be a bit fuzzy.  I remember using a BIOS int to switch to various graphics modes, using VESA, and draw something on the screen afterwards.  All the modes I ever used was linear addressing, but I have a vague memory of there being a 256-colour palette mode too, and I seem to remember some schematics in old assembler code books, where graphics were illustrated as being planar, so I am probably wrong about that.  Just that I seem to remember that one of the big differences between "Amiga vs. PC" back then was just the planar vs linear graphics, and the sound, of course.

 

Wasn't CGA like 4 colour palette, and EGA 16 colours?  Checking Wikipedia, I didn't even know you had 64 predefined colours to choose from in EGA mode.  But before SVGA, I had a Commodore 64, and CGA and EGA never looked anything like what you could do on C=64 and Amiga.  I still remember the old beast of an 80386 SX that didn't even have a math co-processor.  It had 2 MB RAM, and I remember a whopping 40 MB Hard drive.  Windows and DOS took 20+ of those...  I remember upgrading the memory on the graphics card from 256 kB to 512 kB...  Some changes, looking back, lol...

0

Share this post


Link to post
Share on other sites

CGA you had two bit-banks, and you needed to pick one of four pre-determined palettes. EGA had 16 colors (four bits) on a palette of 64, again with bit banks to determine what colors to show.  VGA followed the same pattern with a palette of 256 adjustable colors and the traditional bit bank, and they also had a "chained" mode (mode 13h) where you could access it like a traditional array of 8-bit values rather than individual bit banks. It was generally faster to run DMA transfers into the bit banks rather than to use chained mode address the array elements directly.

 

Hardware floating point support wasn't common on the home PC until around 1996. Up until the 386 the floating point was a separate optional (and expensive) co-processor.  The 486 had it built in for some models, but the 486SX was a cheaper version with the floating point disabled. (For most manufactures the SX was just the batches with a defective FPU, they removed a pin and sold it cheaper.) It wasn't until the original Pentium that you could be sure there was a working FPU. It took a few years before there was enough market share that companies could rely on a reasonably large market of FPU-enabled processors, so 1995/1996 was the big transition time.

 

Today most programmers take floating point for granted and assume it is on all chips. The original iphone (2008) included a separate co-processor for floating point, it almost wasn't standard and few of the programmable phones before it had a dedicated FPU. The Nintendo DS (2004) that many people associate with 3D games does not have a floating point processor.

 

Having fully functional, dedicated floating point hardware on every computer is a fairly new phenomenon. Beginners and even a few experienced people may think of them as ubiquitous, but just six years ago I was working on major games for mainstream devices without hardware floating point support.

0

Share this post


Link to post
Share on other sites

CGA you had two bit-banks, and you needed to pick one of four pre-determined palettes. EGA had 16 colors (four bits) on a palette of 64, again with bit banks to determine what colors to show.  VGA followed the same pattern with a palette of 256 adjustable colors and the traditional bit bank, and they also had a "chained" mode (mode 13h) where you could access it like a traditional array of 8-bit values rather than individual bit banks. It was generally faster to run DMA transfers into the bit banks rather than to use chained mode address the array elements directly.

 

Hardware floating point support wasn't common on the home PC until around 1996. Up until the 386 the floating point was a separate optional (and expensive) co-processor.  The 486 had it built in for some models, but the 486SX was a cheaper version with the floating point disabled. (For most manufactures the SX was just the batches with a defective FPU, they removed a pin and sold it cheaper.) It wasn't until the original Pentium that you could be sure there was a working FPU. It took a few years before there was enough market share that companies could rely on a reasonably large market of FPU-enabled processors, so 1995/1996 was the big transition time.

 

Today most programmers take floating point for granted and assume it is on all chips. The original iphone (2008) included a separate co-processor for floating point, it almost wasn't standard and few of the programmable phones before it had a dedicated FPU. The Nintendo DS (2004) that many people associate with 3D games does not have a floating point processor.

 

Having fully functional, dedicated floating point hardware on every computer is a fairly new phenomenon. Beginners and even a few experienced people may think of them as ubiquitous, but just six years ago I was working on major games for mainstream devices without hardware floating point support.

 

 

Oh I had a feeling that when you occasionally saw different colours in CGA and EGA, there were always the same colour combinations.

 

Regarding expensive option, I did actually buy a math co-processor for that machine, and it was expensive - just along the line of the whole computer itself.  I paid about 3400 USD back then, not counting inflation...  And that was without any extras.  (No audio card, no co-processor, low memory, etc.)  I am sweating just thinking about it, lol...

 

Wow!  I indeed would expect floating point operations would be common in microprocessors at the beginning of the 2000's.  So what do you do without floating point?  Fixed point math on integers?  Modulo 2 math?  (I remember assembly optimisations in the old days, pre-calculated sine tables with 256 degrees instead of the usual 360 degrees so you wouldn't need to test for wrap-around, etc.)

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0