Skip to content
This repository was archived by the owner on Apr 10, 2021. It is now read-only.
This repository was archived by the owner on Apr 10, 2021. It is now read-only.

gmo needs to be component based. #41

Description

@Sixmorphugus
  • propertiesObject needs to be able to have properties added to it dynamically so gmo components can have their info be part of the object they sit on rather than the component (and therefore be saved)
  • The gmo deriviatives we have now should probably be deleted.
  • We won't allow for gmo nesting. (Putting a gmo inside another gmo)
  • gmo needs a playSound function (for playing audio at its position) and a moveWithCollision function, plus others

Components need an update function (like gmo), renderability (like gmo), a preUpdate function and hooks.
The base component class should be instantiable in ChaiScript and usable for the creation of custom object components.

Component interaction is done via weak_ptrs.

Possible components

  • gmoComponent (base)
  • gmoComponentSprite (wraps drawSprite that "follows" the gmo with offset)
  • gmoComponentTiles (wraps drawTiles, same as above)
  • gmoComponentText (wraps drawText, same as above.)
  • gmoComponentEmitter (allows little particles that use a given state and a random part of a texture)
  • gmoComponentLight (makes the gmo emit light)
  • gmoComponentPhysics (gives the gmo physics and velocity based collision detection + gravity with floors/ceilings, must be usable in platformers and rougelikes)
  • gmoComponentZone (gives the gmo a zone that can detect objects)
  • gmoComponentFollow (makes the gmo follow something with a set multiplier)

MAGEAux.dll components

  • gmoComponentBox/Line/Point
  • gmoComponentAudioLooper
  • gmoComponentListMenu (does what uiMenu used to, requires no sprite or text components)
  • gmoComponentMouseButton (has a hook event that posts when the mouse enters/leaves/clicks the object, can be configured to mess with a sprite component by playing animations with custom names)
  • gmoComponentRougelikeCharacter (allows for creation of a character with multiple body sections that animate individually (can be given their own sprite components via weak ptrs) - these can include a character's "legs", the parts of a character that will "face" the mouse and parts that don't rotate. Animations need to be compass directions (up to 8) and have multiple modes (compass (4 directions), extended compass (8 directions) and constant (always facing the same way)
  • gmoComponentJeff (makes the gmo play the "my name is jeff" sound when clicked, doesn't require mouse button component)
  • gmoComponentTextBox (lets the user enter text)
  • gmoComponentKeyboard (shows keyboard the user can select "letters" from)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions