|
||||||
| General Programming Non language specific, Assembly, Linux/Unix, Mac and anything not covered in other topics. Talk about Programming Theory here. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||||
|
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/
|
| Sponsored Links |
|
|
|
|||
|
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.
__________________
Code:
glBegin(GL_TRIANGLES);
drawWorld();
glEnd();
|
| Sponsored Links |
|
|
|
|||||
|
The code should be as efficient as possible, though, especially when writing games.
|
|
|||
|
Quote:
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.
__________________
Code:
glBegin(GL_TRIANGLES);
drawWorld();
glEnd();
|
|
|||||
|
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...
|
|
|||||
|
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.
|
| Sponsored Links |
|
|
![]() |
| Tags |
| coding, style |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Turning Conventional Video Coding Wisdom On Its Head | Kernel | Programming News | 0 | 05-22-2008 07:18 AM |
| How to change the standard windows console style ? | kresh7 | Computer Software/OS | 7 | 11-10-2007 01:12 PM |
| How to style fonts of a text in a simple page? | c0de | Tutorials | 3 | 09-15-2007 10:08 PM |
| How long have you been coding php? | cpvr | PHP Forum | 11 | 07-11-2006 12:41 PM |
| More Coding Methods | RobSoftware | General Programming | 2 | 05-30-2006 04:42 PM |
| Xav | ........ | 1322.18 |
| MeTh0Dz|Reb0rn | ........ | 1053.7 |
| morefood2001 | ........ | 879.43 |
| John | ........ | 877.37 |
| marwex89 | ........ | 869.98 |
| WingedPanther | ........ | 830.24 |
| Brandon W | ........ | 735.07 |
| chili5 | ........ | 309.39 |
| Steve.L | ........ | 239.84 |
| dcs | ........ | 216.02 |
Goal: 100,000 Posts
Complete: 82%