Forum

quake2xp weird bug

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

quake2xp weird bug

Postby revelator » Tue Nov 03, 2009 2:46 am

toying a bit with quake2xp looks pretty nice but im getting a weird
pink rectangle beneath me when looking down it dissapears if i crouch image here ->

Image

and the same if i crouch

Image

not sure what may cause this the engine is quite advanced with bumpmapping shadow volumes etc.

any ideas ?
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby r00k » Tue Nov 03, 2009 3:33 am

I get the same thing. but the square is always there
r00k
 
Posts: 1110
Joined: Sat Nov 13, 2004 10:39 pm

Postby revelator » Tue Nov 03, 2009 6:03 am

hmm odd i seen the same behaviour on a few older engines related to shell textures but newer on the player :?

kinda looks like a texture where the alpha chan got messed up.
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby mh » Tue Nov 03, 2009 9:05 pm

Does it go away if you turn off shadows? I've got this funny feeling that it looks like it might be a round shadow "blob" under the player.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby revelator » Tue Nov 03, 2009 11:52 pm

was my thought also but nope :(

the player model is completly missing btw i noticed in third person view. same goes for other players models only thing showing up is that pink blob :?
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby revelator » Wed Nov 04, 2009 7:35 pm

gah im kinda stuck on this one :evil:

compared to other engines and besides some small differences in the rendering code (normal map generation) i cant find anything wrong replacing them with the original only turns off bumpmapped models but the player models are still missing :shock:

maybe the bug is clientside ? the gamex86 dll is modified alltho it can run with the old one also but same bug if i run in compatibility damn...

weirdly enough first person view works unless i face down in which case the pink blob shows its ugly face.

kinda annoying made some fixes to its tga renderer (was suffering from texture corruption) updated it with some newer code that supports more standards.

btw ilu's tga code sucks like hell (cant handle the scaling) same for its pcx code i guess thats the reason the author left in the old pcx and tga functions. ilu only handles png jpg and dds sufficiently good.

also fixed win7 errors its quite stable now.
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby revelator » Fri Nov 06, 2009 9:57 am

bah yup the bug was clientside and in some code i didnt expect

heres the fix

Code: Select all
      // ***It's Me!!!!!!***//
      if (s1->number == cl.playernum + 1) {
         ent.flags |= RF_VIEWERMODEL;   // only draw from mirrors
         player_camera = true;         // set filter for power shells and
                                 // over
                                 // fixed player origin from EGL
         if ((cl_predict->value)   && !(cl.frame.playerstate.pmove.pm_flags & PMF_NO_PREDICTION)) {
            VectorCopy(cl.predicted_origin, ent.origin);
            VectorCopy(cl.predicted_origin, ent.oldorigin);
         }

         if (renderfx & RF_SHELL_RED) {
            V_AddLight(ent.origin, 200, 1.0, 0.5, 0.5);
         } else if (renderfx & RF_SHELL_BLUE) {
            V_AddLight(ent.origin, 200, 0.5, 0.5, 1.0);
         } else if (renderfx & RF_SHELL_GREEN) {
            V_AddLight(ent.origin, 200, 0.5, 1.0, 0.5);
         } else if (renderfx & RF_SHELL_GOD) {
            V_AddLight(ent.origin, 200, 0.8, 0.8, 0.8);
         } else if (renderfx & RF_SHELL_HALF_DAM) {
            V_AddLight(ent.origin, 200, 0.56, 0.59, 0.45);
         } else if (renderfx & RF_SHELL_DOUBLE) {
            V_AddLight(ent.origin, 200, 0.9, 0.7, 0.0);
         } else if (effects & EF_FLAG1) { // actually EF_FLAG3 <-
            if (effects & EF_FLAG2) {
               V_AddLight (ent.origin, 255, 0.1, 1.0, 0.1);
            } else {
               V_AddLight (ent.origin, 225, 1.0, 0.1, 0.1);
            }
         } else if (effects & EF_FLAG2) {
            V_AddLight(ent.origin, 225, 0.1, 0.1, 1.0);
         } else if (effects & EF_TAGTRAIL) {
            V_AddLight(ent.origin, 225, 1.0, 1.0, 0.0);
         } else if (effects & EF_TRACKERTRAIL) {
            V_AddLight(ent.origin, 225, -1.0, -1.0, -1.0);
         }

         // fix for third-person in demos also gets rid of the ugly pink blob and the missing player models go figure :S
         if (!(cl_thirdPerson->value && !(cl.attractloop && !(cl.cinematictime > 0 && cls.realtime - cl.cinematictime > 1000))) ) continue;
      }


and replace the other EF_FLAG1 with this

Code: Select all
 else if (effects & EF_FLAG1) { // actually EF_FLAG3 <-
            if (effects & EF_FLAG2) {
               V_AddLight (ent.origin, 255, 0.1, 1.0, 0.1);
            } else {
               V_AddLight (ent.origin, 225, 1.0, 0.1, 0.1);
            }
         }


now in the modelindex sections replace

ent.flags |= RF_VIEWERMODEL;

with

if (player_camera) {
ent.flags |= RF_VIEWERMODEL;
}

theres 2 in s1->modelindex2

good to go ;)

next one texture corruption on certain tga's replace the LoadTGA function with this ->

Code: Select all
/*
=========================================================

TARGA LOADING

=========================================================
*/

// Definitions for image types
#define TGA_Null      0   // no image data
#define TGA_Map         1   // Uncompressed, color-mapped images
#define TGA_RGB         2   // Uncompressed, RGB images
#define TGA_Mono      3   // Uncompressed, black and white images
#define TGA_RLEMap      9   // Runlength encoded color-mapped images
#define TGA_RLERGB      10   // Runlength encoded RGB images
#define TGA_RLEMono      11   // Compressed, black and white images
#define TGA_CompMap      32   // Compressed color-mapped data, using Huffman, Delta, and runlength encoding
#define TGA_CompMap4   33   // Compressed color-mapped data, using Huffman, Delta, and runlength encoding. 4-pass quadtree-type process
// Definitions for interleave flag
#define TGA_IL_None      0   // non-interleaved
#define TGA_IL_Two      1   // two-way (even/odd) interleaving
#define TGA_IL_Four      2   // four way interleaving
#define TGA_IL_Reserved   3   // reserved
// Definitions for origin flag
#define TGA_O_UPPER      0   // Origin in lower left-hand corner
#define TGA_O_LOWER      1   // Origin in upper left-hand corner
#define MAXCOLORS 16384

typedef struct _TargaHeader {
   unsigned char    id_length, colormap_type, image_type;
   unsigned short   colormap_index, colormap_length;
   unsigned char   colormap_size;
   unsigned short   x_origin, y_origin, width, height;
   unsigned char   pixel_size, attributes;
} TargaHeader;

/*
=============
LoadTGA
=============
*/
void LoadTGA(char *filename, byte **pic, int *width, int *height)
{
   int            w, h, x, y, i, temp1, temp2;
   int            realrow, truerow, baserow, size, interleave, origin;
   int            pixel_size, map_idx, mapped, rlencoded, RLE_count, RLE_flag;
   TargaHeader      header;
   byte         tmp[2], r, g, b, a, j, k, l;
   byte         *dst, *ColorMap, *data, *pdata;

   // load file
   FS_LoadFile( filename, &data );

   if( !data )   return;

   pdata = data;

   header.id_length = *pdata++;
   header.colormap_type = *pdata++;
   header.image_type = *pdata++;

   tmp[0] = pdata[0];
   tmp[1] = pdata[1];
   header.colormap_index = LittleShort( *((short *)tmp) );
   pdata+=2;
   tmp[0] = pdata[0];
   tmp[1] = pdata[1];
   header.colormap_length = LittleShort( *((short *)tmp) );
   pdata+=2;
   header.colormap_size = *pdata++;
   header.x_origin = LittleShort( *((short *)pdata) );
   pdata+=2;
   header.y_origin = LittleShort( *((short *)pdata) );
   pdata+=2;
   header.width = LittleShort( *((short *)pdata) );
   pdata+=2;
   header.height = LittleShort( *((short *)pdata) );
   pdata+=2;
   header.pixel_size = *pdata++;
   header.attributes = *pdata++;

   if( header.id_length )
      pdata += header.id_length;

   // validate TGA type
   switch( header.image_type ) {
     case TGA_Map:
     case TGA_RGB:
     case TGA_Mono:
     case TGA_RLEMap:
     case TGA_RLERGB:
     case TGA_RLEMono:
        break;
     default:
        VID_Error ( ERR_DROP, "R_LoadTGA: Only type 1 (map), 2 (RGB), 3 (mono), 9 (RLEmap), 10 (RLERGB), 11 (RLEmono) TGA images supported\n" );
        return;
   }

   // validate color depth
   switch( header.pixel_size ) {
     case 8:
     case 15:
     case 16:
     case 24:
     case 32:
        break;
     default:
        VID_Error ( ERR_DROP, "R_LoadTGA: Only 8, 15, 16, 24 and 32 bit images (with colormaps) supported\n" );
        return;
   }
   r = g = b = a = l = 0;

   // if required, read the color map information
   ColorMap = NULL;
   mapped = ( header.image_type == TGA_Map || header.image_type == TGA_RLEMap || header.image_type == TGA_CompMap || header.image_type == TGA_CompMap4 ) && header.colormap_type == 1;
   if( mapped ) {
      // validate colormap size
      switch( header.colormap_size ) {
       case 8:
       case 16:
       case 32:
       case 24:
          break;
       default:
          VID_Error ( ERR_DROP, "R_LoadTGA: Only 8, 16, 24 and 32 bit colormaps supported\n" );
          return;
      }
      temp1 = header.colormap_index;
      temp2 = header.colormap_length;

      if( (temp1 + temp2 + 1) >= MAXCOLORS ) {
         FS_FreeFile( data );
         return;
      }
      ColorMap = (byte *)malloc( MAXCOLORS * 4 );
      map_idx = 0;
      for( i = temp1; i < temp1 + temp2; ++i, map_idx += 4 ) {
         // read appropriate number of bytes, break into rgb & put in map
         switch( header.colormap_size ) {
         case 8:
            r = g = b = *pdata++;
            a = 255;
            break;
         case 15:
            j = *pdata++;
            k = *pdata++;
            l = ((unsigned int) k << 8) + j;
            r = (byte) ( ((k & 0x7C) >> 2) << 3 );
            g = (byte) ( (((k & 0x03) << 3) + ((j & 0xE0) >> 5)) << 3 );
            b = (byte) ( (j & 0x1F) << 3 );
            a = 255;
            break;
         case 16:
            j = *pdata++;
            k = *pdata++;
            l = ((unsigned int) k << 8) + j;
            r = (byte) ( ((k & 0x7C) >> 2) << 3 );
            g = (byte) ( (((k & 0x03) << 3) + ((j & 0xE0) >> 5)) << 3 );
            b = (byte) ( (j & 0x1F) << 3 );
            a = (k & 0x80) ? 255 : 0;
            break;
         case 24:
            b = *pdata++;
            g = *pdata++;
            r = *pdata++;
            a = 255;
            l = 0;
            break;
         case 32:
            b = *pdata++;
            g = *pdata++;
            r = *pdata++;
            a = *pdata++;
            l = 0;
            break;
         }
         ColorMap[map_idx + 0] = r;
         ColorMap[map_idx + 1] = g;
         ColorMap[map_idx + 2] = b;
         ColorMap[map_idx + 3] = a;
      }
   }

   // check run-length encoding
   rlencoded = header.image_type == TGA_RLEMap || header.image_type == TGA_RLERGB || header.image_type == TGA_RLEMono;
   RLE_count = 0;
   RLE_flag = 0;

   w = header.width;
   h = header.height;

   if( width )
      *width = w;
   if( height )
      *height = h;

   size = w * h * 4;
   *pic = (byte *)malloc( size );

   memset( *pic, 0, size );

   // read the Targa file body and convert to portable format
   pixel_size = header.pixel_size;
   origin = (header.attributes & 0x20) >> 5;
   interleave = (header.attributes & 0xC0) >> 6;
   truerow = 0;
   baserow = 0;
   for( y = 0; y < h; y++ ) {
      realrow = truerow;
      if( origin == TGA_O_UPPER )
         realrow = h - realrow - 1;

      dst = *pic + realrow * w * 4;

      for( x = 0; x < w; x++ ) {
         // check if run length encoded
         if( rlencoded ) {
            if( !RLE_count ) {
               // have to restart run
               i = *pdata++;
               RLE_flag = (i & 0x80);
               if( !RLE_flag ) {
                  // stream of unencoded pixels
                  RLE_count = i + 1;
               } else {
                  // single pixel replicated
                  RLE_count = i - 127;
               }
               // decrement count & get pixel
               --RLE_count;
            } else {
               // have already read count & (at least) first pixel
               --RLE_count;
               if( RLE_flag )
                  // replicated pixels
                  goto PixEncode;
            }
         }

         // read appropriate number of bytes, break into RGB
         switch( pixel_size ) {
         case 8:
            r = g = b = l = *pdata++;
            a = 255;
            break;
         case 15:
            j = *pdata++;
            k = *pdata++;
            l = ((unsigned int) k << 8) + j;
            r = (byte) ( ((k & 0x7C) >> 2) << 3 );
            g = (byte) ( (((k & 0x03) << 3) + ((j & 0xE0) >> 5)) << 3 );
            b = (byte) ( (j & 0x1F) << 3 );
            a = 255;
            break;
         case 16:
            j = *pdata++;
            k = *pdata++;
            l = ((unsigned int) k << 8) + j;
            r = (byte) ( ((k & 0x7C) >> 2) << 3 );
            g = (byte) ( (((k & 0x03) << 3) + ((j & 0xE0) >> 5)) << 3 );
            b = (byte) ( (j & 0x1F) << 3 );
            a = 255;
            break;
         case 24:
            b = *pdata++;
            g = *pdata++;
            r = *pdata++;
            a = 255;
            l = 0;
            break;
         case 32:
            b = *pdata++;
            g = *pdata++;
            r = *pdata++;
            a = *pdata++;
            l = 0;
            break;
         default:
            VID_Error( ERR_DROP, "Illegal pixel_size '%d' in file '%s'\n", filename );
            return;
         }

PixEncode:
         if ( mapped )
         {
            map_idx = l * 4;
            *dst++ = ColorMap[map_idx + 0];
            *dst++ = ColorMap[map_idx + 1];
            *dst++ = ColorMap[map_idx + 2];
            *dst++ = ColorMap[map_idx + 3];
         }
         else
         {
            *dst++ = r;
            *dst++ = g;
            *dst++ = b;
            *dst++ = a;
         }
      }

      if (interleave == TGA_IL_Four)
         truerow += 4;
      else if (interleave == TGA_IL_Two)
         truerow += 2;
      else
         truerow++;

      if (truerow >= h)
         truerow = ++baserow;
   }

   if (mapped)
      free( ColorMap );

   FS_FreeFile( data );
}


another bugger i needed to squish the engine couldnt find the menu background so replace
Draw_FindPic with this

Code: Select all
image_t *Draw_FindPic(char *name)
{
   image_t *gl;
   char   fullname[MAX_QPATH];

   // check all available image formats
   if (name[0] != '/' && name[0] != '\\') {
      Com_sprintf(fullname, sizeof(fullname), "pics/%s.pcx", name);
      gl = GL_FindImage(fullname, it_pic);
      if (!gl) {
         Com_sprintf(fullname, sizeof(fullname), "pics/%s.tga", name);
         gl = GL_FindImage(fullname, it_pic);
         if (!gl) {
            Com_sprintf(fullname, sizeof(fullname), "pics/%s.png", name);
            gl = GL_FindImage(fullname, it_pic);
            if (!gl) {
               Com_sprintf(fullname, sizeof(fullname), "pics/%s.jpg", name);
               gl = GL_FindImage(fullname, it_pic);
               if (!gl) {
                  Com_sprintf(fullname, sizeof(fullname), "pics/%s.dds", name);
                  gl = GL_FindImage(fullname, it_pic);
               }
            }
         }
      }
   } else {
      gl = GL_FindImage(name + 1, it_pic);
   }

   if (gl) {
      if (gl != r_notexture) {
         strcpy(gl->bare_name, name);
      }
   }
   return gl;
}


the old one only looked for pcx :S and the menu background is jpg :lol:

not nessesary but doesnt hurt

replace the same function in r_model.c

with this

Code: Select all
void Mod_LoadTexinfo (lump_t * l) {
     texinfo_t     *in;
     mtexinfo_t     *out, *step;
     image_t        *image;
     char         name[MAX_QPATH];
     char         *purename;
     int            count, next;
     int            i, j, k;

     in = (void *) (mod_base + l->fileofs);

    if (l->filelen % sizeof(*in)) {
          VID_Error(ERR_DROP, "MOD_LoadBmodel: funny lump size in %s", loadmodel->name);
    }
     count = l->filelen / sizeof(*in);

     loadmodel->numtexinfo = count;
     loadmodel->texinfo = out = Hunk_Alloc(count * sizeof(*out));
     loadmodel->memorySize += count * sizeof(*out);
   
     for (i = 0; i < count; i++, in++, out++) {
       for (j = 0; j < 2; j++) {
          for (k = 0; k < 4; k++) {
            out->vecs[j][k] = LittleFloat(in->vecs[j][k]);
          }
       }
         out->value = LittleLong(in->value);
         out->flags = LittleLong(in->flags);

         next = LittleLong(in->nexttexinfo);

       if (next > 0) {
             out->next = loadmodel->texinfo + next;
       } else {
             out->next = NULL;
       }

         // grab original texture size for override textures
         Com_sprintf(name, sizeof(name), "textures/%s.wal", in->texture);
         out->image = GL_FindImage(name, it_wall);

       if (!out->image) {
         // failed to load WAL, use default
         Com_Printf("Couldn't load %s\n", name);

         out->image = GL_FindImage("pics/noimage.tga", it_pic);

         if (!out->image) {
            out->image = r_notexture;
         }

         // no normal/glow map
         continue;
       }
   
      // get file name without path
         purename = COM_SkipPath(in->texture);           

         // check if we have something to override with
         Com_sprintf (name, sizeof(name), "overrides/%s.pcx", purename);
         image = GL_FindImage(name, it_wall);
         if (!image) {
              Com_sprintf (name, sizeof(name), "overrides/%s.tga", purename);
              image = GL_FindImage(name, it_wall);
           if (!image) {
              Com_sprintf (name, sizeof(name), "overrides/%s.png", purename);
              image = GL_FindImage(name, it_wall);
              if (!image) {
                 Com_sprintf (name, sizeof(name), "overrides/%s.jpg", purename);
                 image = GL_FindImage(name, it_wall);
                 if (!image) {
                    Com_sprintf (name, sizeof(name), "overrides/%s.dds", purename);
                    image = GL_FindImage(name, it_wall);
                 }
              }
           }
       }

         // scale override texture size
         if (image) {
              image->width = out->image->width;
              image->height = out->image->height;

           // use override instead of WAL
           out->image = image;
         }
       
      //
      // Normal Maps Loading
      //
      Com_sprintf(name, sizeof(name), "overrides/%s_nm.tga", purename);
        out->normalmap = GL_FindImage(name, it_wall);
        if (!out->normalmap) {
             Com_sprintf(name, sizeof(name), "overrides/%s_nm.dds", purename);
             out->normalmap = GL_FindImage(name, it_wall);
             if (!out->normalmap) {
             Com_sprintf(name, sizeof(name), "textures/%s_nm.tga", in->texture);
                 out->normalmap = GL_FindImage(name, it_wall);
             if (!out->normalmap) {
               Com_sprintf(name, sizeof(name), "textures/%s_nm.dds", in->texture);
                    out->normalmap = GL_FindImage(name, it_wall);
                 }
             }
         }

       //
       // Glow Maps Loading
       //
       Com_sprintf(name, sizeof(name), "overrides/%s_add.tga", purename);
         out->addTexture = GL_FindImage(name, it_wall);
         if (!out->addTexture) {
          Com_sprintf(name, sizeof(name), "overrides/%s_light.tga", purename);
             out->addTexture = GL_FindImage(name, it_wall);
             if (!out->addTexture) {
             Com_sprintf(name, sizeof(name), "textures/%s_add.tga", in->texture);
                 out->addTexture = GL_FindImage(name, it_wall);
                 if (!out->addTexture) {
                Com_sprintf(name, sizeof(name), "textures/%s_light.tga", in->texture);
                     out->addTexture = GL_FindImage(name, it_wall);
                if (!out->addTexture) {
                  out->addTexture = r_notexture;
                }
                 }
          }
       }
    }

     // count animation frames
     for (i = 0, out = loadmodel->texinfo; i < count; i++, out++) {
          out->numframes = 1;
        for (step = out->next; step && step != out; step = step->next) {
               out->numframes++;
        }
     }
}


checks for more image formats ;)
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby revelator » Tue Nov 10, 2009 3:07 pm

gdamn :evil: i found the evilist bug ever in this code.

shadow volumes are parsed from surface mins/maxs with this little bugger

Code: Select all
void CalcSurfaceBounds (msurface_t *s)
{
   glpoly_t   *p;
   float      *v;
   int         i, j;
   vec3_t      mins, maxs;

   if (s->polys) {
      mins[0] = mins[1] = mins[2] = 999999;
      maxs[0] = maxs[1] = maxs[2] = -999999;
      for (p=s->polys ; p ; p=p->next) {
         for (i=0, v=p->verts[0] ; i<p->numverts ; i++, v+=VERTEXSIZE) {
            for(j=0; j<3; j++) {
               if(mins[j] > v[j]) {
                  mins[j] = v[j];
               }

               if(maxs[j] < v[j]) {
                  maxs[j] = v[j];
               }
            }
         }
      }
      VectorCopy(mins, s->mins);
      VectorCopy(maxs, s->maxs);
   }
}


well originally the parsed mins/maxs where intended for culling against the surface frustum but the code had some dead ends like
externals with no type and fixing those made the watersurfs invalid gah :shock: now color me this

Code: Select all
      // create lightmaps and polygons
      if (!(out->texinfo->flags & (SURF_SKY|SURF_TRANS33|SURF_TRANS66|SURF_WARP))) {
         GL_CreateSurfaceLightmap (out);
      }

      if (!(out->texinfo->flags & SURF_WARP)) {
         GL_BuildPolygonFromSurface(out);      
         GL_AddFlareSurface(out);         
      }


originally this check if (!(out->texinfo->flags & SURF_WARP)) held the CalcSurfaceBounds(out);

remember i said its used for culling ?well guess what surface aint checked :idea:

Code: Select all
      // create lightmaps and polygons
      if (!(out->texinfo->flags & (SURF_SKY|SURF_TRANS33|SURF_TRANS66|SURF_WARP))) {
         GL_CreateSurfaceLightmap (out);
      }

      if (!(out->texinfo->flags & SURF_WARP)) {
         GL_BuildPolygonFromSurface(out);      
         GL_AddFlareSurface(out);         
      }

      // pick up some pvs info.
      // someone needs to be shot here btw go figure.
      CalcSurfaceBounds(out);


now take my comment litterally :P this is a big ugly nono.

i rest my case if anyone wants a working copy i will upload the fixed exe or if the author so wishes the code.
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby mh » Tue Nov 10, 2009 4:54 pm

And opening braces on the same line as well. Ewwwwww, talk about holy visual discontinuity Batman! :evil: :evil: :evil:
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby revelator » Tue Nov 10, 2009 5:08 pm

Image

hehe :)

parallax mapped lava surfs funky shit :twisted:

well the engine is beta state on his site i spent the best of a week cleaning out unused code from old functions and fixing things so its playable still a lot of crap to get rid off (looks like its based on psychospaz engine originally) atm its more like a mix of tenebrae with quake2 alltho the shadow volume code is very good (lots better than tenebraes original) might even be usable for quake1 without a lot of rewriting.

the flares are pretty nice also :) the screenshots dont even come close to how it looks ingame its seriously detailed.

tbh im kinda looking into adding knightmares lazarus game support so we can surpass the limits of normal Q2 without loosing compatibility atm it has kinda a hard time with mods that uses entity limits above standard Q2 (Sz_GetSpace overflows) like mark shans maps and even zaero at times.

i can run them by upping the message size but it breaks protocol :(

the particle system is an offspring of tenebraes also and looks very cool 8)

the decal code is a mess to look at but it works a treat even back then i wondered how something this ugly could produce so nice effects hehe.
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby revelator » Tue Nov 10, 2009 5:26 pm

oh ya the hud models you see are actually from you :wink:

real bsp models rendered to screen :)
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby revelator » Thu Nov 12, 2009 2:43 pm

ok im cool with how it works atm (even started making it thread safe) so im uploading the thing (source included) :)

barnes can rip my changes if he likes might save him some work (a lot actually) :lol:

it still has some weirdies (to run games with the new protocol copy from baseq2 the gamex86xp.dll to the game you want to run and attention here -> make sure to start with a map the demos are not compatible with the new protocol and if you start it as normal it will just start quake2 unless you start it directly in a map) if you just want to play it like normal start the game like this quake2xp +set net_compatibility 1 +game <the game you want to start> +skill <0-3> for how hard you want it. (demos work in compatibility mode)

ftp://90.184.233.166:21 to grab it login as Anonymous theres no password and dont hammer my ftp autobans are enabled :twisted:
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby revelator » Mon Nov 16, 2009 1:01 pm

argh i had the wrong package uploaded on my ftp :S

well can redownload source only and recompile the executables the ones i posted in the complete package are with the old broken code :oops:

new one uses a devil library i compiled myself (more image formats incl nvtex hpphoto and openexr) and with the bugs mentioned earlier squashed.

its in the archive src.7z
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: quake2xp weird bug

Postby Barnes » Thu Dec 24, 2009 2:48 pm

reckless wrote:toying a bit with quake2xp looks pretty nice but im getting a weird
pink rectangle beneath me when looking down it dissapears if i crouch image here ->

Image

and the same if i crouch

Image

not sure what may cause this the engine is quite advanced with bumpmapping shadow volumes etc.

any ideas ?

hi Reckless this not bug, current player model missing.
About tga-psx. Devil work ugly with this formats and i use old Carmack code with out any changes :roll:
Shadows - i have not any problems with shadow rendering :shock:
Parallax lava surfaces - its old code base and its not parallax ) (im remove this shit)
New code available on svn
barnes can rip my changes if he likes might save him some work (a lot actually)

I accept any help
User avatar
Barnes
 
Posts: 226
Joined: Thu Dec 24, 2009 2:26 pm
Location: Russia, Moscow

Postby revelator » Fri Dec 25, 2009 9:08 am

hey barnes :)

pretty cool looking mod this kudos :D

hmm so the missing player model aint a bug ? maybe included somewhere else in code hmm ?

About tga-psx. Devil work ugly with this formats and i use old Carmack code with out any changes


aye devil doesnt handle these to well old carmack code is ok the new code i posted above just fixed some nasty bugs tga has like flipped images and ads support for some otherwise unsupported types.


Shadows - i have not any problems with shadow rendering


aye it didnt affect shadows the problem as such is that some of the code had typedefs with no actuall function for completeness i fixed that and discovered that it made problems later in code.

Parallax lava surfaces - its old code base and its not parallax ) (im remove this shit)


oki looks quite ok though :)

ill have a look at new svn code thank you :)

if i make further changes do you prefer me to upload on svn or like a look at changes before comitting ?
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Next

Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest