Rune Central
http://forums.runecentral.com/

Size of Prog.dat
http://forums.runecentral.com/viewtopic.php?f=2&t=289
Page 1 of 1

Author:  Diazoild [ Thu Nov 06, 2003 8:08 pm ]
Post subject:  Size of Prog.dat

I've been going through the code deleting stuff like a madman (except credits) :P . For example, alternative settings, any mention of runes or weapons that I don't intend to use. My thought was that reducing the size of the prog might make the game run smoother (less lines of code=better?).

It is a fact that reducing the number of entities in the game helps reduce lag, but can reducing the size or number of files that the compiler reads affect gameplay? Or the size of the prog.dat?

Author:  Slot Zero [ Thu Nov 06, 2003 9:02 pm ]
Post subject:  Re: Size of Prog.dat

Diazoild wrote:
[...] can reducing the size or number of files that the compiler reads affect gameplay? Or the size of the prog.dat?


The progs.dat is loaded into memory every time the level changes. The smaller the size, the less memory. The number of files doesn't really matter to the compiler because the compiler just reads each file and creates (compiles) all of them into one file, the progs.dat. I doubt will you notice any difference by removing unused code from the mod, it isn't until you change the structure of the code, for example; calling functions that are quicker than other functions first and reducing the number of redundant calls to the same function, especially ones like find(), that you will start to see an improvement.

In any case, it couldn't hurt. Unless you remove something you might like to have back. :D In that case, comment out your code instead or removing it.

Author:  Diazoild [ Thu Nov 06, 2003 10:52 pm ]
Post subject: 

Thanks. I'm actually keeping each 3 versions back as I move forward if that makes any sense.

Author:  Diazoild [ Fri Nov 07, 2003 12:46 am ]
Post subject: 

Does anyone run a prog smaller then .58MB?

Author:  Painkiller [ Fri Nov 07, 2003 3:56 am ]
Post subject: 

Diazoild wrote:
Does anyone run a prog smaller then .58MB?


The compiled code for Deadzone is 556K in size. Which compiler are you using and what switches have you enabled? For example, if you're using "frikqcc" or "qccx", adding the /o2 switch will optimize the code and scrunch it down pretty good.

Another thing you may want to try is to compile with the -warn 2 switch enabled. Doing so will produce a list of unused variables and function calls that go nowhere. (See the error.log the compiler creates). It's best if you can get compiler warnings as low as possible with the optimum being zero.

Example: "frikqcc -warn 2 /o2".

---
PK

Author:  IEEE 802.11 [ Fri Nov 07, 2003 10:42 am ]
Post subject: 

I always use "frikqcc /O2 -allownest" and I get a dat size of 617 KB

frikqcc -warn 2 /O2 -allownest

Author:  Diazoild [ Fri Nov 07, 2003 12:19 pm ]
Post subject: 

Looks like I have not accomplished much with my delete key. :(

I'll look into the switches when I get home.

Author:  IEEE 802.11 [ Fri Nov 07, 2003 12:20 pm ]
Post subject: 

I don't think it's a really big deal as long as you have a nice server.

Author:  Diazoild [ Fri Nov 07, 2003 1:29 pm ]
Post subject: 

I was hoping it might make a slight difference like having less entities. Limiting the number of traps and not giving people the ability to go back and pick up the rune they dropped "seems" to help people that use dial connections.

Also, there's the old thought that less lines of code is cleaner or better, but perhaps it just doesn't matter because as Slot pointed out the compiler just ignore items that you don't have turned on.

I'll probably continue just for the hell of it. Since I'm not able to actually code new things right now, I'm learning a little by deleting stuff and then seeing if the mod will still function.

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/