Sign in to follow this  
JasonBradley

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

Recommended Posts

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.

Share this post


Link to post
Share on other sites
[quote name='jctjct3' timestamp='1317859227' post='4869603']
Here's a link to my solution : [url="http://dl.dropbox.com/u/40043006/TerraCraft%20Stuff/TerraCraft%20Help1.zip"]http://dl.dropbox.co...aft%20Help1.zip[/url]
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.
[/quote]

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.

Share this post


Link to post
Share on other sites
[quote name='jctjct3' timestamp='1317859227' post='4869603']
Here's a link to my solution : [url="http://dl.dropbox.com/u/40043006/TerraCraft%20Stuff/TerraCraft%20Help1.zip"]http://dl.dropbox.co...aft%20Help1.zip[/url]
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.
[/quote]

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this