Skip to main content

large code projects, recomended books/ links?

  • Still a bit to go but finishing up the chico of the dead game, about a week left? event spent some time improving the quality of the first part of the game experence (added help)

  • well, took 5 hours to write my own morph plugin for max, but then took 2 days to change the pipeline, engine and animation for stream based morphing.
    and so the first thing to make was a shalug, half shark, half slug. what else is morphing…

  • First pass of the assets is almost done (evironemnt, some props, 3 player models and 5 zombies are done. one zombie and 3 small creatures left)
    Code is also getting done, minus the occasional task from hell such as 'rewrite collision system…

  • Started to implement game flow over the place holder assets, so have seen ingame cinematics and the simple scripting sequence work.
    Today finished one of the three player models, added frustum culling and linked up the missing bits for game…

  • Day 15 game dev, the zombie can now fight back which makes thing seem a bit more fair, also made it a lot tougher to kill the zombies.
    Title screen and starting a new game are done. now to make place holder art for the rest of the game.

  • Still working on iPhone, now have opengles2 support for my pipeline (shaders)
    finished up the goldfish project, and having a break from the cute stuff to do something violent, like shoot zombies.
    zombie is a performance test, though still…

  • Took a break from programming to do some artwork, and kind of happy with the result of an afternoon mucking about with normal maps. possibly should learn mudbox or zbrush, but found a workflow that suits me, even if i get to swear about polygon…

  • well, that is a way to spend my time.
    had another go at asset pipeline, using what i had learnt over the last few months and getting the information to the engine for the shaders, as well as preserving non shader rendering.

    excitement…

  • well, it is not so much that it is finished, it is more that i'm moving on and not working on it further.

    Nice to wrap something up, annoying the difference in quality of what you want to get done and what you can realistically get done.…

  • That took a bit longer than expected, but now have my own 3dstudio max exporter supporting biped, physique, scene graph, materials and animation. Also happen to have a win32/ iphone game engine that supports skinning.
    (morphing is mostly done…

Submitted by davidcoen on

just a quick style query~ don't have much of a background in software eng. so was wondering if there are some recomendations on resources to help teach how to manage large code systems. (book recomendations?)

noticed what i am working on is up to 74files of code, and have just been doing the headers like

//===
#ifndef GEOM_H
#define GEOM_H
typedef class geombase GeomBase;
typedef class geometry Geometry;
typedef class geomskin GeomSkin;

#include "pos.h"
.
. // includes for all the types in the classes bellow
.
#include "dynamic_manager.h"

class geombase{
Collision *p_col;
.
. // class reference follows
.
};

#endif
//======= end file

doing (typedef)(includes)(class def) seems to work ok, but when i want external objects inside the class/struct in the header, having big probles with linking to try and get it to work (have a bit too much couplling of my data structs i guess, but for example, geometry objects have a possition object, and wanted pos objects to have a pointer to a geom object (geom has heirachy info) and with all the linking, can eventually get it to work, but add another embeded object to another class or change header order and this method seems to fall down real quick?

is there a better way? or just decrease code couplling....

Submitted by Jacana on Wed, 26/11/03 - 5:53 PMPermalink

I was told Code Complete is a good Software Eng book :) I have ordered it but have not got it in yet. It was written by an MS guy.

Precompiled headers would save you from having to include your classes all over the place - instead you could just do it in one place!

Submitted by Zaph on Wed, 26/11/03 - 7:38 PMPermalink

quote:Originally posted by Jacana

I was told Code Complete is a good Software Eng book :) I have ordered it but have not got it in yet. It was written by an MS guy.

"Code Complete" should be required reading for all developers!
http://www.stevemcconnell.com/

"Writing Solid Code" is another great book to read
http://www.microsoft.com/mspress/uk/books/book108.htm
but I thought there was meant to be a newer edition than that one (1994)

Submitted by CombatWombat on Thu, 27/11/03 - 12:13 AMPermalink

quote:Originally posted by davidcoen

doing (typedef)(includes)(class def) seems to work ok, but when i want external objects inside the class/struct in the header, having big probles with linking to try and get it to work (have a bit too much couplling of my data structs i guess, but for example, geometry objects have a possition object, and wanted pos objects to have a pointer to a geom object (geom has heirachy info) and with all the linking, can eventually get it to work, but add another embeded object to another class or change header order and this method seems to fall down real quick?

is there a better way? or just decrease code couplling....

Hi david, it's been 5 yrs or so since I read "Large-scale C++ Software Design" by Lakos, but I seem to remember that this was quite relevant to this topic. I don't remember any particular rocket-science in the book (but I'd also make this comment about most of the C++ books out there anyway) but definately worth a read.

Just a quick piece of terminology before I jargon myself to death below - "typedef class geombase GeomBase" is known as a forward declaration of geombase. I'd usually skip the step of doing the typedef - and just forward declare my classes with "class GeomBase;" - this has the advantage that you don't need to know what class actually implements GeomBase in your other headers.

A couple of rules I use:

* When designing a class, prefer data members that are pointers or references where it's clean to do so (you'll only need the forward declaration if you do this)
* Only inline very basic functions in your class declaration that don't require you to bring in extra header files
* Every include file should fulfil its own needs for definitions (eg if it needs the full declartion of FooClass from foo.hxx then ensure that the include file includes foo.hxx) - you should get a clean compile if you passed the header through a compiler by itself

This breaks down a bit with using the STL (one of the hassles with C++ and large-scale development is how you're not able to forward declare templated classes) - so you just have to pull the STL headers in rather than foward declaring them.

Just another quick note on terminology - linking is the step where you grab the output object files from the compiler and roll them into an executable file. When you're saying problems with linking most programmers will understand this as problems with undefined symbols, but I think you're only talking about compilation problems here.

I agree precompiled headers are useful, but you do limit your portability, and lose some of your ability to break the source code up into modules. Where these things aren't important to you, precompiled headers are your friends :)

Cheers,

Mark/CW

PS the mod's I'd suggest to your code:

[code]
//===
#ifndef GEOM_H
#define GEOM_H

class GeomBase;
class Geometry;
class GeomSkin;
class Collision;

#include "pos.h"
.
. // includes for all the types in the classes bellow
.
#include "dynamic_manager.h"

class GeomBase{
Collision *p_col;
.
. // class reference follows
.
};

#endif
[/code]

Submitted by davidcoen on Thu, 27/11/03 - 8:49 PMPermalink

Thankyou for the recomandations, will have to case up those books, now to get back to finishing the particle system :)

Submitted by Kezza on Wed, 17/12/03 - 8:01 AMPermalink

quote:Originally posted by Jacana

I was told Code Complete is a good Software Eng book :) I have ordered it but have not got it in yet. It was written by an MS guy.

Precompiled headers would save you from having to include your classes all over the place - instead you could just do it in one place!

a software eng book written by an ms guy... i can't imagine how that would be a good thing.

also watch out for precompiled headers, they often get kidna big... and can force your compiler over the stack limit (easy to fix but annoying).

Submitted by davidcoen on Thu, 18/12/03 - 11:48 AMPermalink

actually 'code complete' is quite good (and evil, reading a code style book halfway through a big project is not a good idea)

just spent the last 10 hours implementing my IK system. note to self, when getting bored, implement small fun stuff, have been giggling to myself as the person drops to the ground in a large cloud of dust (also added objects being able to release particles when being collided with) at least that is working

also just purchased a copy of 'visual C++.net' and lost quite a bit of time reformating computer and finding the build setting i need to get it not rebuild the entire project on each change (hmmn, nortan anti virus can get upset when you start playing hatchet in the registry)

Posted by davidcoen on

just a quick style query~ don't have much of a background in software eng. so was wondering if there are some recomendations on resources to help teach how to manage large code systems. (book recomendations?)

noticed what i am working on is up to 74files of code, and have just been doing the headers like

//===
#ifndef GEOM_H
#define GEOM_H
typedef class geombase GeomBase;
typedef class geometry Geometry;
typedef class geomskin GeomSkin;

#include "pos.h"
.
. // includes for all the types in the classes bellow
.
#include "dynamic_manager.h"

class geombase{
Collision *p_col;
.
. // class reference follows
.
};

#endif
//======= end file

doing (typedef)(includes)(class def) seems to work ok, but when i want external objects inside the class/struct in the header, having big probles with linking to try and get it to work (have a bit too much couplling of my data structs i guess, but for example, geometry objects have a possition object, and wanted pos objects to have a pointer to a geom object (geom has heirachy info) and with all the linking, can eventually get it to work, but add another embeded object to another class or change header order and this method seems to fall down real quick?

is there a better way? or just decrease code couplling....


Submitted by Jacana on Wed, 26/11/03 - 5:53 PMPermalink

I was told Code Complete is a good Software Eng book :) I have ordered it but have not got it in yet. It was written by an MS guy.

