You could use the image object and enlarge it as the background then load different coloured images but there would probably be so many problems with that it wouldn't be worth it.
Try it though.
Show me the power child,
I'd like to say,
That I'm down on my knees today,
Gives me the butterflies,
Gives me away,
'Til I'm up on my feet again,
I'm feeling outshined.
Hopefully MMF 2 with it's layers will come out soon. I'd either wait for that or Make a day level, and then once you get half way through the level, make it a night level.
Make two background system boxes, and draw a daylight image on one, and a nighttime image on the other. Then use my tutorial (in the Articles section) to teach you how to use the BGS.
Basically, if you want day to change to night you need to send the night BGS to back, and vice versa. But doing it that way would be sudden, so you might want to make a THIRD BGS with a sunset or sunrise.
The most efficient and manageable way to do this is store the level data in an array or ini or list. Then have 2 set of background tiles, day and night.
Then to transition from day to night and vice versa, activate a fastloop to scan through the array/ini/list and paste the appropriate backgrounds in.
That way you maintain low file sizes (no big images need to be stored) and the code doesn't have to be modified for any other levels.
Or you could have two active objects (sorry, I haven't tried the BGS object), one night and day. The night slowly creeps down using a timer/loop based event (and changing the y of the night background). Then, after a while, use a timer/loop based event to raise the night object back up until it's off screen. Repeat.
There are several scanning methods you can employ to scan array-styled data. The only way to store 2 dimensional level data in INIs is to use delimitters, like this:
etc. Then you use string parser to break up each of these delimitted strings into their separate pieces.
To scan through this 2d data using fastloop, you need to scan each row at a time, and during each row, each column for that row. That's 2 loops. But it can also be done with just 1 loop that loops for <width * height> number of loops and using a couple of little formulae to get the data. It's up to the person which method they use, but these are the two I use, and I will explain them-
Actually, you know what? I might as well write an article and link it here
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G
Easiest method?
Make a counter that tells what time of the day it is. from 0 to 23 (11 PM). When the counter reaches 24, set it to 0. You can also do another minute counter if you want.
Make a large full-screen black active object and set it to enough transparency so that it looks like night. We'll call this number X.
Set an event so that when counter = 0, set active object transparency to X.
Then just adjust the transparency accordingly to the time of day. Sunrise and sunset times can really vary.
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
Deleted User
18th January, 2004 at 00:10:30 -
Muz's method would work, but MMF would slow down horribly.
I actually know an awesome way of making night and day systems, but I'm not going to tell about it here. It changes from night to day, and viceversa in runtime, everything darkens, lightens, etc.
Sorry, forgot to mention that. I don't think it really bothers MMF 1.5, since most of the other 'really slow' stuff seems a lot faster in the new MMF. The main problem would be that your file size could increase significantly, especially if you're using 16 M colors, have a large screen resolution, and use it on multiple frames.
Alonso, why not make a tutorial for your style? You could gain a little fame from everyone who uses it...
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
You're using TGF? My idea was meant to work with MMF 1.5. TGF's gonna run reeaaaaallly slow if you go with my idea.
Well, maybe it won't. Maybe that was anti-aliasing, not transparency.
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
Time for the lazy way out and just paste an
active object over the playfield.
I can make different objects with different transparency
rates for different times of the day.
- Or fork out cash for MMF.
But I'ts cleared up a few q's that I needed to know.
n/a
Deleted User
1st June, 2004 at 07:04:44 -
I don't want to gain fame. Especially here, in DC.
I still use TGF. Mainly because I have not the
free money to spend on mmf1.5, or when I do, I'll
want mmf2.
-Above post is ancient and probably irrelevant-
An old account of mine, recently cleared out. It's a blast to the past, the age was marked as 14 when I found it. If you know where to look, you can track me. Au revoir.