Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Color Fading

Author
Message
Ace Of Spades
19
Years of Service
User Offline
Joined: 6th Mar 2005
Location: Across the ocean
Posted: 21st Jul 2005 15:54
How do I get the background to fade through all the colors of rgb() smoothly? I can do it just by incrimenting each portion r,g,b in order, but then it will "jump" to a complete different color sometime. I just need a way for it to fade smoothly through all the colors. How can I do this?

RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 21st Jul 2005 16:11
Im not sure of how exactly you'd go about this so I don't have code but instead of increasing each colour value try increasing one of them at a time and checking if they equal 255, if so move on to the next value.

Still I havent tried it but its something to think about.


Current Projects: SHADE - Game Maker | Mecho - TGC Puzzle Entry | Halo Physics Engine | COLD - Polygonal Collision Detection
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 21st Jul 2005 16:55 Edited at: 21st Jul 2005 17:00
Classic or Pro? Post some code so we can see what your working with.

Here's for Pro (make it a sprite then set sprite diffuse):



Or do you mean filling the background with one color at a time of all 16 million colors?
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 21st Jul 2005 19:23
Something like this perhaps?



Tinker with the values until you get color effect you like


BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 21st Jul 2005 23:49
The sample source in the newsletter assets tutorial (http://www.thegamecreators.com/data/newsletter/newsletter_issue_28.html) changes the health bars from green to orange to red.

BatVink
Ace Of Spades
19
Years of Service
User Offline
Joined: 6th Mar 2005
Location: Across the ocean
Posted: 22nd Jul 2005 02:09
Thanks for the help, went with Spooky's code, exactly what I needed

Login to post a reply

Server time is: 2024-09-23 23:21:09
Your offset time is: 2024-09-23 23:21:09