"Game programming all in one"

Started by
12 comments, last by TheDentist 20 years, 11 months ago
I have the game programming all in one book, and it is the biggest waste of trees in the world. that book is the most shittiest, convoluted "game engine" in the world. there are much easier ways of going about things, and the author avoids this and goes around his ass to get to his thumb. my advice to you:

Read the book to see how other people do it, and then throw it away.

----------------------
i code therefore i am.

Aero DX - Coming to a bored Monitor near you!
----------------------i code therefore i am.Aero DX - Coming to a bored Monitor near you!
Advertisement
quote:Original post by Yann L
VC6 scopes the ''int i'' not into the for block (as specified by the standard), but into the block being one hierarchy up. Resulting in a double declaration of the same variable name, which is incorrect behaviour.


Its a nasty one, and caught me out a couple of times. I now put:

#define for if(true) for

to get proper scoping. Shocked me when i put that in and broke some code - someone had actually relied on the buggy behaviour to make a function work o_O

quote:Original post by OrangyTang
#define for if(true) for

Correct me if I'm wrong, but doesn't this "fix" correct one error while creating another?

The "correct" behavior is

for(int i=0;; );//i can be accessed here//< code code code >//to herefor(int i=0;; );  //i is a totally new variable//new i can be accessed here to the end of this function  


So it would be equivelant to
{int i; //for(int i=0;; );


}
{int i;//for(int i=0;; );


}//end of the function

[edited by - dede on May 5, 2003 5:54:28 PM]
~~~~~Screaming Statue Software. | OpenGL FontLibWhy does Data talk to the computer? Surely he's Wi-Fi enabled... - phaseburn
If you wnat a Compiler, and you go to College, My opinion if you buy a compiler, get the Student edition, depending on where you go, you can get a Good discount on the Visual Editions.


NeFrUgLe
-- NeFrUgLe

This topic is closed to new replies.

Advertisement