Skip to main content
GameDev.net gamedev.net
🔒 Locked

A week without compile.

Started by Wavewash Sep 4, 2003 at 10:40 PM 19 replies 900+ views
Original Post
Wavewash
Wavewash
I remember I read a long time ago reading somewhere that since most games take 4+ hours to compile. Compiles are only done every other day. So I came here and asked Kiwidog (who at the time was working on unreal 2) how he handled this. I remember he said "You get used to it". Here I am again, looking at how it is to work without testing the code your working on and I''m thinking I won''t beable to make it if I can''t see my code run. So I''m thinking maybe I mistook the information from long ago. Maybe programmers have like little test beds they use to test their sun flare code and such instead of buildnig the entire game. Can anyone shed some light? ~Wave
Tron3k
Tron3k
I think the four-hour thing is for a FULL rebuild. If you just want to test a sun-flare you would just have to re-compile one file and relink the whole thing.
“[The clergy] believe that any portion of power confided to me, will be exerted in opposition to their schemes. And they believe rightly: for I have sworn upon the altar of God, eternal hostility against every form of tyranny over the mind of man” - Thomas Jefferson
DukeAtreides076
DukeAtreides076
I suppose it could take that long to recompile the whole thing. It wouldnt normally take that long though, because most likely there are parts you already have compiled and haven''t beeen changed.
Wavewash
Wavewash
I''d assume that there''d be parts that be already compiled, But how does testing go about for the code a person is working on? Is it in little test apps?

~Wave
Tron3k
Tron3k
Maybe it has to do with all the source files being shuffled over the network to the compiling machine or something? Or, then again, Warcraft 3 might be 36 times larger than Raduprv''s game, making it take about 3 hours
“[The clergy] believe that any portion of power confided to me, will be exerted in opposition to their schemes. And they believe rightly: for I have sworn upon the altar of God, eternal hostility against every form of tyranny over the mind of man” - Thomas Jefferson
Cold_Steel
Cold_Steel
Yeah, I test all of my modules in little test apps, or some testing framework. I might just test out one class or test out a couple of classes interacting with each other to make sure things work. You know that if it doesn''t work in the simple test cases, it won''t work in the main program. I''m no professional, that''s just how I do things.
______"Man is born free, and everywhere he is in chains" - J.J. Rousseau
DukeAtreides076
DukeAtreides076
quote:
Original post by Raduprv
That''s BS!
Maybe on old machines, or crappy compilers. My game (both the client and server together) take like 5 minutes to rebuild, at most.
And this is on an Athlon 750, 256 RAM, using gcc.



Yeah, back when I was working with the Half-Life SDK, it took less than 1 or 2 minutes to rebuild the whole thing.
Wavewash
Wavewash
quote:
Original post by Tron3k
Maybe it has to do with all the source files being shuffled over the network to the compiling machine or something? Or, then again, Warcraft 3 might be 36 times larger than Raduprv''s game, making it take about 3 hours


I think that might be the case because I remember reading Black and White taking 3-4 hours.

~Wave
outRider
outRider
Full rebuilds are usually done at night (so you better make sure anything you change will compile and link before you go so that the rebuild doesn''t choke because of a change in one small source). The idea is to try and make everything as data driven as possible, stick what you can in data files so you don''t have to rebuild (usually constants and initial values). Also, facilities that let you edit values while the code is running are helpful (Quake consoles). For testing code obviously you only recompile the immediate source and relink. Even then most companies have their tried and tested code in libs to take advantage of the fact that they''re not altered too often.

------------
- outRider -
ChaoticCanuck
ChaoticCanuck
I could see that kind of slow compile times if you were building from scratch each time and you were compiling off of a network drive, but in every development cycle I have worked on the code is split up into clearly defined modules. Each module is completed one step at a time, and you only need to recompile a module if you have to change something later on.

Try building an OS from sources if you want to see a real work out for a compiler. I always feel like I am working the dark arts when I update my source tree and recompile the kernel in FreeBSD Especially when I play around with -O3. Haven''t had many issues this time around.

Raduprv: does that build time apply when you rebuild all sources?
amish1234
amish1234
quote:
Original post by Raduprv
That''s BS!
Maybe on old machines, or crappy compilers. My game (both the client and server together) take like 5 minutes to rebuild, at most.
And this is on an Athlon 750, 256 RAM, using gcc.



OMG, I don''t know what I should say to that. Anyway, how much time it takes to build depends on the size of your program. My brother, who is working on SQL server at microsoft, has to wait 9 hours for a build to complete using a dedicated build lab, not your Athlon 750. And I''ll admit that I''m not sure of this one, but Visual C++.NET probably builds faster than GCC does.

Hopefully most of your code changes won''t be made to a header file that is used in every CPP, because that''s when it will take hours to build (if your project is really big).
___________________________________________________________Where to find the intensity (Updated Dec 28, 2004)Member of UBAAG (Unban aftermath Association of Gamedev)
Programmer One
Programmer One
quote:
Original post by Raduprv
My game (both the client and server together) take like 5 minutes to rebuild, at most.
And this is on an Athlon 750, 256 RAM, using gcc.


This is probably due to the fact that your game didn''t run in an excess of 200,000 lines of code.
monkeyman
monkeyman
The architecture I''ve developed for our Hyperpipe engine uses a system of core and high level plugins that run on top of the main executable..

Most products we develop can be completely created in a high level dll that runs everything else, so even a final build for a delivery can be done in just a few minutes..

We generally try to abstract all new functionality into low level dlls that can be used for other purposes, and once these are built, they never have to be re-compiled unless a change is actually required..

All interfaces between dlls are designed to be backwards compatible, so when there is a change to any one sub-system, none of the other ones have to be altered..

Unit tests on individual plugins can be done pretty easily, alot of the time I''ll write an intermediate "driver" plugin to test new stuff as it is created..

Doing a complete rebuild of all components of any of our products would most likely take a few hours, but fortunately we''ve never had to do it that way..

"Like all good things, it starts with a monkey.."
"Like all good things, it starts with a monkey.."
sSimontis
sSimontis
It depends on a few things. If you keep another PC near you for thisa purpose, it works well. And, if you write code that works well, it shouldn''t take long. IMHO, it doesn''t really matter. If you have a second computer, like I do, nothing is bad. But on old machines it hurts. For example, on my 180MHz laptop with 24MB RAM.

Scott Simontis
e-mail:ageofscott@comcast.net
AIM:ssimontis
Scott SimontisMy political blog
Dark Rain
Dark Rain
The way your headers are handled influence compile times a lot too. I remember reading a book written by the lead programmer of Age of Empire I and he mentionned that a full build took a very long time (can''t remember how long) and that consolidating the header cut down compile time tremendously.
Rainniar
Rainniar
Well full rebuilds it really depends on what machine and how many lines of code, for about 850,000 lines and a 1.0ghz machine it takes about 45 to 90 minutes. Now with Incredbuild that time is about 3-5 minutes. For people who don''t know, Incredibuild uses available systems on a LAN for compiling power. It r0x!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.