# Getting Started
Developer games take events as mainline, players fill in the corresponding logic in the events.
- Developer system provides some global objects for players by default. The global object for event monitoring is ScriptSupportEvent, check Wiki for other global objects.
- Players need to add event monitors manually. Game.Start event is executed when the game start.Detailed event types and return parameters are available in Event-System
ScriptSupportEvent:registerEvent([=[Game.Start]=], Game_StartGame) --function() end
- About game event, event monitoring are not necessary except Game.Star, players can choose accordingly.
- Trigger order of game events:
- Trigger Player.Init event when player enter room
- Trigger Game.Start event when game start
- Game.Run event is triggered by each tick in game
- Game.End is triggered after game ended, or call
Game:doGameEnd()to end game.
- Game.TimeOver event is triggered when game is timeout
- Data transfer between different scripts under the same game can be completed by _G, example as below:
-- Effect:Display chat when game start'Hello World!' -- Filetest1.lua _G.sayHello = 'Hello World!' -- Filetest2.lua Game_StartGame = function() Chat:sendChat(_G.sayHello, 1) end ScriptSupportEvent:registerEvent([=[Game.Start]=], Game_StartGame)