Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hello, everyone
Right now I'm working with C++ and SDL in order to create games. I just have an issue which comes up when my project starts getting more complex, I think to myself "My code sucks, I think if I'd start over and did this or that it would be better". But it never does...I mean, to code a task, any task, there are lots and lots of ways, I mean, there are so many options!
For instance, I want to create a framebuffer for SDL but I have no idea if I should use OOP, or if I should use separate functions, or if I should combine both, or if, or if, or if...
So, my question is: How can I tell if my code is good and that I should stick with it instead of writing it all over again?
I don't expect a "You should do this" kind of answer, because I am aware this could be kind of a tough question, but please do answer based on your programming experience and please do try to give me some sort of guidelines so that I get any actual game (or something) done.Thank you in advance and best regards
~DeimosAMD ATHLON X2 5200+ 2.6GHz
ASUS GeForce 8600GTS
ASUS M2N-E SLI MB
2xKingston 1GB DDR2 800

The best way to test your code is to give it to someone else to look at.
If they can understand it and work out what the code is supposed to be doing then it is good. If they cant understand it and have to constantly ask why you did this or this doesn't make sense then you need to do a re-think.
Stuart

Thanks for your reply, lets assume that I have no one to show my code to. What should I do in that case?
AMD ATHLON X2 5200+ 2.6GHz
ASUS GeForce 8600GTS
ASUS M2N-E SLI MB
2xKingston 1GB DDR2 800

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |