Good day, my name is Paul (under protest), I am a self taught video game programmer, you can check out my latest project at store7697404[DOT]ecwid[DOT]com. This project recently grew to over 50,000 lines of code, however, it does not use a single class that I have written. As a matter of fact, I have not ever written a single class in my entire life, nor do I plan on ever writing one.
Although my project is 50,000+ lines of code, it has a startup time of about one to two seconds on my low-end laptop. All the functions are written in a single .cpp file. This very large and complex code structure is very easy to manage and maintain, because I am able to collapse the functions to their definitions. It does not seem necessary to add any classes, and I think the functions and data structures for custom data types is really an object oriented approach to programming. It seems to me that it is silly to use classes, as well as causing more pain than gain. I am not sure if anyone will agree with me. I have come to these conclusions through trial and error, and by trying to use a class someone else had written with terrible results.
The main problems I had with using a class was trying to follow the flow of the program's logic through multiple files. This was hard to do. Another problem was dealing with variable scope, but that is another discussion.
(You may also check out my game by searching "simcube game" on google.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Good day, my name is Paul (under protest), I am a self taught video game programmer, you can check out my latest project at store7697404[DOT]ecwid[DOT]com. This project recently grew to over 50,000 lines of code, however, it does not use a single class that I have written. As a matter of fact, I have not ever written a single class in my entire life, nor do I plan on ever writing one.
Although my project is 50,000+ lines of code, it has a startup time of about one to two seconds on my low-end laptop. All the functions are written in a single .cpp file. This very large and complex code structure is very easy to manage and maintain, because I am able to collapse the functions to their definitions. It does not seem necessary to add any classes, and I think the functions and data structures for custom data types is really an object oriented approach to programming. It seems to me that it is silly to use classes, as well as causing more pain than gain. I am not sure if anyone will agree with me. I have come to these conclusions through trial and error, and by trying to use a class someone else had written with terrible results.
The main problems I had with using a class was trying to follow the flow of the program's logic through multiple files. This was hard to do. Another problem was dealing with variable scope, but that is another discussion.
(You may also check out my game by searching "simcube game" on google.)