1. It's easily extendable.
Base Object has already event handling mechanism.
You can create another object inherited by HSPObject. It already has event handing mechanism, so you just need to implement logic according to state diagram.
2. You have Timer
If you want to have timer, then you can create timer.
Timer is considered as system object, so Once you create timer, then it gives time tick to all created objects automatically.
It gives possibility to make real-time simulation either.
3. Clear Concept: Interaction Handler
Our system has Interaction Handling part as separate module.
It gives clear concept about input.
You can easily connect object with other different interaction device or AI module.
4. Objects process events on Thread
Using Thread can give advantage, but also disadvantage because of difficult debugging.
5. We consider Memory Clean
There were two factors why we made memory class.
- Event can have parameter, and parameter type can be different.
- While developing the poker game, we realized that it's very often to send event to all objects.
Therefore, we decided that we had better have own memory system for taking care about event parameters' creating and deleting.
You can create event, create paramater(type, size), and assign how many object will share the parameter.
Once object receives event and if it has parameter, it decreased reference count.
It guarantees that memory will be clean after reference count becomes zero.
No comments:
Post a Comment