I know, I know, it is a bit late for writing this post, but it is something I wanted to do since long time ago. It is a project I worked with a classmate during the university, not for fun but for passing an exam. The project took me about one year, basically for these reasons: 1. my university didn’t teach me C++, but Java, C++ was required only for this exam, so we had to learn it from scratch and in a rush, 2. obviously I was not working on that full time, I had other exams to prepare, 3. the professor forced us to work in teams of 2-3 people, so we had to synchronise our work on that with our own exams, 4. there was a small test during the course on the theory behind all of this, so I had also to prepare that, 5. anyway you had to learn OpenGL as well, and QT.

The project was open, meaning that you had to bring  game with an editor for levels, whatever you want, an original game or any clone, but you had to bring the code and discuss it, besides the professor wanted to validate the project step by step, so you had to show him intermediate versions, and he was proposing changes. Funny fact: the year after I passed this exam the university changed the professor and the exam became a multiple choice test that people were preparing in one week.

Given the background, let’s speak about the project. I store it on GitHub. I had a nice diary/blog on a website long time ago, but it has been removed from the server were I was hosting it, so I have lost it. I think it was 2002 or 2003. The project was made with Visual Studio, it still has lot of files related the VS project structure.
As you can see, the project (a bit chaotic, to be honest… lot of best practice of work were not defined at that time) has two main directories: PangPlayer contains the code of the game, PangEditor the code of the editor. Again, at that point English was not mandatory at the university, and code should not follow the rules of being self-explanatory so the code is full of comments (in Italian… sorry).
There are also 3 other important directories: common contains some common classes, like the BMF_Font class, an opensource library I found somewhere to import and use Bitmap fonts in an opengl context, a class with some static values called definition.h, some geometries in Geometrie and a class for using the BMF_Font called Scrittore.
The second important directory is the scenegraph, the engine of our game. There you can find all the objects that can take part of the game, and the n-ary tree for the drawing of the objects.
The third important directory is the vcg, it is a library written by the research group in the CNR of Pisa in which my professor belongs. It is just a bunch of geometrical formulas that we would have never been able to write, so he was providing them to us. It contains normal geometry, but also trackball formulas and things a bit more dodgy to let the students write by themselves.

For those who don’t know Pang you can check on wikipedia. I had also another page in which I was advertising the project: I removed it but it is still in the webmachine at this link. It is in Italian, but at the bottom of the Greetings section there are links to the different libraries I used for the project. Unfortunately I cannot remember the version of the library I was using (I had the feeling that QT was version 4, in the webmachine the current version was 4.1.2, OpenGL was version 1, I am almost sure).
It was a very nice project to work on, and even if right now it looks like it was not really well engineered, I have learnt lot from that. Maybe one day I will take the code and I will try to refactor and recreate it again. Or maybe not…

Stay tuned!

Share