Hello again.

Posted by shadowstrike32 on July 23, 2006, 6:20 p.m.

Well i doubt any of you noticed but I have been away for a while. I have been working really hard at understanding this C++ object oriented stuff. It really makes me miss game maker.

Besides the difficulties though, C++ defnately has some huge ass advantages over GML. Not like any of you didnt know that, but the power to declare your own variable types and have simple objects that arent prestuffed with variables is a huge benefit.

Defining a variable type:

<font face="courier" color="#0066CC">class vec_t {

public:

double d_x;

double d_y;

double d_z;

double d_direction;

vec_t();

vec_t(double x, double y, double z, double d_direction);

vec_t(vec_t &vec);

void operator+(vec_t &other); //adds two vectors…

void operator-(vec_t &other); //subtracts two vectors…

void operator=(vec_t &other); //allows two vecotrs to be equal…

double vecsum(void); //sums up the Xi, Yj, Zk of the vector and returns it

}</font>

And that is without all of the functional crap!

whats cool is that you can treat it as a variable type… for example:

<font face="courier" color="#0066CC">

vec_t new_vector(0,0,0,270);

vec_t another(0,0,20,180);

new_vector = new_vector + another;

</font>

kudos to you if you can understand that. It just goes into a header file, not a source file.

Anyway… what else to say… I have read that some of you have gotten into the habit of dumpster diving. As far as I know, it really isnt illegal as long as you dont get caught. I just skip the humiliation of being found in a dumpster and go search the landfill. There are some usefull things there, so long as you can get permission and the proer safety equipment.

Hmm what else… Oh yeah I just bought myself 2GB of memory, and a new 200GB secondary hard drive. All those episodes of Family Guy add up!

Heh i probably havent been missed :)

Comments

poultry 18 years, 4 months ago

That's SOOOOOO easy to understand..

<!–not–>

Kaz 18 years, 4 months ago

That sorta makes sense even though I havent used C++ in half a year,

melee-master 18 years, 4 months ago

I haven't made anything with C++ in a whole year now…

Firebird 18 years, 4 months ago

Where are the constructors and destructors?

I may have referred to them differently, but they are meant to be there.

On the other hand, it would work without them.

If I made a mistake, don't blame me XD.

shadowstrike32 18 years, 4 months ago

the 3 vec_t's are the polymorphic constructors