Zania week 5: Ship builder


  • Moved the actual creation of physical bodies to their respective class instead of forcing the actor aggregator to do it. The reason is simple, box2D’s physics system requires me to compose compound project in one shot. I figured separating them to different classes is bad for readability and I get to remove two functions from the actor aggregator.
  • Added Compound shape builder and offsets
  • Adding bullet existence timer
    • Move bullet to be created by actor
    • How to do destructor?
    • Delink actor from actor list
    • Nullified all references to other variables
    • Removed all reference to actor: m_ship, m_player etc. Check sol and solarSystem. Created Destructor for all class that has reference to actor. Actor calls these destructors
    • The game crashes at bullet destruction no physics body is found
    • investigation found that CreateBullet in SolarSystem is badly written and bullet is the physics body itself. Need to use actor assignment and a m_body.
    • Current Bullet construction/Destruction route has no body assignmnet:
    • Ship Calls SolarSystem::CreateBullet(ad)
      • SolarSystem Calls new Actor(ad)
        • Actor constructor calls new Bullet()
          • Bullet assigns stuff
      • Destroy Bullet()
    • Difference between bullet and other class is that Ship is the one handling body creation after receiving command from SolarSystem

Steps to first milestone May 1st

  • One player ship and one ai ship artwork finished along with their xml data
  • Hitpoints, body existence timer and actor destruction
  • One planet orbiting the sun.
  • GUI placement
  • Booster animation
  • Populated galaxy
  • Dynamic graphics loader?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>