Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-01-2001, 10:40 PM
G_yoshi G_yoshi is offline
Forbidden
G_yoshi's Avatar
Join Date: Mar 2001
Posts: 7,206
G_yoshi will become famous soon enough
Send a message via AIM to G_yoshi
Color Cycling

I was thinking, since graal runs in 256 color mode, couldn't it do color cycling which is seen used in many old games like SimCity2000 or LodeRunner.

I think it would be neat, just specify the beginning index out of 0-255, and the ending index which has equal or higher then the first index, then specify the time delays and possibly the direction the color cycles. It would make for some interesting effects on images when combined with setcoloreffect and setzoomeffect Could maybe add a command for showimgs too
__________________
Reply With Quote
  #2  
Old 08-02-2001, 12:06 AM
Solareon Solareon is offline
Registered User
Solareon's Avatar
Join Date: Jun 2001
Location: In a corn field
Posts: 548
Solareon is on a distinguished road
Send a message via AIM to Solareon
waddhafak areyou talking about? you mean color changing?
__________________
-Solareon Doll, thanks to BirdBird_0 for making it
-
First person to choke on a gummi bear and cough it up =)

AIM: SolareonX
flame me 24/7 roffel
-- l33t
JubieSaotomeX < Me
Reply With Quote
  #3  
Old 08-02-2001, 12:50 AM
SkooL SkooL is offline
somebody to love
Join Date: Jun 2001
Location: bat country.
Posts: 3,446
SkooL is on a distinguished road
Send a message via AIM to SkooL
Quote:
Originally posted by Solareon
waddhafak
Phrase stolen from Gabriel.
__________________
the sky is falling
Reply With Quote
  #4  
Old 08-02-2001, 05:10 AM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
You can already do this....WITH YOUR SKILL!!!
^_~

You just need to create a function by which
blue decreases from 1 to 0 while red increases from 0 to 1
then red decreases from 1 to 0 while green increases from 0 to 1
then green decreases as blue increases
then repeat

It's not real hard, unless you wanna do it efficiently.

See, here's one:
NPC Code:

for(this.i=0;this.i<3;this.i++){
for(this.n=0;this.n<1;this.n+=0.125){
if(this.i<1) setcoloreffect this.n,0,1-this.n,0.5;
else if(this.i<2) setcoloreffect 1-this.n,this.n,0,0.5;
else setcoloreffect 0,1-this.n,this.n,0.5;
sleep 0.05;
}
}



See how that grabs yeh.
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #5  
Old 08-02-2001, 10:56 AM
G_yoshi G_yoshi is offline
Forbidden
G_yoshi's Avatar
Join Date: Mar 2001
Posts: 7,206
G_yoshi will become famous soon enough
Send a message via AIM to G_yoshi
I know that i can do that, but that affects the whole palette, I want part of the palette. Because I could have a specific part of the image change colors and this would save on disk space and cut down on useless files.

It's easy to do color cycling with setcoloreffect, but does it on the entire image. I just want a small palette shift, besides, it would look cool You could use color cycling in junction with a whole image color cycle as seen with your script. Kinda like the Atari, it could do color cycling and still have whole palette changes while part of it cycled.
__________________
Reply With Quote
  #6  
Old 08-03-2001, 01:39 PM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
So you mean Pallette Swamp, like how Luigi is a palletteswapped Mario, and all that?

setpal dusk8.png;

It'd be nice anyway. Tricky, maybe wasteful since there's no standard pallette therefore no standard backpals, but nice. I think you'd be better off with recolors though.
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #7  
Old 08-04-2001, 03:34 AM
T-Squad T-Squad is offline
Banned
T-Squad's Avatar
Join Date: Mar 2001
Location: United States of America
Posts: 1,733
T-Squad is on a distinguished road
Quote:
Originally posted by G_yoshi
I know that i can do that, but that affects the whole palette, I want part of the palette. Because I could have a specific part of the image change colors and this would save on disk space and cut down on useless files.

