Cripes 2.0: Entity progress

Published February 10, 2009
Advertisement
Alright, so I have a barebones EntityManager class up, which maintains a std::list of Entity instances. Each Entity has a std::vector of sprites, intended to be used as frames in Entity animation. I guess it's mostly just there to look good right now, since I'm not really too sure how I'm going to implement the sprite animations. Anyways, the entities are owned by the EntityManager, and Add() returns a pointer to the Entity in its list. I don't think std::list moves its elements around in memory like std::vector does, which is why I think it'll work fine.

This is all a learning process for me, obviously: this is my first real game project. So I guess I shouldn't be too surprised when things go wrong.

EDIT: Something went wrong! If I want the EntityManager to construct a CHAR_INFO clip with the entities - an entity map, basically - then it needs to know how big the world is for wrapping to work properly. Building this entity map in World leaves a bad taste in my mouth, because after all it's getting a ready-made clip from Map. I can't pass the world dimensions to the EntityManager because I don't think it should have that information, either. There has to be a better way :/
0 likes 2 comments

Comments

evolutional
Quote:Original post by Twisol

This is all a learning process for me, obviously: this is my first real game project. So I guess I shouldn't be too surprised when things go wrong.


True, but going wrong is as good as going right... you learn from mistakes as much as success :)

Hope it goes well
February 10, 2009 04:09 PM
Twisol
Thanks! Well, something went wrong - see the edit I made. :P
February 10, 2009 04:41 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement