What coding style do you follow? It is good to follow a certain standard for better coding experience. See here : http://techarraz.com/2008/06/08/tren...-coding-style/
God is real... unless declared an integermy blog :: http://techarraz.com/
coding shud be done nicely
only
Last edited by WingedPanther; 06-09-2008 at 08:48 AM. Reason: delete spam links
Agreed. I wanted a response, not an echo!
God is real... unless declared an integermy blog :: http://techarraz.com/
It doesn't matter as long as anyone you work with agrees on a common standard. I'd also follow any language specific conventions. I hate camel case but will use it in places it is expected such as Java.
I think more important is keeping your design sane by refactoring it to resist design rot in any case.
I think this might be on the wrong thread but I disagree strongly here. It's been proven nearly the point where its a law of nature that about 3% of our code accounts for 95% of our run time. Even if you reduce the overhead of the other 97% to zero you are only saving 5% of your resources.
The best approach is to produce the absolute simplest design possible and keep code cohesive and decoupled. This wrecks performance but makes optimisation easy. The worse thing you will ever have to do is try and optimise a code base that has been 'optimised' already. It makes real advancement extremely difficult. Premature optimisation really is the root of all evil. That said games development is well understood and they know exactly which sections will need the most efficiency.
I disagree again - optimisation is crucial when writing games. In the rare times I have tried writing them using XNA with C#, my system slows to a crawl, with frame rates of around 1fps. And why? Because I had not optimised my code, and I was declaring a variable too many times. Once I had optimised, the frame rates climbed. From a book I have been reading, in the author's example, he wrote a game for Xbox 360. It was running at about 100fps. He did a couple of simple optimisations (like making a variable instantiated less often) and the frame rate soared to over 3000fps! Optimisation is very, VERY important in games.
Xav, G_morgan was talking about 'premature optimization'. That means someting else than what you are debating on. And yes, optimization is important, but you should focus on the completion of the project first. An incomplete code is impossible to optimize. And may I know the name of the game your author wrote cz, Xbox games are made by companies, not individuals! And there work is divived, so the optimization team has to be seperate than the framebuffer management team..or whatever it is called...
God is real... unless declared an integermy blog :: http://techarraz.com/
And, whether you do it your way or following a standard depends of what type of a coder you are. If you are making school projects, which you are Xav, I think individual style works, but in a team you have to follow a standard. This is the standard widely followed.
God is real... unless declared an integermy blog :: http://techarraz.com/
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks