Skip to main content
GameDev.net gamedev.net
🔒 Locked

Game components

Started by NDraskovic Mar 7, 2011 at 10:17 AM 1 replies 3.7k views
Original Post
NDraskovic
NDraskovic
Hey

I'm having a problem with adding game component. In previous chapter I ignored the FPS component (I was more interested in creating graphics then counting frames), but I see that this chapter is all about game components so I tried to add the FPS component. I added the necessary code into the game component class and the Game1 class, but it keeps showing me the error "The type or namespace FPS could not be found ". I tried to fix this by writing the code myself (again), importing the game component from the code provided by mentor(s), even copying the code into my component part by part, and I get the same error every time.

Please advise
Michael_B
Michael_B
If you follow the book then the FPS component lives in the "XELibrary" namespace in the "XELibrary - x86" game library. You need to reference the game library ("Add Reference" in your current project) and a using statement in order to use it.
Phlipp
Phlipp
So, should we be breaking classes into components as we build our games? It seems you coul take almost any general purpose class and treat it as a componnt for other programs you build down the line. Is this a correct assumption?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.