Hi, I'm currently trying to build my own 3d game engine and have been using this book as a great resource. At Uni I took computer games programming and while walking away with a 2:2 in my degree, I feel like I don't know enough to have companies hire me. That's why I wanted to make a game engine and really set about learning as many different aspects as I can and then hopefully in future, make a game in the engine.
Straight out of uni I spent time making an XNA game for XBLIG and while that did get on the marketplace it didn't make me any money.
So enough back story, here is my problem:
I'm looking at having an Actor that has multiple components rather than the inheriting system that I have used in my past games. For this I have been following the code that starts on page 161. Most of it seems straight forward except I am getting some errors with it in Visual Studio 2010.
It's all to do with the StrongActorPtr and StrongActorComponentPtr. I have these declared in ActorFactory.h like this:
typedef std::shared_ptr<Actor> StrongActorPtr;
typedef std::shared_ptr<ActorComponent> StrongActorComponentPtr;
I had to include the std to remove errors so I am not sure if I am on the right track with that.
Visual studio is giving me the error of:
Error 33 error C2065: 'Actor' : undeclared identifier ActorFactory.h 14
In relation to:
typedef std::shared_ptr<Actor> StrongActorPtr;
My Actor.h file is included along with <memory>
From this there are many other undiclared identifiers and I believe it is all stemming from these shared_ptr's.
Another problem is the use of ComponentId in the code. I assumed that it was an unsigned long like ActorId?
I'm hoping someone will be able to point me in the right direction with this.
Straight out of uni I spent time making an XNA game for XBLIG and while that did get on the marketplace it didn't make me any money.
So enough back story, here is my problem:
I'm looking at having an Actor that has multiple components rather than the inheriting system that I have used in my past games. For this I have been following the code that starts on page 161. Most of it seems straight forward except I am getting some errors with it in Visual Studio 2010.
It's all to do with the StrongActorPtr and StrongActorComponentPtr. I have these declared in ActorFactory.h like this:
typedef std::shared_ptr<Actor> StrongActorPtr;
typedef std::shared_ptr<ActorComponent> StrongActorComponentPtr;
I had to include the std to remove errors so I am not sure if I am on the right track with that.
Visual studio is giving me the error of:
Error 33 error C2065: 'Actor' : undeclared identifier ActorFactory.h 14
In relation to:
typedef std::shared_ptr<Actor> StrongActorPtr;
My Actor.h file is included along with <memory>
From this there are many other undiclared identifiers and I believe it is all stemming from these shared_ptr's.
Another problem is the use of ComponentId in the code. I assumed that it was an unsigned long like ActorId?
I'm hoping someone will be able to point me in the right direction with this.