• Advertisement

Archived

This topic is now archived and is closed to further replies.

good / bad programming practise

This topic is 5756 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I really dont like the way i''ve been coding my tetris game, i mean i''m gettin the logic to work but i still think i could have done things easier, which brings me to the question of programming practise, could somebody point me to a resource where i could see a list of definite no no''s in programing games and also a list of what i should be doing would help. I can never be sure that the example source that i have been exposed to is good programmin, so i have no idea what to model my personal style off. Or even better if you know the information off the top of your head, i would be grateful if you just wrote it down in this forum. Another thing i was wondering was the relevance of trying to program in C++ as opposed to C, i''ve always tried to be a C++ programmer but all the source i''ve been exposed is basically C or C-like, i figured maybe i could perfect my C first and then make the jump to C++ when i feel confident about Win GDI and directX, is that a good plan? Basically all i really want right now is for my code to work, but i dont want to develop bad habits or a dependency on C, so that i cant advance when the time comes, or maybe i''m dreading the advance too much, after all many programmers started C because that was the only thing before C++, i''m the type that wants to build from the ground up so that i can appreciate the new technology as opposed to trying the new technology just so that my games look cool, when i really dont know where its all coming from, get my drift "Jus chillin waiting for my time to shine" #define ALEX_DENNIS

Share this post


Link to post
Share on other sites
Advertisement
I''ve used C and C++ and if this is your first language (obviously other than C) after a few quick ideas have sunk in you may just find C++ to be a much more steady road than C. Just my opinion, no flames please.

-------------------------
Every servant has his place, no matter lowly or modest. To know it is his greatest comfort, to excel within his greatest solace, and his master''s contentment is his greatest reward.
-
Serve Microsoft today, tomorrow you may be dead.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by kordova
no flames please.


flame

Share this post


Link to post
Share on other sites
Since you are just starting out, don''t look at how good or bad your code is right now. Just write the game and get it working. Once you are done, step back and look at the code as a whole. Find the places that look ugly and say, next time I could do this better or that better. Then start your next game. Or if you don''t mind spending the time, re-write the Tetris game again with better coding habits. The only problem with re-writing it is that from the outside it will most probably look the same. Anyway, as long as you are programming, you are learning and once you have done a few programs, you can start picking at your code while you are writing it to keep it from getting to ugly. Just don''t spend much time over making it pretty if you don''t come up with the pretty solution right away. You could spend 8 hours trying to make something pretty, but spend half an hour writing it a little ugly. Be more productive early on, then fix the ugly spots later. With practise, you can spot the ugly code while you are writing it and fix on the fly.

---
Make it work.
Make it fast.

"Commmmpuuuuterrrr.." --Scotty Star Trek IV:The Voyage Home

Share this post


Link to post
Share on other sites

  • Advertisement