How about the idea that System can fetch Engine

68 views
Skip to first unread message

姚建舟

unread,
Jul 29, 2013, 11:39:19 AM7/29/13
to ash-fr...@googlegroups.com
Hi,Rechard
  I think add Engine to System' member will be more convenient,how about this idea? appologize for may be someone ask this question before
  I am also doing some experiment on porting this great framewok on c++ cause I think using ash to write game can be more elegant and do much benefit,
but I found it's hard because there's no reflection on C++ and Function class,do you have some plan on porting ash to c++?
 Thank you!

Richard

unread,
Jul 30, 2013, 3:22:07 AM7/30/13
to ash-fr...@googlegroups.com
Hi

I don't generally like circular references, and if the system has a reference to the engine we would have a circular reference since the engine already has a reference to the system. If you need a reference to the engine then you should override the addToEngine method in your system and grab it there.

I haven't looked into a C++ port but would be interested in it. Note that the implementation of nodes in Ash is based on limitations and features of Actionscript. The key to an effective port is to take the core principles and architecture of Ash and implement it in the context of the platform you're porting too. In C++ you may find a better way to implement nodes than copying the Actionscript implementation. Can you do it with generics? Is the get method of the entity in C++ sufficiently fast that you don't need nodes and a list of the appropriate entities is all you need? What have developers done in porting to other platforms, are there any ideas there that you can use?

Good luck
Richard
Reply all
Reply to author
Forward
0 new messages