Rune Central

The Official Rune Quake Message Board
It is currently Mon Dec 23, 2024 7:12 pm

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Size of Prog.dat
PostPosted: Thu Nov 06, 2003 8:08 pm 
Offline
QUIT: March 06, 2006

Joined: Sat Mar 08, 2003 11:55 am
Posts: 231
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: Size of Prog.dat
PostPosted: Thu Nov 06, 2003 9:02 pm 
Offline
Site Admin
User avatar

Joined: Fri Mar 07, 2003 7:41 pm
Posts: 1258
Location: New Jersey, USA
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.

_________________
Slot Zero
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Nov 06, 2003 10:52 pm 
Offline
QUIT: March 06, 2006

Joined: Sat Mar 08, 2003 11:55 am
Posts: 231
Thanks. I'm actually keeping each 3 versions back as I move forward if that makes any sense.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Nov 07, 2003 12:46 am 
Offline
QUIT: March 06, 2006

Joined: Sat Mar 08, 2003 11:55 am
Posts: 231
Does anyone run a prog smaller then .58MB?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Nov 07, 2003 3:56 am 
Offline
deadzone.runecentral.com
User avatar

Joined: Sat Mar 08, 2003 5:27 am
Posts: 102
Location: Ontario, Canada
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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Nov 07, 2003 10:42 am 
Offline
User avatar

Joined: Tue Mar 11, 2003 5:43 pm
Posts: 239
Location: North Carolina
I always use "frikqcc /O2 -allownest" and I get a dat size of 617 KB

frikqcc -warn 2 /O2 -allownest


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Nov 07, 2003 12:19 pm 
Offline
QUIT: March 06, 2006

Joined: Sat Mar 08, 2003 11:55 am
Posts: 231
Looks like I have not accomplished much with my delete key. :(

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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Nov 07, 2003 12:20 pm 
Offline
User avatar

Joined: Tue Mar 11, 2003 5:43 pm
Posts: 239
Location: North Carolina
I don't think it's a really big deal as long as you have a nice server.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Nov 07, 2003 1:29 pm 
Offline
QUIT: March 06, 2006

Joined: Sat Mar 08, 2003 11:55 am
Posts: 231
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group