Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The Mylibs examples are not intended to be do everything kinds of systems, its mainly a collection of all the general functions and utility classes we built up in the successive 2D projects which allows you then to contain them all in one static lib and avoid repeating files and classes.

You should really put the library in a standard usr dir on your target. I currently let it use a VGDB dir in the tmp dir, so it needs rebuilding as it will be cleared each reset of the target.

In development of the book, while making projects I included the Mylibs project in my game solutions. With hindsight this was not a great idea, as the library developed over the course of 3 or 4 games. So it contains much more than you probably need in the 1st few games, and some of the code you can see in there, is not discussed in the 1st few games that use it.  But it stands as a good example of how to make a user lib, which you can base your games on and add to as you build further games.

I removed the Mylibs Project from the solution files of games that use it, leaving you to either add it yourself as a project in the solution or more sensibly to build the Mylibs.a and include the directory in your project properties, remember also to include the header directories for it to use the library.

I don't use a lib in the 3D games, so that users can see the common concepts and build their own 3D lib for a series of games if they want to. Also A lot of that 3D code really needs to be optimized so I would not commit it to a library until that was done.
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 


Forum Jump:

Users browsing this thread: 1 Guest(s)