Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: Script Explanations  (Read 3036 times)

0 Members and 1 Guest are viewing this topic.

TheDerman

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 225
    • View Profile
Script Explanations
« on: December 08, 2004, 07:34:58 PM »

Hi,

This is probably a dumb question, but anyway...

Can somebody just quickly explain the difference between the game.script and the game_daemon.script?  What is each one actually used for?

I find the best way to start learning something is to start with the very basics, so this would help me, as I'm actually doing ok with understanding the code languge - I just need someone to explain this to me so I can fully understand how EVERYTHING works together.  :)

Thanks.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Script Explanations
« Reply #1 on: December 08, 2004, 08:00:37 PM »

Hi and welcome,

in game.script there is the "static" code. Namely the game initialization in the beginning, and global event handlers (such as LeftClick, RightClick and Keypress handlers).

On the other hand, game_daemon.script keeps running in an endless loop and periodically handles "dynamic" stuff, such as positioning the object captions at the mouse pointer, hiding/showing the inventory when the mouse pointer moves to the top edge of the screen etc.

Basically those two scripts are responsible for game initialization and for interface handling. They usually don't have much to do with the in-game logic itself.
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.029 seconds with 20 queries.