Wednesday, September 19, 2007

A Slight Tangent

I mentioned that if I find something interesting or get a request, I would write an article or tutorial about it. Well the latter has happened, kinda. I often spent time in the C/C++ forums at 3DBuzz.com. Ostamo2, a fellow member, recently brought up a tutorial I started a few years back.

This tutorial covered packaged files, that is collecting a number of files and packaging them into one. I only covered bitmap files but I plan to fix this by re-writing it.

The idea is to use Visual Studio 2005 C++ Express Edition to create an easy to uses package system. This means a GUI packager and class for uses in other programs. I'm still working on which file that will be supported files to be viewable in the Packager. Bitmaps and Obj files as I've done them before.

If anyone has any request for file types or know of any easy to use libraries for file support, please let me know in the comments.

I'm current working on designing and creating a decent package class, and hope to have console based tutorial up in the not to distance future, but it might take a while to finish the final program.

thing2k

Monday, September 10, 2007

Project Focus

As I said as few posts back I was unsure of exactly where I'm heading with this project. Well I've spent sometime thinking about what I want to do and why.

The why overall is pretty straight forward, experience. Also I want to know how things work, how it fits together. The what, is a bit more complex. The plan of attack is to create a Real-Time 3D Graphics Engine. I use Graphics Engine instead of Game Engine as, I hope, it to be flexible enough to work in many situation, including Games and Level Editors. Once the base engine is set up then I might branch it to different genres.

Here are the main features:
  • Graphics Interface independent of API
  • Graphical User Interface Framework
  • Scene/Object Management
  • Collision Detection System
  • Rigid Body Dynamic System
  • Scripting Language
I know the above is still not that specific, but it a start and a direction. The more I work at it the clearing it should become.

As I said previously, I'm starting with a toolbox, a number of common used classes and function that can be used throughout this project. I know I could create these utilities as I went along, but I want a good firm oundation to build upon. Thats why I'm starting with the maths Section.

thing2k

Thursday, September 06, 2007

Toolbox Design

I'm spent the last few days deciding on where to start, I said the toolbox would be first but the question remaining, was which part. The maths system seem the obvious choice, as a number of other systems will rely on them.

The vector class, now this should be relatively straight forward, a class that holds 4 floats, x, y, z and w. Throw in a couple of functions and operators and your done.

Now wait right there, as this class will be used often through out this project, such a gun'ho attitude just won't cut it. A small mistake here would lead to countless error further down the line. So as I plan to treat this project professionally, I'll be designing each class, in reasonable detail, before any coding. Actually I plan to design each system before I start coding.

What this means is sitting down with pen and paper, quite a bit of paper, and thinking about how the system is going to work. The main parts to consider are:
  • The classes and the what they will represent
  • The public, private and protected properties
  • Testing Methods
  • How they interact
  • Just about anything else
When finished, it time to type it up nice and neat, clear and concise.

For the maths section there will be, initially, 3 objects, a vector, a matrix and a quaternion, and these will be represented by the classes cVector, cMatrix and cQuat. Also there will be a number of helper functions, for things like creating a rotation matrix.

Also I say initially as the project progresses there may be a need to come back and add more to this system. Maybe some more helper functions, some slight changes to the classes or even add a new class that I didn't consider before.

For the most part this advise applies for any system, and I'll go through the same routine for each system of the toolbox, and beyond.


thing2k