Precompiled headers would save you from having to include your classes all over the place - instead you could just do it in one place!

Submitted by Zaph on Wed, 26/11/03 - 7:38 PMPermalink

quote:Originally posted by Jacana

I was told Code Complete is a good Software Eng book :) I have ordered it but have not got it in yet. It was written by an MS guy.

"Code Complete" should be required reading for all developers!
http://www.stevemcconnell.com/

"Writing Solid Code" is another great book to read
http://www.microsoft.com/mspress/uk/books/book108.htm
but I thought there was meant to be a newer edition than that one (1994)

Submitted by CombatWombat on Thu, 27/11/03 - 12:13 AMPermalink

quote:Originally posted by davidcoen

doing (typedef)(includes)(class def) seems to work ok, but when i want external objects inside the class/struct in the header, having big probles with linking to try and get it to work (have a bit too much couplling of my data structs i guess, but for example, geometry objects have a possition object, and wanted pos objects to have a pointer to a geom object (geom has heirachy info) and with all the linking, can eventually get it to work, but add another embeded object to another class or change header order and this method seems to fall down real quick?

is there a better way? or just decrease code couplling....

Hi david, it's been 5 yrs or so since I read "Large-scale C++ Software Design" by Lakos, but I seem to remember that this was quite relevant to this topic. I don't remember any particular rocket-science in the book (but I'd also make this comment about most of the C++ books out there anyway) but definately worth a read.

Just a quick piece of terminology before I jargon myself to death below - "typedef class geombase GeomBase" is known as a forward declaration of geombase. I'd usually skip the step of doing the typedef - and just forward declare my classes with "class GeomBase;" - this has the advantage that you don't need to know what class actually implements GeomBase in your other headers.

A couple of rules I use:

* When designing a class, prefer data members that are pointers or references where it's clean to do so (you'll only need the forward declaration if you do this)
* Only inline very basic functions in your class declaration that don't require you to bring in extra header files
* Every include file should fulfil its own needs for definitions (eg if it needs the full declartion of FooClass from foo.hxx then ensure that the include file includes foo.hxx) - you should get a clean compile if you passed the header through a compiler by itself

This breaks down a bit with using the STL (one of the hassles with C++ and large-scale development is how you're not able to forward declare templated classes) - so you just have to pull the STL headers in rather than foward declaring them.

Just another quick note on terminology - linking is the step where you grab the output object files from the compiler and roll them into an executable file. When you're saying problems with linking most programmers will understand this as problems with undefined symbols, but I think you're only talking about compilation problems here.

I agree precompiled headers are useful, but you do limit your portability, and lose some of your ability to break the source code up into modules. Where these things aren't important to you, precompiled headers are your friends :)

Cheers,

Mark/CW

PS the mod's I'd suggest to your code:

[code]
//===
#ifndef GEOM_H
#define GEOM_H

class GeomBase;
class Geometry;
class GeomSkin;
class Collision;

#include "pos.h"
.
. // includes for all the types in the classes bellow
.
#include "dynamic_manager.h"

class GeomBase{
Collision *p_col;
.
. // class reference follows
.
};

#endif
[/code]

Submitted by davidcoen on Thu, 27/11/03 - 8:49 PMPermalink

Thankyou for the recomandations, will have to case up those books, now to get back to finishing the particle system :)

Submitted by Kezza on Wed, 17/12/03 - 8:01 AMPermalink

quote:Originally posted by Jacana

I was told Code Complete is a good Software Eng book :) I have ordered it but have not got it in yet. It was written by an MS guy.

Precompiled headers would save you from having to include your classes all over the place - instead you could just do it in one place!

a software eng book written by an ms guy... i can't imagine how that would be a good thing.

also watch out for precompiled headers, they often get kidna big... and can force your compiler over the stack limit (easy to fix but annoying).

Submitted by davidcoen on Thu, 18/12/03 - 11:48 AMPermalink

actually 'code complete' is quite good (and evil, reading a code style book halfway through a big project is not a good idea)

just spent the last 10 hours implementing my IK system. note to self, when getting bored, implement small fun stuff, have been giggling to myself as the person drops to the ground in a large cloud of dust (also added objects being able to release particles when being collided with) at least that is working

also just purchased a copy of 'visual C++.net' and lost quite a bit of time reformating computer and finding the build setting i need to get it not rebuild the entire project on each change (hmmn, nortan anti virus can get upset when you start playing hatchet in the registry)