ERP said:
I worked on an application recently that contained over 1500 source files, how many of those do you think ought to care about the underlying machine architecture. And if I'm doing cross platform development which architecture should they care about?
While I'm lucky and have only one platform to worry about, its something that makes me lose sleep on a regular basis ;-). We are currently 1000+ source files and will get alot bigger.
I'm currently considering the drastic option of splitting the code-base into sections.
A) High level, written in whatever pretty code will only ever run on a single main processor. Can be unefficient just as long as it works.
B) Old school code. More classic C code, less pointers and dynamics stuff, How well it will run is thought about for at least couple of seconds. Cache, DMA and synchronisation will have to be considered. Will run better but will require more experienced coders. Harder to mantain and write.
C) Performance code. Special code that understand its machine perfectly (possible a different language completely!) that is for experts only.
The problem we have is that on at least one next gen console, 80% of its performance can only by obtained by B and C (and B might be 10x slower than C...).
Do you want your game to have access to 1/5th the power of your competion that embraced the darkness?