Trying to re-organize my game but now I've run into inheritance issues.

Started by
2 comments, last by JasonBradley 12 years, 6 months ago
Here's a link to my solution : http://dl.dropbox.com/u/40043006/TerraCraft%20Stuff/TerraCraft%20Help1.zip
I'm trying to reorganize my code because previously I had all of the code for everything in a single game class. This is the first time I've done this so I don't really know what I'm doing, but I'm trying to learn by looking at the way other games have done it. If someone could just show my how to get it to draw the head of the character on the screen and then explain how to fix it that would be very helpful. I don't understand how inheritance of methods and other things having to do with inheritance work.
Advertisement

Here's a link to my solution : http://dl.dropbox.co...aft%20Help1.zip
I'm trying to reorganize my code because previously I had all of the code for everything in a single game class. This is the first time I've done this so I don't really know what I'm doing, but I'm trying to learn by looking at the way other games have done it. If someone could just show my how to get it to draw the head of the character on the screen and then explain how to fix it that would be very helpful. I don't understand how inheritance of methods and other things having to do with inheritance work.


Back up a bit. First very few people here are going to download your code a sift through it, myself included. Then answer these questions the best you can..

1: Was your game working fine before trying to organize it?

2: What did you change to the code?

3: Does your code compile? If not what errors does the compiler give you?

4: If your game does compile, What happens or doesn't happen. What exactly is the problem you're getting.
[ dev journal ]
[ current projects' videos ]
[ Zolo Project ]
I'm not mean, I just like to get to the point.

Here's a link to my solution : http://dl.dropbox.co...aft%20Help1.zip
I'm trying to reorganize my code because previously I had all of the code for everything in a single game class. This is the first time I've done this so I don't really know what I'm doing, but I'm trying to learn by looking at the way other games have done it. If someone could just show my how to get it to draw the head of the character on the screen and then explain how to fix it that would be very helpful. I don't understand how inheritance of methods and other things having to do with inheritance work.


I'm not sure what the issue is, but my first suggestion is that you shouldn't use inheritance until you learn more about it! Do you have any books on C++? Have you read through any tutorials? Inheritance is extremely important to understand if you will be using C++ for any length of time, so try to dive into the topic.

With that said, if you give a deeper description of the problem I am sure we can help steer you along the right path.
I'm using the XNA 4.0 API and as such this game is coded in C#. The whole point of re-organizing this game is to learn how to use inheritance, you've got to start somewhere. As for the issues I was having, they are no more, but regardless, thanks for both of your time.

This topic is closed to new replies.

Advertisement