Announcement

Collapse
No announcement yet.

Add intermediary class between UObject and AActor

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [PROGRAMMING] Add intermediary class between UObject and AActor

    Currently there are two base objects, which stand at opposite side of spectrum.
    One is UObject, which implements only bare minimum need for reflection/serialization/editor to work. On the opposite side is AActor which implements everything. Neither are good for things like AGameModeBase or AGameStateBase (for example).

    What we need is something like UGameObject base which would:
    1. Support componenets.
    2. Support Network Replication (Off by default). Preferabbly networking support could be moved to separate component, and any object with ie. NetworkComponent could support replication. I realize, that it would be huge refactor, so I don't even expect it will happen in foreseeable future.
    3. Have single Root component (but does not need to be Scene/Transform component).
    4. Support transform if root is set to scene component.
    5. Can be rendered in level if have Mesh component.

    That's it. No build in support for Collision, no support for mouse click events, etc.

    Currently bare bone actor takes about 1.5kB of memory. Not much. But considering that most of actors does not need most of the fucnionality implemented in AActor, it adds up to waste.
    https://github.com/iniside/ActionRPGGame - Action RPG Starter kit. Work in Progress. You can use it in whatever way you wish.

    #2
    Forgive me if I am wrong, but i believe what of most you expect there is already implemented into AActor, and again forgive me if I am wrong, but i think AActors have flags to turn off unnecessary events/features such as mouse events, collision events, etc...

    To turn these off look into the Class defaults for any AActor.
    Cheers, Diddykonga.

    Comment


      #3
      No they don't. You would have to remove them at compilation time. Unused properties/functions are always part of the class, unless you remove them.with preprocessor at compilation time.
      https://github.com/iniside/ActionRPGGame - Action RPG Starter kit. Work in Progress. You can use it in whatever way you wish.

      Comment

      Working...
      X