Inside3D!
     

is the max progs.dat size 1mb?

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
necros



Joined: 16 Dec 2004
Posts: 22

PostPosted: Thu Oct 26, 2006 6:26 am    Post subject: is the max progs.dat size 1mb? Reply with quote

i can't seem to compile my progs anymore... sitting at 960k atm, with one qc file removed. replacing it causes the compiler to crash without any warnings. it doesn't matter which qc file is removed, any file (barring important ones like world.qc) when removed fixes the crash problem.

i'm guessing the progs.dat max size is 1024k? if so, i'm a sad panda.
Back to top
View user's profile Send private message
aguirRe



Joined: 17 Nov 2004
Posts: 4

PostPosted: Thu Oct 26, 2006 8:03 am    Post subject: Reply with quote

AFAIK, there's no such limit for the progs.dat, there *is* however a limit on 32k globals for normal engines. What compiler are you using?
Back to top
View user's profile Send private message Visit poster's website
leileilol



Joined: 15 Oct 2004
Posts: 1321

PostPosted: Thu Oct 26, 2006 3:44 pm    Post subject: Reply with quote

Yes.

I've hit the 1mb limit with Stalker back in 2001, the only way I could solve it was to cut out all the monsters. It did actually compile as 1mb even with the FrikQCC optimizations enabled, but I just get random unpredictable movetype crashes.
_________________
Back to top
View user's profile Send private message
necros



Joined: 16 Dec 2004
Posts: 22

PostPosted: Thu Oct 26, 2006 4:35 pm    Post subject: Reply with quote

rats! oh well, thanks cheapalert. i'll have to trim stuff and try to optimize as much as i can i guess. Mad
Back to top
View user's profile Send private message
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Fri Oct 27, 2006 2:38 am    Post subject: Reply with quote

The engine is limited to 32767 'numpr_globals' (quakeforge, darkplaces, fteqw have a 65535 limit). It is not an actual filesize limit.

However, all QC compilers have additional limits on the other variable counts. Most QC compilers should give info on how much of each type of data was generated compared to the limit for that type of data. Go purly by that information.
By the time these limits are reached, the mod is about 1mb. But it's not a file size limit. It's mearly a coincidence.


The biggest working progs.dat I've seen is 4.44mb.
This particular mod was compiled with fteqcc and fits into the 32k globals limit. The mod itself is a bots mod. The reason it's so huge is because it contains a lot of waypoints (each map has a function containing lots of function calls to set up the waypoints). The only reason it actually fits inside the 32k globals limit is because of a specialised hack in fteqcc to use floats instead of vectors which allows for much better reuse of constants.

But yeah, it's the QCC that limits the size the most.
FrikQCC, FTEQCC and QFCC all have optimisations to reuse temps.
QFCC actually wins slightly here, but is a real pain to install... FTEQCC compiles the 125k or so globals from hexen2 down to 10k. FrikQCC isn't as good, but still optimises enough for most mods (certainly to the 2mb mark).

The facination with measuring globals in qcc compilers is because that's the lowest limit imposed by the format. It's not the only limit, but file size is totally irrelevent other than the implied quantity of data you've got and which other limits you've exceeded.
Use FrikQCC or FTEQCC and use optimisations. Your mods will be able to be twice the size, at least.

Here's the output of a mod compiled with fteqcc.
63640 strofs (of 1000000)
389754 numstatements (of 524288)
1452 numfunctions (of 16384)
2536 numglobaldefs (of 32768)
904 numfielddefs (874 unique) (of 2048)
10656 numpr_globals (of 65536)
Writing progs.dat
3304274 TOTAL SIZE

As you can see, no limits were exceeded. :p
Filesize is no limit. It's the other bits. All of which can be increased by using a different QCC.
Unfortunatly many QCCs do not correctly check limits when they create new globals, functions or whatever, resulting in compiler crashes. Unfortunatly even frikqcc has this issue at about 32k globals.

So: Make sure you're using FrikQCC or FTEQCC.
Also: Make sure you're using optimisations (frikqcc needs -O2 on the commandline for this, fteqcc defaults to enabling certain capacity optimisations).

the numpr_globals is the only limit that cannot be changed by using a different QCC (anything else, you'll run out of memory first). Unfortunatly this is also the first limit which is usually encountered.
Why? self.model = "progs/blob.mdl"; <- that creates 1 temp and requires a constant to be defined somewhere. So that's 1 to 2 globals. Multiply that by however many statements in your progs, and voila, over 32767 temps+globals+constants, and a compiler crash or error. Which is why optimisations are so important with large mods.
_________________
What's a signature?
Back to top
View user's profile Send private message Visit poster's website
necros



Joined: 16 Dec 2004
Posts: 22

PostPosted: Fri Oct 27, 2006 9:20 pm    Post subject: :o Reply with quote

wow, thanks!! that info is very much appreciated! this is good news, since that means i'm not totally barred from continuing. I will be looking into different compilers and optimization options. cheers! ^_^
Back to top
View user's profile Send private message
Trinca



Joined: 03 Jun 2006
Posts: 20
Location: Lisbon - Portugal

PostPosted: Fri Oct 27, 2006 9:59 pm    Post subject: Reply with quote

Spike owns Smile he changed Parboil source to suport NNNN maps in a qwprogs.dat with fteqcc Wink if u guys want to ahve a look is here

http://trinca.no.sapo.pt/temp/src375.rar

compile 375 waypoints and dont give any errors the qwprogs.dat is 5 mb

cheers!!!

spike u rock Wink
_________________
http://trinca.no.sapo.pt
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Dr. Shadowborg
Inside3D Staff


Joined: 16 Oct 2004
Posts: 726

PostPosted: Sat Oct 28, 2006 3:41 pm    Post subject: Reply with quote

Heh, spike just convinced me to switch to fteqcc. I must say, It's very nice, though the gui frontend and compiler could use a little work. (a bug or two here and there relating to maximizing and restoring windows and reporting of line numbers where an error occured, as well as a better search / goto line function, and writing of an error.log file ala frikqcc.)
_________________
"Roboto suggests Plasma Bazooka."
Back to top
View user's profile Send private message
Lardarse



Joined: 05 Nov 2005
Posts: 243
Location: Bristol, UK

PostPosted: Sun Oct 29, 2006 10:56 am    Post subject: Reply with quote

Dr. Shadowborg wrote:
and writing of an error.log file ala frikqcc.

Code:
fteqcc >error.log
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2004 phpBB Group