It's easy to do color cycling with setcoloreffect, but does it on the entire image. I just want a small palette shift, besides, it would look cool You could use color cycling in junction with a whole image color cycle as seen with your script. Kinda like the Atari, it could do color cycling and still have whole palette changes while part of it cycled.
Umm you could do that...in a gani just set the image as the body..if you dont use the first 6 colors in the pallette, the seventh could be used for color changing that color in graal...
Reply With Quote
  #8  
Old 08-04-2001, 01:03 PM
G_yoshi G_yoshi is offline
Forbidden
G_yoshi's Avatar
Join Date: Mar 2001
Posts: 7,206
G_yoshi will become famous soon enough
Send a message via AIM to G_yoshi
erm, using a gani is animation, I do not want that. I want an npc command to control the cycling, i.e. moving palette indexes and this has nothing to do with palette swaping, either.

Have you ever played SimCity2000 or any older SVGA type games? Especially used SCURK (building editor kit for SC2k). When you are designing buildings, you can put special colors on the building that will cycle through a small little palette of colors. It was often times use to simulate animation because some palettes had more than 2 colors and went at different speeds.

It is very simple. Just specify the start index out of 255 different indexes and then pick the stop index out of 255 different indexes. Then set the delay time and then run the level and watch certain parts of the npc change colors.

Not trying to sound angry, but how hard is it to understand?
__________________
Reply With Quote
  #9  
Old 08-04-2001, 01:21 PM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
Okay, a legal Graal png has 256 colors, often to its own unique pallette structure.
What you're suggesting would be that, say, a wall image, can just "change" to one of 256 predefined 256-color pallettes.
But what if the wall uses a completely different pallette order? What if the wall goes Black-Green-White and all the other backpals go Red-Yellow-Green-Cyan-Blue-Magenta? The wall will be yellow with red grout for every pallette you use on it, with very slight modifications.
Easy fix, just make sure the target image uses the standard pallette. But how many people are gonna figure THAT one out?!? "I tried to use the cool blue pallette on door.png, but it didn't work! It came out all black and stuff!"
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #10  
Old 08-04-2001, 01:33 PM
Lionel-Jonson Lionel-Jonson is offline
Fly away on my zephyr
Join Date: Jul 2001
Location: Never
Posts: 2,798
Lionel-Jonson is on a distinguished road
Send a message via ICQ to Lionel-Jonson Send a message via AIM to Lionel-Jonson Send a message via Yahoo to Lionel-Jonson
Quote:
Originally posted by SkooL
Phrase stolen from Gabriel.
he even misspelled it
Reply With Quote
  #11  
Old 08-04-2001, 01:56 PM
G_yoshi G_yoshi is offline
Forbidden
G_yoshi's Avatar
Join Date: Mar 2001
Posts: 7,206
G_yoshi will become famous soon enough
Send a message via AIM to G_yoshi
Quote:
Originally posted by Tyhm
Okay, a legal Graal png has 256 colors, often to its own unique pallette structure.
What you're suggesting would be that, say, a wall image, can just "change" to one of 256 predefined 256-color pallettes.
But what if the wall uses a completely different pallette order? What if the wall goes Black-Green-White and all the other backpals go Red-Yellow-Green-Cyan-Blue-Magenta? The wall will be yellow with red grout for every pallette you use on it, with very slight modifications.
Easy fix, just make sure the target image uses the standard pallette. But how many people are gonna figure THAT one out?!? "I tried to use the cool blue pallette on door.png, but it didn't work! It came out all black and stuff!"
i am not sure how to describe any better than I already have. Since each image would already have its own palette, you cycle its palette. No need to use the "standard" palette. The command would cycle the colors of the image's palette.

Look at the animated gif I have attached and notice the bottom right corner
Attached Thumbnails
Click image for larger version

Name:	color_cycle.gif
Views:	99
Size:	46.6 KB
ID:	2989  
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:54 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.