Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

Real Time System Help


InfinityAlex

Recommended Posts

What do you mean by changing the background? Are these active objects? Backdrop objects?

Remember that backdrop objects can't be manipulated in the event editor. You should use Active System Boxes for better control options.

Also, before trying that make sure that your logic is fine - set some string object and set it to "Day", "Night" or whatever depending on the time.

I think LH (luksamuk) did something like this with one of his projects - he might have an idea.

Link to comment
Share on other sites

i think internal clock things should be avoided altogether, for the reason serephim said, and for this:

 

We (zigzax and I) were originally going to have a level in my game where depending what time of day you played depended on whether or not you played in a desert or an icecap.

 

Well, if it worked like that, it would be rare to play in whatever the opposite zone is for you. And that would suck.

 

I guess you could have a S3 like easter egg where

 

       if timer is greater than 43:00

 

                      fuck up the music

  • Like 1
Link to comment
Share on other sites

From what I understand, this is a real time day/night system kind of implementation, not an in-game counter such as Sonic "getting out of here" when you stand idle for minutes in Sonic CD.

There's a Date/Time object that can properly retrieve time along with timezone. Use the compare two general values condition to evaluate whatever the D/T object pumps out.

That should cover any time checks that need to be done.

Link to comment
Share on other sites

I believe I already lost the files of Sonic Phoenix, but I remember that I implemented this using the Date/Time object, yes.

It gets your current hour.

Also I had to make it mandatory for the player to input its timezone. Perharps there might be a way to grab it from somewhere, but I'm almost certain you can't.

Then all I did was calculate the current hour of the level using all the data I got.

 

So it wasn't really real-time, it only calculated the local time of the level in hours, then a certain background would become visible in the beginning of the level accordingly. Nothing really special.

 

I think the biggest job is to find matching backgrounds/recolors for each time you want to set. If you have HWA, I believe you can also write a shader and input the current hour to set the backdrops' coloring. Never tried that, though.

Link to comment
Share on other sites

Why should the player's time zone matter if you can just get the hour (the hour they have set on their clock that is) from the system clock in the first place?

 

This is a very simple problem.  Figure out the hour using the calender or date/time object. Create the actives based on the hour. Make sure they are positioned correctly. Done. I'll whip up a tutorial when I get home if you haven't solved this by then.

Link to comment
Share on other sites

Why should the player's time zone matter if you can just get the hour (the hour they have set on their clock that is) from the system clock in the first place?

 

This is a very simple problem.  Figure out the hour using the calender or date/time object. Create the actives based on the hour. Make sure they are positioned correctly. Done. I'll whip up a tutorial when I get home if you haven't solved this by then.

 

In SPhoenix, the levels were in real places of the world, so they had their own timezone. This is why I had to make this kind of calculation. But surely, you're right. This is a simple problem.

Link to comment
Share on other sites

And I'm a simple mind. I've tried the clock item, but for some reason the background just doesn't change. Waiting on Winnie to get that tutorial done when he's ready...

 

... The background doesn't change itself obviously. If you want the time to be able to change in realtime, you are going to have to poll for the time again and set everything up again.  Right now I'm focusing entirely on getting it set up without making any attempt to clean it out and replace it as the time updates.

 

Here is a basic (very basic) example.  You can figure out how to evolve it from there.  For instance, you could crossfade two backdrops using alpha levels based on how far between the time is from the starting levels of a given time.  You could also add continual polling and reset the backdrops whenever the time changes.  There are lots of ways you could improve this example to make something more organic.

system_time_sets_background.mfa

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...