Creating MY OWN library

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Creating MY OWN library

      Hello everyone, i have decided that i would like to create my own library of functions that i use often....

      Problem is... I dont know where to start to accomplish such a task.. like I already have an idea of what i want in it.. Do you think i should just make one Giant of a header files.. or just a group of related header files that i include in every project... arrrgh!
      Bakka mitai!!!
    • You could create your own .lib files.

      As for grouping, that depends on exactly what you want to include. You should probably have seperate libs for entities such as math, geometry, graphics, sound, and so on.

      For a specific library, say maths, you could create seperate headers for vector2, vector3, matrix4, etc, and then create an overall math header that includes all the others, e.g.

      C Source Code

      1. // MATH_Package.h
      2. #include "MATH_Vector2.h"
      3. #include "MATH_Vector3.h"
      4. #include "MATH_Matrix3.h"
      5. #include "MATH_Matrix4.h"


      That allows the user to decide whether to include the whole math library or just specific parts of it.
      pan narrans

      The post was edited 1 time, last by pan narrans ().

    • RE: Creating MY OWN library

      I'm in the process of writing a game demo too. Since I'm writing it for the PC, I'm using C++ and taking an OOP approach. I feel it will allow me to expand as the project gets larger. This paradigm seems to be getting quite popular for PC game development lately. Most source I've seen for big projects like UT and the like have used it. Not to mention all of mike's examples =) Right now, most of my classes wrap dx9 functions but want to get it to the point where I can get GL calls in there as well. OOP allows you to do this pretty well I've found. So for PC you might want to consider classes instead of bare function libs for your project.

      Whereas, most of the source I've seen on PS2 is in pure C with tons of custom includes. They seem to be writing a lot of their own functions and libs to wrap system calls and define registers. I guess there's not a lot between you and the hardware in that case. Also, performance is a major issue. So, if that's the case with you as well then might want to take the C procedural route.

      After that decision then, its a matter of details. I hope that's what you're asking ya?

      btw, saw your post on Soul Calibur 2. I have also just recently bought the game and am also in the middle of an addiction-attack =)

      PS: nani ga baka mitai n desu ka?

      cheers