Can someone test my game library?

Started by
7 comments, last by JackOfAllTrades 13 years, 2 months ago
I have been working on a video game library and I have basic functionality working though it still has a few small bugs I need to fix. Anyway I would like to know if others can get it working on their machines. You will need either Windows Vista or 7 and a video card that supports DirectX 10. You will also need Microsoft Visual Studio 2010 to compile the sample project.

You can download a pre-built exe installer or zip from my website or you can download the source code from the google code SVN repo here: [font="monospace"]https://ovgl.googlecode.com/svn/trunk/[/font]
[font="monospace"] [/font]
[font="monospace"]I would very much like to know if anyone is able to get it working and also if anyone wants to take a look at the source code and give me some constructive criticism that would be more than welcome! Also I'm interested to know how much my fellow game developers would be interested in such a library?[/font]
Advertisement

I have been working on a video game library and I have basic functionality working though it still has a few small bugs I need to fix. Anyway I would like to know if others can get it working on their machines. You will need either Windows Vista or 7 and a video card that supports DirectX 10. You will also need Microsoft Visual Studio 2010 to compile the sample project.

You can download a pre-built exe installer or zip from my website or you can download the source code from the google code SVN repo here: [font="monospace"]https://ovgl.googlecode.com/svn/trunk/[/font]
[font="monospace"] [/font]
[font="monospace"]I would very much like to know if anyone is able to get it working and also if anyone wants to take a look at the source code and give me some constructive criticism that would be more than welcome! Also I'm interested to know how much my fellow game developers would be interested in such a library?[/font]
You might want to consider writing a small tutorial to get people up to speed with it. Also, your Matrix44 class uses unions in an unsafe way; you might want to fix that.
Instead of a C-style union between a struct and an array of floats, you could instead implement operator[]. Also, you should provide constructors for your classes. For example:


class __declspec(dllexport) Vector4
{
public:
// vector components
float x, y, z, w;

// default constructor
Vector4(void)
{
}

// componentwise constructor
Vector4(float x, float y, float z, float w)
: x(x), y(y), z(z), w(w)
{
}

// index operator
float operator[](size_t index)
{
return (&x)[index];
}

// ...
};


My example might not be a particularly good implementation, but it gives the general idea... :)

(The matrix case is a bit harder unless you implement it as four Vector members instead of a bunch of individual scalars.)

Instead of a C-style union between a struct and an array of floats, you could instead implement operator[]. Also, you should provide constructors for your classes. For example:


class __declspec(dllexport) Vector4
{
public:
// vector components
float x, y, z, w;

// default constructor
Vector4(void)
{
}

// componentwise constructor
Vector4(float x, float y, float z, float w)
: x(x), y(y), z(z), w(w)
{
}

// index operator
float operator[](size_t index)
{
return (&x)[index];
}

// ...
};


My example might not be a particularly good implementation, but it gives the general idea... :)

(The matrix case is a bit harder unless you implement it as four Vector members instead of a bunch of individual scalars.)


Using an operator works fine for reading the data as an array but I also need to write to it as an array.
Can I join this project? ;o
They hated on Jeezus, so you think I give a f***?!

Can I join this project? ;o


Yes, if you actually are interested I will gladly welcome the help.smile.gif

PM me your google email and I will add you to the project.
I've still not found an alternative to using unions?

Using an operator works fine for reading the data as an array but I also need to write to it as an array.


Try using float& (ie return a reference to the item) and you can assign to that.

[quote name='SteveDeFacto' timestamp='1298829846' post='4779736']
Using an operator works fine for reading the data as an array but I also need to write to it as an array.


Try using float& (ie return a reference to the item) and you can assign to that.
[/quote]

Ah, yes! Now it works beautifully! I definitely have to say that this not only is the right way to do it but it is also the best way! Now I can directly access the elements of the vectors/matrices without even needing to go though the data array!

This topic is closed to new replies.

Advertisement