Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Scripted World Clock vs Common Events World Clock differences?

I was just curious what are the differences, performance-wise between a scripted world clock with a day/night feature, and a common events world clock with a day/night feature?  I understand that a scripted clock would be far more customizable, but a simple common events one  as described above, would a parallel event cause any performance drags over time?
 

khmp

Sponsor

I'll say... Not enough to avoid doing it the way you feel comfortable. About events though. With any event on the map be it common/map, parallel/autorun/touch/action they have to go through a lot of stuff in the interpreter. Showing a picture on screen for example. Doing this through an event. First it gets read from the map as an event. Waits to be called up based on conditions. Once it has been decided that its time for the event to run. All of its instructions are placed into a list and executed one at a time. Each command in this list is compared against a humongous case statement. In this case it will find method "command_231" which steals a picture from Game_Screen. Then finally we have a picture on screen. And that's only to show a solitary picture on screen. And with my limited knowledge of the Interpreter class I might be missing a step or two. The amount of code that needed to be traversed is a lot more than what was needed to just simply show a picture on screen. A similar argument can be made with this system. Eventing something complex and Scripting something complex is like trying to open a door. With scripting the door requires a little bit less force than with eventing. I'm not knocking eventing just be aware of the extra effort the CPU makes to accomplish something through eventing. I hope I explained it properly.

Good luck with it BlueSin! :thumb:
 
Heh thanks that made things tons more clear.  It does confirm my fears regarding parallel running events, but due to my lack of scripting knowledge, I am probably going to stick with the common events world timer.  Right now I have it setup pretty interestingly and it works thus far.  I just hope it wont cause problems later on during cut scenes.  Thanks again =)
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top