I am sure there are a bunch of tutorials online that explain Scene Graphs in much more detail then I could here so it would probably be better to check them out instead. Here is some links explaining them
Also here is some basic code for a Scene Graph (Only going to post the headers since it is quite long). Also it uses SFML but I am sure most things can be transferred to allegro easily (Though I am not familiar with Allegro).
SceneNode - This will be the base class for all entities in the game. It defines basic functionality for a scene graph and things common between all entities. The derived classes will then implement their own functionality.
Now this has some extra's in it but the main things are this
1) Being able to attach (When you fire a bullet or something) children to a SceneNode and detach them (Like when something is destroyed)
2) Have a way to update all the SceneNodes in the the Scene Graph. I do it by each scene node having a update function which calls the update function of all its children to.
3) Being able to draw each scene node if it needs to be drawn. Same implementation basically as the update function.
4) Each scene node needs to know who its parent node is and who it's children are.
That is basically it (I might have missed something) and of course you can add extra's on there to.
class SceneNode : public sf::Transformable, public sf::Drawable,
typedef std::unique_ptr<SceneNode> Ptr;
typedef std::pair<SceneNode*, SceneNode*> Pair;
explicit SceneNode(Category::Type category = Category::None);
void attachChild(Ptr child);
Ptr detachChild(const SceneNode& node);
void update(sf::Time deltaTime, CommandQueue& commands);
sf::Vector2f getWorldPosition() const;
sf::Transform getWorldTransform() const;
virtual unsigned int getCategory() const;
void onCommand(const Command& command, sf::Time deltaTime);
void checkSceneCollision(SceneNode& sceneGraph, std::set<Pair>& collisionPairs);
void checkNodeCollision(SceneNode& node, std::set<Pair>& collisionPairs);
virtual sf::FloatRect getBoundingRect() const;
virtual bool isMarkedForRemoval() const;
virtual bool isDestroyed() const;
virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const final;
virtual void drawCurrent(sf::RenderTarget& target, sf::RenderStates states) const;
void drawChildren(sf::RenderTarget& target, sf::RenderStates states) const;
void drawBoundingRect(sf::RenderTarget& target, sf::RenderStates states) const;
void updateChildren(sf::Time deltaTime, CommandQueue& commands);
virtual void updateCurrent(sf::Time deltaTime, CommandQueue& commands);
Now to use a scene node you just stick a SceneNode in your game worlds class. For example.
sceneGraph will be the root node for your scene graph.
Now lets say you want to attach a SceneNode for the player's sprite that is on the screen? We would do something like this most likely.
// Aircraft is a derived class from SceneNode
std::unique_ptr<Aircraft> player(new Aircraft());
// Set whatever things you need to set before adding it as a child to another node.
// Attach the player SceneNode to the Air SceneNode which holds as it's children all the aircraft entities.
Now this probably wasn't the clearest explanation (In fact it was probably not even understandable ;p) but maybe it gave you a few ideas. I would suggest you read some tutorials on how SceneGraphs work since they will explain it much better then I tried to.
Also realize that this is only one way to manage your entities for a game. There are many different ways to do so and each has it's pros and cons.
Anyways wish you the best of luck with your game.