Original Post
hello, i would just like to give my opinion and ask everyone elses opinion on something iv'e just sorta realized. first off i've been coding in c++ for only about 3 years and before that 3 years in qbasic, and some in pascal. after the first 2 years learning c++ i became completly obsessed with coding everything object oriented, maybe it's my obsessive compulsive over organizing self but everything i did, i had to do it the OO way. just recently i picked up the book "game programming all in one: SE", although when i first opened it up it seemed a little under my level, as i have already coded the basics like pong, pacmac, breakout, a mario clone, etc. but it 'teaches' the allegro library which i have never used and even though now i'm trying to get a project up in irrlicht i realized i have never made a full 2d game, with all the bells and whistles. so being the person i am, i start from page 1 and do everything (regardless how trivial it is sometimes), and made a seocnd discovery, the code is all in C. which means that there will be no OOP. well i just continued on and realized something ... OOP ruined progamming for me, and ruined making games. i remember in qbasic it wasnt a chore to make games, but when i started c++ and trying to do everything OOP it was a chore. for the time i spend trying to code an OO game framework i forget why i am even making a game, i forget why i started progamming in the first place. for instance say i'm making pong, now if i wanted to do it the OOP way maybe i'd do something along these lines. class CPaddle { private: int position; int speed; int color; public: CPaddle(); void move(); // ... blah blah }; class CBall { private: int x; int y; // blah blah }; now if i did this the 'procedural' way i would do this: struct { int position; int speed; int color; } paddle[2]; // i only need 2 paddles. struct { int x; int y; int speedx; int speedy; int color; } ball; // i only need 1 ball void movePaddle(int index) { paddle[index].position += paddle[index].speed; if (paddle[index].position >= // blah } actually i dont even see the point to have the ball a struct, i only have 1 ball, other than organization its pointless to have the ball a struct at all. this brings me to another point ... the singleton class, what's the point, i admit i am a little ignorant on this particular subject, but why make a class with only 1 instance? it would seem to me it would be a hell of a lot easier to just have some global functions and pass things around through the parameters. why even bother with the encapsulation? if i label my variables well im not going to mix them up. i understand that yes some things are way easier and more practical the OOP way (container objects, obiviously everything in the STL is OOP) and how many games are programed OO compared to procedural ... seems to me ID software still uses C (people have said carmack uses 'hacks' etc to get the code to work, and that its messy ... but why does it matter? the game works, i can play it, it doesnt crash, probably runs faster too) but really what's the big deal with OOP anyways, other than the code looking all nice and pretty what does the progammer gain? what does the actual program (game) gain? is it so wrong to mix OOP with 'classic' procedural programming? maybe it's that i mix the wrong levels of abstration (which i've been told), maybe i'm just not that good progarmming OO. but to me, coding OO took a longer time, it seemed like a chore, and ultimatly was more difficult and less rewarding than if i'd just done it the old fashioned way. thanks for taking the time to read this, and please post some feedback. thanks DISCLAIMER: and no flame wars :)