- Joined
- Aug 1, 2014
- Messages
- 36
- Reaction score
- 6
- First Language
- English
- Primarily Uses
I'm looking for some help with a performance issue. My game takes place entirely within a mansion's grounds, and as such, the main hub that interconnects the manor, servant's house, garden, parking lot, family crypt, hedge maze (And the greenhouse, which I haven't finished yet.) needed to be fairly big. (The exterior map is 180 x 120.)
I'm about 80% done with mapping and implementing the common events required for all iterations of the map, such as doors, lighting, (I'm using Zeus' Lights & Shadows script.) monologue triggers for points of interest and whatnot. The "fanciest" events I'm currently using are images fixed in place to simulate things I couldn't do with tiles without wasting too much set real estate, (I use pretty much every tile for all 9 tilesets, but thankfully Modern Algebra's Fix Picture to Map script helps me circumvent this.) such as creating masks so that characters can walk behind buildings.
I have a global event for night time which will appropriately tint the screen, switch tiles around to say have a window be lit up at night and whatnot, and light up the various lamp posts spread across the grounds. (I went through the map several times, reducing the number of light sources as much as possible without making everything look way too dark near points of interest.)
So here's the pickle. I've hit a threshold where the lights are tanking the framerate. I have currently 60 lights or so, and I imagine I'll add anywhere between 10 to 20 of them by the time I'm finished. These are mostly spread out pretty well across the entire map, with the biggest concentration of them being a garden/picnic area. But while a small drop in FPS is acceptable, I apparently reached a point where it tanked the FPS from the low 50s to 8-12.
I attempted using a Vlue's Proximity Events script to only turn them on when on-screen, and while that does work, it requires them to be parallel processes to function, and needless to say, 60+ parallel processes checking for the player actor didn't really help. (In fact, it seemed to have kept the FPS exactly the same when trading one issue for the other.)
I tried reducing the file size of the lightmaps, but that didn't seem to accomplish anything, nor did merging lights close to one another into a single lightmap.
I'm currently trying out Hime's Connected Maps, breaking my original map apart into four chunks, (Top left, top right, bottom left and bottom right.) and it keeps the FPS in the high 50s even in the map chunk with the highest amount of light sources. I only have two problems:
First, the script seems to require the starting position in the map to be at the top left chunk, or the connections simply don't work. This creates a huge issue, since it breaks every transition in the other three chunks entirely. Even a startup event sending the player to the desired starting point in the other chunks doesn't work, as now you're stuck in a disconnected fourth of the whole.
And second, it seems to completely break Hime's Tile Swap script, which I currently use quite a bit of for certain night effects such as making sure an open door will show the interior light at night, seamlessly switching to a darkened interior when day time comes, as well as changing the appearance of some ruins after a certain task is finished.
Basically, I'm looking for a way to make the Connected Maps script work in tandem with Tile Swap and allow me to use starting/transition points in chunks other than the top left... or better yet, for a way to keep the engine from slowing down so much when I have ~10 light sources in the vicinity, so that I can keep my original big single map.
P.S.: (I am using Mog's Simple Anti Lag and Anti Animation Lag scripts, and they don't seem to do anything to the light sources sadly.)
I'd love some help with this, as I can't finish my hub map until this is resolved.
I'm about 80% done with mapping and implementing the common events required for all iterations of the map, such as doors, lighting, (I'm using Zeus' Lights & Shadows script.) monologue triggers for points of interest and whatnot. The "fanciest" events I'm currently using are images fixed in place to simulate things I couldn't do with tiles without wasting too much set real estate, (I use pretty much every tile for all 9 tilesets, but thankfully Modern Algebra's Fix Picture to Map script helps me circumvent this.) such as creating masks so that characters can walk behind buildings.
I have a global event for night time which will appropriately tint the screen, switch tiles around to say have a window be lit up at night and whatnot, and light up the various lamp posts spread across the grounds. (I went through the map several times, reducing the number of light sources as much as possible without making everything look way too dark near points of interest.)
So here's the pickle. I've hit a threshold where the lights are tanking the framerate. I have currently 60 lights or so, and I imagine I'll add anywhere between 10 to 20 of them by the time I'm finished. These are mostly spread out pretty well across the entire map, with the biggest concentration of them being a garden/picnic area. But while a small drop in FPS is acceptable, I apparently reached a point where it tanked the FPS from the low 50s to 8-12.
I attempted using a Vlue's Proximity Events script to only turn them on when on-screen, and while that does work, it requires them to be parallel processes to function, and needless to say, 60+ parallel processes checking for the player actor didn't really help. (In fact, it seemed to have kept the FPS exactly the same when trading one issue for the other.)
I tried reducing the file size of the lightmaps, but that didn't seem to accomplish anything, nor did merging lights close to one another into a single lightmap.
I'm currently trying out Hime's Connected Maps, breaking my original map apart into four chunks, (Top left, top right, bottom left and bottom right.) and it keeps the FPS in the high 50s even in the map chunk with the highest amount of light sources. I only have two problems:
First, the script seems to require the starting position in the map to be at the top left chunk, or the connections simply don't work. This creates a huge issue, since it breaks every transition in the other three chunks entirely. Even a startup event sending the player to the desired starting point in the other chunks doesn't work, as now you're stuck in a disconnected fourth of the whole.
And second, it seems to completely break Hime's Tile Swap script, which I currently use quite a bit of for certain night effects such as making sure an open door will show the interior light at night, seamlessly switching to a darkened interior when day time comes, as well as changing the appearance of some ruins after a certain task is finished.
Basically, I'm looking for a way to make the Connected Maps script work in tandem with Tile Swap and allow me to use starting/transition points in chunks other than the top left... or better yet, for a way to keep the engine from slowing down so much when I have ~10 light sources in the vicinity, so that I can keep my original big single map.
P.S.: (I am using Mog's Simple Anti Lag and Anti Animation Lag scripts, and they don't seem to do anything to the light sources sadly.)
I'd love some help with this, as I can't finish my hub map until this is resolved.
Last edited by a moderator: