View previous topic :: View next topic |
Author |
Message |
reckless
Joined: 24 Jan 2008 Posts: 390 Location: inside tha debugger
|
Posted: Sun Oct 26, 2008 4:08 am Post subject: |
|
|
true well it was in his original but aye joequakes is better and also its C as opposed to C++.
ill look at ez maybe i can get a hint from it what to do ty for the suggestion
btw since peeps are asking
cvars for bloom r_bloom
cvars for overbrights gl_doublebright
cvars for skyspeed r_skyspeed
in time ill put them in the menu
first i want to get it stable  |
|
Back to top |
|
 |
reckless
Joined: 24 Jan 2008 Posts: 390 Location: inside tha debugger
|
Posted: Sun Oct 26, 2008 9:00 am Post subject: |
|
|
one thing thats bugging the hell out of me is on some mods like after the fall i get a bad ptr error in Mod_LoadAliasFrame
Code: | void *Mod_LoadAliasFrame (void *pin, maliasframedesc_t *frame)
{
int i;
trivertx_t *pinframe;
daliasframe_t *pdaliasframe;
pdaliasframe = (daliasframe_t *)pin;
// Check frame is inside file buffer after the fall fails brutally here :(
Mod_ChkFileSize ("Mod_LoadAliasFrame", "frame", (byte *)pdaliasframe - mod_base, sizeof(daliasframe_t));
// bad ptr. error in after the fall here unable to fix sorry.
strlcpy_s(frame->name, pdaliasframe->name);
frame->firstpose = posenum;
frame->numposes = 1;
for (i = 0; i < 3; i++)
{
// these are byte values, so we don't have to worry about endianness.
frame->bboxmin[i] = pdaliasframe->bboxmin.v[i] * pheader->scale[i] + pheader->scale_origin[i];
frame->bboxmax[i] = pdaliasframe->bboxmax.v[i] * pheader->scale[i] + pheader->scale_origin[i];
}
frame->radius = Mod_RadiusFromBounds (frame->bboxmin, frame->bboxmax);
pinframe = (trivertx_t *)(pdaliasframe + 1);
// Check trivertex is inside file buffer.
Mod_ChkFileSize ("Mod_LoadAliasFrame", "trivertex", (byte *)pinframe - mod_base, sizeof(trivertx_t));
if (posenum >= MAXALIASFRAMES)
{
Con_SafePrintf ("\002%s: ", "Mod_LoadAliasFrame");
Con_Printf ("Mod_LoadAliasFrame: invalid # of frames (%d, max = %d) in %s", posenum, MAXALIASFRAMES, loadmodel->name);
}
poseverts[posenum] = pinframe;
posenum++;
pinframe += pheader->numverts;
return (void *)pinframe;
} |
it didnt do that originally alltho it crashed on null models the bug was in refrags and the fix i applied there works on other mods not on this tho  |
|
Back to top |
|
 |
reckless
Joined: 24 Jan 2008 Posts: 390 Location: inside tha debugger
|
Posted: Mon Oct 27, 2008 2:33 pm Post subject: |
|
|
whoops skip that i found it !!!
another reason to do away with quakes bloated memory managment
it was a heap error a fatal one even.
so now everything that is big fugly and nasty gets allocated on windows own heap and is cleared on every mapload that includes sounds visdata entities light stains textures models do i need to go on ? etc.
even the largest map in the world cant get it to crash anymore i made sure of that. |
|
Back to top |
|
 |
Baker

Joined: 14 Mar 2006 Posts: 1538
|
Posted: Mon Oct 27, 2008 3:22 pm Post subject: |
|
|
I don't claim to know a great deal about how it works because I haven't taken the time to walk through the code (although I did a cursory look-over of the code) but ezQuake 1.9.2 added "DarkPlaces memory manager".
I don't know if the feature is active in ezQuake 1.9.2 or if the binaries were compiled without it, but when I compared the ezQuake 1.8.3 source with the ezQuake 1.9.2 source, the changes to implement this feature are very easy.
My understanding of how the DarkPlaces memory manager works is that it allocates memory as needed, eliminating entirely the need for -mem xx or -heapsize xxxxx in the command line.
I have gamedir switching, video mode switching in the menu and I'd really like the kill any need for adding a memory command line parameter.
Anyway ... since maybe about 18 months ago, ezQuake's code has becoming outstanding from the perspective of "quality control" and I really enjoy checking in on the changes they've made. DarkPlaces has morphed too far from the original source for me to easily follow the highly evolved code, although soon I'm going to start looking harder at more DarkPlaces enhancements.
Anyway, in the ezQuake 1.9.2 source code, just search for #ifdef WITH_DP_MEM and #ifndef WITH_DP_MEM and you can see the changes. If I recall, there are only 7 changes to the code to implement this.
Source code link:
http://sourceforge.net/project/showfiles.php?group_id=117445&package_id=130270
Add: Although this is in the source, it does not appear to be an active feature in the binaries. I don't know whether this is because it hasn't been tested enough, still in testing or if it doesn't work right. |
|
Back to top |
|
 |
reckless
Joined: 24 Jan 2008 Posts: 390 Location: inside tha debugger
|
Posted: Tue Oct 28, 2008 6:38 am Post subject: |
|
|
yep allready had a look at it
well i came up with my own version funnier to make one myself
so far its proven its worth i can load stuff the size of titanic without a problem
and it clears everything again on map load
so memory wise im in the clear now.
only problem left atm sds crashes on the initial video rest plays fine.
and malice crashes when you try to use the hoverboard.
not sure what is causing it since it crashes directly to desktop with no warning i cant even hook the debugger up to catch the bugger "fatal i suspect" only once i managed to get some info weirdly enough it seems to be mh's vertex arrays O_o throwing an exception.
would be nice if he had a look at the changes i made the engine i started all this from newer left alpha it has come far he might want to suggest a few things or even help in developing it
unfortunatly i dont know his wherabouts atm so hees kinda hard to get in touch with  |
|
Back to top |
|
 |
reckless
Joined: 24 Jan 2008 Posts: 390 Location: inside tha debugger
|
Posted: Sat Nov 01, 2008 1:32 am Post subject: |
|
|
very near a release now added bloom control to menu and switched unzip.c and unzip.h out against newer versions "the one i used was rather old and had some serious memory leaks as i found out
its pretty stable now loads marcher fortress directly no need for heapsize anymore with the new memory system.
bastion of the underworld is a lost cause on this engine unfortunatly
i found the bug its mh's volume carving code. unfortunatly i cannot easily do away with it since most of this engine relies on it for getting the correct "approximatly" surfs for stuff like fog caustics etc.
and actually its not a bug in his code but more a bsp tool problem since the surf it catches has invalid verts .
well everything else i could throw at it runs "ofc not including mods with special engine requirements scripts md3's etc"
the purpose with it was a good standard glquake with enhanced looks it doesnt have md3 skeletal models scripting or anything fancy but a rock solid wm code "aquire's actually" and much better memory handling.
other updates: done away with the entire caching system.
models and sound now correctly unloads at map end.
done away with some leftover autowater trans code "had leaf checking on but wasnt used this engine still needs vissed maps for translucent water"
finished pk3 code its now rock solid
found out how to scale the sky so now the clouds are actually visible not like a blur.
malice looks awsome on this puppy
after the fall also
try it with the same texturepack darkplaces uses it can load the external normalmaps from it, gives it quite a nice look tbh
plagues mdl modelpack gives you some nicer looking weapons
and if anyones interrested i got some special monster skins modified from ogro's so they dont look like crap on engines that dont have bumpmapping on alias models.
this is probably the largest project i have worked on rewriting allmost 70% of the code still a lot of todo's like nehahra support.
compilation is now only supported with msvc 2005 older versions have proven to be quite unhappy about some libraries it needs so i took the liberty of removing msvc6 project files.
will upload later tomorrow still a few things i want to try out before i release it  |
|
Back to top |
|
 |
|