Light cycle breaks game

Triangle45

Veteran
Veteran
Joined
Aug 26, 2020
Messages
86
Reaction score
24
First Language
Spanish
Primarily Uses
RMMV
So this map is an Inn, interior. There is a short cutscene and that's it no problem. But now I added this event in the top corner (pic related) and when I playtest again, when I go inside the in, the game lags terribly and then crashes and closes itself. When I remove this light cycle event, the Inn map plays as normal and no frame lags or anything, but using this event to control the lights inside just drops framerate to 3, lags, freezes and breaks my game. Does anyone have any idea why?
Outside in the town I used a similar event to control daylight outside and the game runs fine with tons of parallel events, why is this breaking my game inside a tiny inn with barely 5 even common events and not a single paralllel one to interfere?
 

Attachments

evmaster

Is probably eating a brownie
Veteran
Joined
Sep 1, 2015
Messages
562
Reaction score
743
First Language
English
Primarily Uses
RMMV
Since everything is greater than or equal to 0, I would think all of the event page is trying to run. (0 to 18 hours)

Maybe have a conditional branch that checks for a switch first, then the hour? That or have two conditions for each, one that is greater than and the other less than. Like greater than or equal to 5 but less than or equal to 0??
 

Sparky89

Is proberly eating one of evmaster's Brownie's.
Veteran
Joined
Dec 18, 2019
Messages
154
Reaction score
54
First Language
English
Primarily Uses
RMMV
Why so much eventing you can use the Terrax Lighting plugin, and a common events. You can add for say example Light 1 all switch on at 9:00am and Light 2 can be turned on say 03:00 o clock. so any lighting you have all you would need to do is note tag them as LIGHT 1 #FFFFFF and all light one objects in the world will switch on or off.. same with light two if your using differant lights.. you can also add FIRE 1 #FFFFFF for flicker effects.. look it up. Terrax lighting plugin. See my butterflies thats 1 light setup and the other being the fire sticks. they are swicthed on independtly, you can get a day/time plugin Orange time system.

1603074677643.png
 

Sparky89

Is proberly eating one of evmaster's Brownie's.
Veteran
Joined
Dec 18, 2019
Messages
154
Reaction score
54
First Language
English
Primarily Uses
RMMV
Try adding in Wait times say 20 frames or 30 frames and add in a self Swicth A on at the end. because your eventing is doing to much to fast and over again.. as it's parallel
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,268
Reaction score
7,633
First Language
German
Primarily Uses
RMMV
@Triangle45
your problem is that parallel processes are executed sixty times per second, and that takes processing power.
as said above you'll need waits (which basically tell the engine to skip processing for x frames) to reduce that lag.

however I don't know if that event even needs to run continually - how often does the hour change?
If the time system is slow you only need to run that event once on entering the map, erasing it afterwards.
and even if the hours count in minutes you might change that and similar events into something that is only triggered on variable changes, like makin the hour variable a condition on pages etc (it's a bit more complex than it sounds if you want to experiment with page conditions however)
 

Triangle45

Veteran
Veteran
Joined
Aug 26, 2020
Messages
86
Reaction score
24
First Language
Spanish
Primarily Uses
RMMV
I will check that plug in that you mention, but why is this event lagging and breaking the game? I have a similar one running outside in the main village that checks the time and tints the screen according to the hour, in fact I just copied pasted that event in the inn and now it breaks the game? I have way more events running outiside than inside.
 

Triangle45

Veteran
Veteran
Joined
Aug 26, 2020
Messages
86
Reaction score
24
First Language
Spanish
Primarily Uses
RMMV
Try adding in Wait times say 20 frames or 30 frames and add in a self Swicth A on at the end. because your eventing is doing to much to fast and over again.. as it's parallel
Where should I add the wait times? Between each check command or inside each one of it?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,268
Reaction score
7,633
First Language
German
Primarily Uses
RMMV
in fact I just copied pasted that event in the inn and now it breaks the game?
because lag is additive, and partially depends on other factors - but also on the available reserves.

To say that the last event added was bad is the same as saying the last beer was bad - and that the twelve before that didn't matter...
If you used the same event at other maps, then in all cases it was a bad event due to the way it works. But the effect it has also depends on what other objects are inside the main game loop, and other objects can both speed up or slow down the rest of that main game loop.

and the wait should be either at the beginning or as the last command of that event.
 

Sparky89

Is proberly eating one of evmaster's Brownie's.
Veteran
Joined
Dec 18, 2019
Messages
154
Reaction score
54
First Language
English
Primarily Uses
RMMV
Where should I add the wait times? Between each check command or inside each one of it?
i'll say here if your keeping the events but i think this is a much more complicated way of doing things. 1603243374212.png
 

Triangle45

Veteran
Veteran
Joined
Aug 26, 2020
Messages
86
Reaction score
24
First Language
Spanish
Primarily Uses
RMMV
because lag is additive, and partially depends on other factors - but also on the available reserves.

To say that the last event added was bad is the same as saying the last beer was bad - and that the twelve before that didn't matter...
If you used the same event at other maps, then in all cases it was a bad event due to the way it works. But the effect it has also depends on what other objects are inside the main game loop, and other objects can both speed up or slow down the rest of that main game loop.

and the wait should be either at the beginning or as the last command of that event.
haha I understand better now, I thought each map was independent of the others. In that case then I will try to using a plug in.
I was looking and found MOG's TimeSystem, it allows the use of switches and variables depending on the time, would you recommend that one?
 

Sparky89

Is proberly eating one of evmaster's Brownie's.
Veteran
Joined
Dec 18, 2019
Messages
154
Reaction score
54
First Language
English
Primarily Uses
RMMV
I will try deleting my clock system and instead use a plug in then, I found MOG's TimeSystem what do you think about that one?
I'm using Orange time system but i'm sure they will all do a simular thing it's all going to be worth it and better for your game then that much eventing and processing. it can all be achieved with note tages. good luck.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

So I'm practicing ITC with a spirit box, and decide to try to contact my deceased soulmate. It actually gave me multiple identifiers. Me, still a bit skeptical, asked aloud "Fine but does he still love me?" and the box spoke and printed the word "Forever" at the same time. Been a mess of tears since. :kaocry:
Been scratching away at my game and making progress, but just had a revelation. I'm working in full screen and adjusting all my pictures accordingly, but will they resize if someone's screen is smaller?? I hope this doesn't turn out to be a problem later.
Why is there so much month left at the end of money? D=
Hello humans! How goes your day in this journey of living? I hope it is good, for I am human like you, and I am feeling great! Worship the altar.

Forum statistics

Threads
105,628
Messages
1,015,085
Members
137,290
Latest member
LilleB
Top