hate hate hate classes

Started by
12 comments, last by Silex 20 years, 2 months ago
quote:that seems like a situation without a perfect or "clean" solution.. except maybe changing the whole design to something that avoids this kind of situation.
Exactly ! It`s a design problem. Therefore you need to redesign it. It sucks, I know. I`ve spent last 4 days redesigning the classes in my engine so that I don`t have to supply 10 parameters(pointers) to each function. It`s just design fault. But believe me, you have to clean it, because sooner or later, your class .cpp file shall have about 5000 lines and compiling it each time shall cause you a grief, so you`ll have to clean it.
And you know what ? It`s much easier to read such clean code now, bugs are easier to find, because they are clearly in separate files, not in one file (as is the case when you have 2 classes in one header/cpp file).


VladR
Avenger 3D game

VladR My 3rd person action RPG on GreenLight: http://steamcommunity.com/sharedfiles/filedetails/?id=92951596

Advertisement
yes, to get a clean solution you should start over and take a few months to design. If you run into this problem, you have to rethink your class layout and find another way (usually a much harder way) to accomplish the same task.

___________________
-Nicholas Anton
-raptor85.siigna.net
Hey there Sunray,
Thanks for taking an interest in my compile times

Luckily,i''m mostly playing with scripting and putting together the gameplay of my game now.

I gave up reading articles and books on the best way to do something a while ago,and tried it my own way,and have ended up with an engine with everything i need(for now at least)to be able to make my game move forward.

Note,that i said ''something like this'',not my engine is exactly like this.It may not be the best way,but all the features i needed or was missing from other engines i searched for to make my game,my engine has those features,and they work well.

Level editor,Facial animation,realtime self-shadowing shadows,trigger system,collision detection,fully embedded python scripting,physics,decent fog,lighting,weather sytem,many formats for actors/audio,video as texture,and much more that i wanted in an engine that i ahd bought.Now i don''t neeed to pay a big fee to use one,because i have my own

So i''m happy
I think if i didn''t do it my own way,i''d still be reading those articles and books,without anything to show for it still,and be spending too much time hovering around forums on the net,i only do that now mostly when i''m bored

Hope you work out your problem with classes.

Paul.
quote:Original post by Sunray
paul8262: Sounds like you dont care about compile times..

[edited by - sunray on January 26, 2004 6:29:06 AM]


I was about to say the same thing :D



--
Dave Mikesell Software

This topic is closed to new replies.

Advertisement