Announcement

Collapse
No announcement yet.

Real Flash Quake

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replacement textures

    If you want to see replacement textures... replace the game.zip... game/textures/ folder with the one in the above link.

    The sky texture was not replaced. That was on purpose cause sky is all fucked up anyway.

    edit (unrelated): I just got water scrolling. Nothing special. Just a place-holder animation that I can upgrade later.
    Last edited by MadGypsy; 04-17-2016, 01:44 AM.
    http://www.nextgenquake.com

    Comment


    • Added skybox support


      edit:
      for shitz and giggles I compiled new lightmaps that look more like they belong with the source


      The skybox is loaded based on a field in worldspawn.
      Last edited by MadGypsy; 04-18-2016, 04:59 AM.
      http://www.nextgenquake.com

      Comment


      • How do I determine which lights effect which faces so I can color the light?
        http://www.nextgenquake.com

        Comment


        • anybody know where I can find some .lit file specs?
          http://www.nextgenquake.com

          Comment


          • Supposed this engine tutorial works

            Quake Standards Group - Tutorial

            Otherwise you will likely need to examine gl_model.c. It's a short header and the 3 bytes for every 1 byte that was in the .bsp for lighting.

            Looks like the file starts "QLITxxxx" and then that data (i.e. the 8th byte is the start of the data), where xxxx is 4 bytes that comprise a 32-bit (signed) integer.
            Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

            So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

            Comment


            • oh sweet! thank you!

              so startLightData = 9th actual byte and endLightData = (totalbytes -?

              The only reason I'm asking is because I have found gaps in bsp bytes. I actually read struct results, and header_t offset/length values don't add up to every byte in the file.

              ex:
              header
              header.entitites[0] 46218 [1] 415
              header.planes[0] 124 [1] 3520
              header.miptex[0] 46637 [1] 68268
              header.verts[0] 5072 [1] 4176
              header.vislist[0] 45865 [1] 349
              header.nodes[0] 9248 [1] 2616
              header.texinfo[0] 11864 [1] 3200
              header.faces[0] 15064 [1] 5240
              header.lightmaps[0] 31074 [1] 14787 = 45861
              header.clipnodes[0] 20304 [1] 2416
              header.leafs[0] 3644 [1] 1428
              header.lfaces[0] 22720 [1] 674 = 23394
              header.edges[0] 28470 [1] 2540
              header.ledges[0] 23398 [1] 5072
              header.models[0] 31010 [1] 64
              Last edited by MadGypsy; 04-18-2016, 06:23 PM.
              http://www.nextgenquake.com

              Comment


              • Originally posted by MadGypsy View Post
                so startLightData = 9th byte and endLightData = (totalbytes - 8 )?
                I suppose I have a C programmer mindset where indexes start at 0, so 0-7 is the first 8 bytes.

                But yeah, that's right.
                Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

                So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

                Comment


                • Indexes start at 0 for me too. I edited my post before I realized you replied to say "9th actual byte."

                  edit: I for real and truly program in over 15 languages and I don't think any of them are 1 based. Can anybody name a 1 based language? I can't. They supposedly exist, hence the term "1 based" but, it must be obsolete or summin cause, no modern language that I am aware of is 1 based.

                  edit2: I found this. I have heard of exactly one 1 based language in that list (SASS). I programed in sass once to test it's css expansion functionality. I think it was SASS, anyway. Some language with an ass in it.

                  edit3: It was definitely SASS. It even means Syntactically Awesome Stylesheets. Basically, you write very concise stylesheets using a very similar syntax to css and then run the compiler. Your sass gets expanded to valid css.
                  Last edited by MadGypsy; 04-18-2016, 06:39 PM.
                  http://www.nextgenquake.com

                  Comment


                  • Hmmm, there must be something else to this because, the lit file is only 11090 ints in length but, my lightdata is 14787.

                    I have no doubt that i am reading it exactly how you said
                    Code:
                    private static function _lightmap():void
                    {	$lit.position = 8;
                    
                    	$lightmap = new Vector.<int>(($lit.length-8)/4);
                    	$lightmap.forEach(function(na:int, n:int, self:Vector.<int>):void{
                    		self[n] = $lit.readInt();
                    	});
                    }
                    Last edited by MadGypsy; 04-18-2016, 08:35 PM.
                    http://www.nextgenquake.com

                    Comment


                    • Read int?

                      Light data is not int (int32 = 4 bytes), it is bytes.

                      rgb data is going to be 3 bytes each, compared to the original which will be 1 byte each.

                      Maybe you were thinking rgba. But isn't rbga, it's rgb.
                      Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

                      So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

                      Comment


                      • I see how I misunderstood. You said 4 bytes as signed int. Well, readInt is 4 bytes and that's a signed int.... See what I'm saying?

                        I understand now.
                        http://www.nextgenquake.com

                        Comment


                        • The 8 byte header contains a single int32.

                          The data after the 8 byte header is rgb.

                          I said QLITxxxx, the xxxx is int32. That part is a read int. Not the light data itself.
                          Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

                          So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

                          Comment


                          • woops...lol


                            I know what I fucked up. I need to take 30 and come back to this. My engine was not prepared for this extra data and apparently I'm going to need to do the full surgery to get this to work right.

                            edit: You would think with as much stuff as I fuck up and straight up don't know/understand, it is a miracle I have gotten this far. Spike all but grabbed me by the collar "Linear filtering, dumb-ass!" LMAO! That shit still isn't linearly filtered. I'll learn AGAL another day. I'm banging out the stuff that is far more involved than a shader script. Actually shader scripts might be the last thing. I need a bilinear filter and a water caustics, hardly seems worth it right now.

                            Actually, if you follow this thread and consider what it really takes to do each part you can see how I am walking through my API from basic to advanced. I'm not just learning how to parse BSPs, I'm learning how to use this 3d engine api too. I'm doing all of this from a stance of ideas...trial and error, and LOTS of reading docs. Did I mention that Away3D docs suck donkey balls? It's the exact format as the AS3 docs (which is awesome) but there isn't a single fucking example. If I didn't know AS3 Away3D would be completely unusable, to me.
                            Last edited by MadGypsy; 04-18-2016, 10:48 PM.
                            http://www.nextgenquake.com

                            Comment




                            • Let me guess, I'm not gonna get away with this part without a shader? I am rendering the lit file out exactly how I would lightdata but with 3 vars instead of 1. It would seem that this also expects to be combined with the original light data.
                              http://www.nextgenquake.com

                              Comment


                              • the header is "QLIT\1\0\0\0". reject it if those 8 bytes don't match. otherwise skip over them and pretend that they're not there.

                                lit files entirely replace the original lighting lump with 3*8bit lighting instead of 1*8bit lighting.
                                the surfaces lump remains unmodified of course, which means you need to ensure that the surf->lightofs value is correctly scaled up to the new *3 byte offset.
                                most engines just use full rgb lighting, with non-lit support just being a case of trippling each byte of the bsp's greyscale lighting data.

                                and yeah, you still need linear filtering. you also need mipmapping with your world/high-res textures (lightmaps don't need it, and the atlasing can make it glitchy). hop to it.
                                Some Game Thing

                                Comment

                                Working...
                                X