Single folder source vs. foldered
Moderator: InsideQC Admins
20 posts
• Page 2 of 2 • 1, 2
Feared wrote:Spike wrote:A single file means you get better optimisations/inlining... Means you're not endlessly compiling windows.h over and over again... Ensures your prototypes _always_ match your functions...
Can't complain!
Yeah but when the file takes a bit to just load, damn that's a problem. This is not healthy programming, either.
Chuck Norris facts:
Chuck Norris rewrote Windows alone. In one single C file.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
qbism wrote:Forget folders, Berserker Q2 puts the code in one FILE. A single file for the engine code, and a single file for the game code. Set up some bookmarks in VC++ and experience a certain freedom.
That is just a horrible coding practice though!
Personally, I like organization, and folders.
http://red.planetarena.org - Alien Arena and the CRX engine
- Irritant
- Posts: 250
- Joined: Mon May 19, 2008 2:54 pm
- Location: Maryland
Irritant wrote:qbism wrote:Forget folders, Berserker Q2 puts the code in one FILE. A single file for the engine code, and a single file for the game code. Set up some bookmarks in VC++ and experience a certain freedom.
That is just a horrible coding practice though!
Personally, I like organization, and folders.
Good man. He know's what's up.
-

Feared - Posts: 95
- Joined: Fri Jun 11, 2010 11:58 pm
- Location: Wylie, TX
mh wrote:I used to write code like that...
...in 1989 when I was learning COBOL!!!
When I was starting out with C, I would put everything in one huge file, and even collapse many statements into single lines, thinking that it would somehow compile or run faster... (incidentally this was not 1989, but 1998, though all I had anyway was Turbo C++ 1.0 and some books from 1989)
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
- Sajt
- Posts: 1215
- Joined: Sat Oct 16, 2004 3:39 am
Using a single folder is better; organizing the Makaqu source into multiple folders taught me that.
And something else I've learned from practice is that it's much better to hierarchize by form than by function. So, instead of having files named like r_part.c and d_part.c, name them like part_r.c and part_d.c. Organizing it like that makes it easier to abstract and modularize the features of the engine, because stuff like particle code, MDL code or BSP code does the same thing, only in different ways.
And something else I've learned from practice is that it's much better to hierarchize by form than by function. So, instead of having files named like r_part.c and d_part.c, name them like part_r.c and part_d.c. Organizing it like that makes it easier to abstract and modularize the features of the engine, because stuff like particle code, MDL code or BSP code does the same thing, only in different ways.
-

mankrip - Posts: 915
- Joined: Fri Jul 04, 2008 3:02 am
20 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest