Wrecked Games

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're just that awesome.

Author Topic: Design  (Read 3639 times)

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Design
« on: July 18, 2006, 09:05:27 AM »

I think we need to talk about what direction WGE's design is going in.

Right now, we have the Managers: AvManager, GuiManager, Manager, OgreManager, OisManager, PhysicsManager, ScriptManager, and TerrainManager.

And the Non-Manager Objects(which are intended to be used directly): Actor(Dynamic, physical object), and Camera.

I was planning on splitting Actor into PhysicalActor, and CollisionActor. They would both inherit the basic physic methods used both in collision-only, and full-physics situations. CollisionActor would support Ogre's translate, rotate, etc., and would report back where a collision happened. PhysicalActor would be controlled by using physics forces, but you can only apply these forces in the ojbject's special callback(That's just how OgreNewt/Newton is designed, maybe  that is best, or there is someway around it?).

And finally, about a messaging system, I'm not really sure what parts of WGE would be ideal to use it with. OgreNewt, and Ogre are already tied to together, they don't really need to communicate with messages. The only useful one I can think of would be input.

Perhaps the messaging system should be for the application's, and WGE's use? There could be a central event manager, which routes all of the messages to their proper place?

There's other stuff I'd like to talk about too, but this seems most important right now.  :)
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +1/-0
  • Posts: 2661
    • View Profile
    • http://www.wreckedgames.com
Design
« Reply #1 on: July 18, 2006, 09:12:51 AM »

Splitting up Actor's is a good idea. And, I am not against it at all. Your two classes sound like a good solution. Yes, of course, the phyics controlled character should only move in response to a phyics event, and shold not be moved directly.

As for a messging system, right now I don't really see much of a need. As you mention, all systems are tighly coupled on purpose, to avoid having to abstract out things which have been set in stone (ie. Ogre, OIS, OgreNewt, Squirrel, etc) or setup any complex messaging system. Of course, that's not saying their might be a need in the future - in fact, in my last engine, I had a very simple messaging system for use with the Gui and some xml scripts I used. However, as most everything is done here in squirrle code, I havn't seen the need for that yet.

However, once we begin inplementing the Gui, and other subsystems, I think a messaging system would of course be needed. If you have some ideas on how to implement it now, I'm all ears ;)
Logged

OvermindDL1

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 288
    • View Profile
    • http://www.overminddl1.com/forum/
Design
« Reply #2 on: July 18, 2006, 12:57:12 PM »

A messaging system would be especially useful for when you setup a network subsystem.
Logged

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Design
« Reply #3 on: July 20, 2006, 09:33:04 PM »

Physical and Collision Actors are in. PhysicalActor is used in the robot demo, and CollisionActor is used in the Airplane demo. :)

I don't know if I programmed it in the best possible way, so if you have some time maybe you can take a look at the code and tell me your opinion.
Logged