Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: The best approach  (Read 3621 times)

0 Members and 1 Guest are viewing this topic.

McCoy

  • The cocido eater
  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 365
  • Spurrrrrrring
    • View Profile
    • Spur Games
The best approach
« on: July 08, 2003, 11:26:44 AM »

What do you think is the best approach: a HUGE looped script attached to the game object (game_daemon.script...), with all the things that need to be checked during all the game but can not be handled by "events" (caption management, showing the corner buttons (in my case)),  or lots of little looped scripts attached to the game object, everyone managing a routine on its own (one manage the caption, another one corner buttons check...), and with sleep times adapted to every purpose? I have discovered that ALL the  slowdowns in my game are caused by the game_daemon sleep time... so i'm going to split it in little scripts, and put a 40ms sleep time for the floating caption, 250ms sleep time for the corner buttons check... and all that. I hope that will fix the slowdowns!!! Anyway, I want to know your opinions about this fact, and if anyone finds another approach... even better!  ;D
« Last Edit: July 08, 2003, 11:35:56 AM by McCoy »
Logged

Click here to sign my sig!

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:The best approach
« Reply #1 on: July 08, 2003, 03:41:48 PM »

Yep, I think it's a good idea. There shouldn't be any (significant) performance difference between one script or five scripts running at one time and this way you'll be able to tweak the sleep times exactly just the way you've described above.

But *always* try to keep those "daemon" scripts as simple as possible, and try to limit the amount of code actually executed by using "if" conditions.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.041 seconds with 24 queries.