Hi, I was thinking: Writing a game is done by specifying a function which will be called every tick of the game, something like a 'WorldUpdate' function and every game I know works this way.
What is the idea on writing Smartfox server side games because we can write events only when an user send us something or either when an external event has happened (ie: user logs in / out) . How should we convert what is our idea on writing games (a function that is being called every x time) to this architecture?
extension architecture
Yup, I would just make a call in the init function which starts an interval. This can act like an onEnterFrame of the interval you wish.
However I would make sure this is designed properly because I could image if many instances of this were running it could be slowing the server down with useless looping.
However I would make sure this is designed properly because I could image if many instances of this were running it could be slowing the server down with useless looping.
Its all about the SmartFox!
Well the docs have some really good articles to answer that question. I would suggest you go through them properly and at the end you'll be the master of the Smart Fox!
Any advice I could give I'd be repeating whats in the docs. After looking at all the basic tutorials, Id suggest looking at the real time maze example in pro. The tutorials pretty much expain how to do any kind of game!
Any advice I could give I'd be repeating whats in the docs. After looking at all the basic tutorials, Id suggest looking at the real time maze example in pro. The tutorials pretty much expain how to do any kind of game!
Its all about the SmartFox!