Commit Graph

12 Commits

Author SHA1 Message Date
Anewbe
09b01407e3 Adds Various Sounds, Looping Sound System 2019-03-27 03:55:21 -04:00
Neerti
86174593bf Replaces GoonPS scheduled_tasks and obj processing with SMC processing subsystems and timer 2019-03-26 23:58:26 -04:00
Neerti
3b5874d3f1 Weather refactor. 2018-08-11 18:42:36 -04:00
Arokha Sieyes
462effc1d2 Creates SSplanets subsystem
For SPEEDYNESS

It probably works. I mean it's hard to sit there for 8 hours and test it. But it seems to work okay. At worst if it doesn't you'll have weather that doesn't make sense. ;v
2018-06-02 19:09:35 -04:00
Leshana
c4d714dea8 Replaces set_light with direct update_lumcount for planet suns.
Setting lights on every single turf takes way too long.  Instead of havingto create a light source for every single outdoor turf, we find the corners to light up and apply the sunlight to them directly.
We also make sure to avoid having planet sunlight being 4x too strong, which would happen if we naively looped over all corners of all outdoor turfs.
Note: This has the side effect of making the sun's light and color ACCURATELY reflected on turfs.  Previous code doubled up on light and appeared brighter than it should.
2018-04-18 21:54:58 -04:00
Leshana
471e544a61 Revert "Merge pull request #4779 from Neerti/2/1/2018_make_the_sun_not_lag_again"
This reverts commit f4df29713d, reversing
changes made to 337e5e7436.
2018-04-18 18:08:16 -04:00
Neerti
b95562a2ff Planetary Lighting Optimization Attempt
Changes how lighting is applied to the Surface.

The current method works by making every tile glow in a specific color and intensity. The issue is that when it is time to change the color/intensity, it can take the light controller a considerable amount of time for it to update every tile (estimated to be around 14,000 tiles), which can take a minute or two for the lighting controller to finish.

New method is to have a special light source for the surface, with different properties to the 'regular' light source that most things use for making light. The special version doesn't care about line of sight or lighting falloff. This special light source is applied to a series of invisible 'sun' objects that get generated as the planetary controller gets created. When the lights need to change, the lighting controller has to change a much smaller group of objects instead of literally every outdoor tile.
2018-02-10 07:18:08 -05:00
Neerti
7225ea2b66 Read github PR for details. 2017-10-10 00:48:27 -04:00
Arokha Sieyes
d00c5941ca Controllerized Planets
Controller with deferrals and SCHECKs to be specific. Won't lag while updating the sun, weather, or temperature.

Also moved some vars around. Namely the planet walls are stored on the planet, not in the weather_holder.

Planets now have their own turfs, the controller 'gives' them to the planets each cycle if there are any unallocated turfs in the global lists, to avoid iterating over other planets' turfs if you have more than one, then cuts the lists if you were crazy and some turf added some invalid type. This saves us type-checking in the for() loops later to make them crunch faster. The former operation should only happen once at the start of the game (and maybe very rarely when turfs are added/removed from a map during the game).

With regards to the temperature updates, rebuilding the zone entirely is an intensive operation. Instead we can use this new cheaty proc to do it from over here. ZAS code outside ZAS oh noooo. Well, the option is to snowflake this case into ZAS which is maybe worse?

Only downside to all this is that if you manually set weather and time it might take between 1-60 seconds for the controller to get around to checking if you wanted to update it. That's not that big a deal. If you really want you can now debug that controller and call doWork on it.
2017-04-18 20:08:22 -04:00
Arokha Sieyes
aaeae6695a Make planets more generic
So that Sif doesn't have to be the only one!
2017-04-14 21:36:48 -04:00
Neerti
836d8dfa3f More stuff, finalizes it I hope. 2017-02-20 18:28:31 -05:00
Neerti
1d9e7c8c08 works on planet stuff 2017-02-06 20:45:21 -05:00