im very happy!
i did this code, erm, kind of, by myself. and it gives the effect i want. of course, if i could tweak it to my preferred level of absolute perfection, i would do so, but for now, considering it's taken me a bloody long time, and lots of questioning to get this far, im really very pleased with it. heres the code that gives a seemingly random background colour wave. it changes with enough variation over time to satisfy me for now. i think it's a bit quick still, and is in need of more subtlety (less garishness), but thats for the near future.
heres the code...
while GameRunning() do
rtime = GetGameTime() -- setting the variable 'time' to whatever the game time is
rtime = rtime / 12 -- taking that 'time' variable and dividing it by n. divide slows down. multiply speeds up.
gtime = GetGameTime()
gtime = gtime / 6
btime = GetGameTime()
btime = btime / 24
rcolour = math.sin(rtime) -- setting the variable 'rcolour' to wave up and down. like this the range is now -1 to 1. 1 being the peak of the wave and -1 being the trough. with the horizontal axis as 'time', in this case the 'time' variable.
rcolour = rcolour * 195 -- setting the range of 'rcolour' from 0 to 255. in this case the 'r' referring to 'red'. do the same with 'g' and 'b'
gcolour = math.sin(gtime)
gcolour = gcolour * 235
bcolour = math.sin(btime)
bcolour = bcolour * 165
--rcolour = math.sin(rtime)
--gcolour = math.sin(gtime)
--bcolour = math.sin(btime)
ignore the comments, thats just for me, trying to make sense of it all! but as you can see, ive commented out that 'y = math.sin(time)' stuff, as that made it fade immediately to black, and nothing else. however, with it removed, it does what i wanted so there you go!
ofcourse, i fully expect that a constantly changing background isnt for everyone, or even anyone!, but i wanted to see what could be done with it, and im learning exactly that, in its simplest form.
if i could, i would like to able to have it be more 'random' with the colour range, because as you can see, i have to set the ranges of the wave in stone. a varying variable like that might do more of what i would ideally want.
so...i thought i would post my latest, and happiest, discoveries!