Search found 929 matches
- Sat May 26, 2018 4:19 pm
- Forum: Engine Programming
- Topic: Screen coordinates of BSP polygon vertexes
- Replies: 3
- Views: 6624
Re: Screen coordinates of BSP polygon vertexes
Here's a video showing the problem. The polygon midpoint algorithm should point the crosshair (cl_crossx.value, cl_crossy.value) to the midpoint (between the nearest and farthest vertexes) of the polygon of the wall in front of the slipgate, but it keeps pointing to random places in the floor when ...
- Sun May 20, 2018 7:53 am
- Forum: Engine Programming
- Topic: Screen coordinates of BSP polygon vertexes
- Replies: 3
- Views: 6624
Screen coordinates of BSP polygon vertexes
I'm having a hell of a hard time trying to do this on a BSP polygon: - Get the on-screen vertex coordinates which are nearest and farthest from the screen plane; - Calculate their midpoint (mid = near + 0.5 * (far - near), for each axis); - Display the crosshair over it (setting cl_crossx to mid[0] ...
- Wed May 02, 2018 5:40 am
- Forum: Engine Programming
- Topic: Funny C Rules (And Low-Level Languages in general)
- Replies: 74
- Views: 46131
Re: Funny C Rules (And Low-Level Languages in general)
a bitshift will take only one clock, while memory references can easily take many many more. The thing is, I couldn't find any C article detailing how many clock cycles it can take to read referenced values. Only x86 Assembly articles, which I haven't learned. Memory access is FAR from free - espec...
- Wed May 02, 2018 3:37 am
- Forum: Engine Programming
- Topic: Funny C Rules (And Low-Level Languages in general)
- Replies: 74
- Views: 46131
Re: Funny C Rules (And Low-Level Languages in general)
Recently I've come up with a new trick to eliminate some bitshifting operations, replacing something like this int i; while (loopcount--) { result = i >> 16; i += step; } ... with something like this: // "bitscope" the contents of the integer through a short pointer, to get the >>16 divisi...
- Fri Sep 15, 2017 3:49 pm
- Forum: General Discussion
- Topic: [TO ADMINS]Forum logout session time
- Replies: 13
- Views: 15224
Re: [TO ADMINS]Forum logout session time
Same.mh wrote:I pretty much stopped using the site because of it's inability to keep me logged in. Yes, it would be great if this was fixed; it would have been even greater if it hadn't happened in the first place.
- Mon Aug 28, 2017 2:56 am
- Forum: General Discussion
- Topic: Faster single-threaded game performance on HyperThreaded CPU
- Replies: 0
- Views: 24039
Faster single-threaded game performance on HyperThreaded CPU
This is useful for old games, and sometimes may be useful as a temporary workaround during development of some engines: The engine I'm currently developing has some really big sets of instructions in its inner rendering loops, which makes it very cache-intensive on the CPU. When CPU HyperThreading i...
- Tue Jun 06, 2017 7:19 pm
- Forum: Engine Programming
- Topic: The "walking flames" bug
- Replies: 2
- Views: 3221
Re: The "walking flames" bug
I think the view itself may be changing for some reason. this bug indicates that there's something going wrong in the frustum or whatever. It may be related to my new method of depth-sorting liquid types. I was sure that nothing was modified during the sorting in my algorithm, but I'll have to check...
- Tue Jun 06, 2017 4:07 pm
- Forum: Engine Programming
- Topic: The "walking flames" bug
- Replies: 2
- Views: 3221
The "walking flames" bug
My engine has a stupid bug, which also showed up from time to time in Makaqu: translucent static MDL entities starts slowly moving in a fixed direction. Sometimes their position is also affected by the camera position & angle, sometimes it's not. The question is simple: how to make them stay qui...
- Fri May 05, 2017 1:53 am
- Forum: General Programming
- Topic: How to compile WinQuake in 2017?
- Replies: 6
- Views: 4499
How to compile WinQuake in 2017?
I still use an extremely old and sluggish Celeron laptop for coding. In it, I still use MASM32 and the MSVC++ 2003 Toolkit for compiling, and a really old version of Code::Blocks as an IDE. There's no VC workspace & project files for my engine anymore, all I'm doing is for Code::Blocks. I want t...
- Fri Apr 28, 2017 5:39 am
- Forum: Quake Events
- Topic: Expo 2017?
- Replies: 3
- Views: 3331
Re: Expo 2017?
Back when we started organizing the 2016 QExpo, people mentioned that it would be a good idea to keep it as a bi-yearly event.
Some projects takes longer than an year to have anything substantial enough for an expo. I know this year my life is fully busy with real life stuff.
Some projects takes longer than an year to have anything substantial enough for an expo. I know this year my life is fully busy with real life stuff.
- Mon Apr 24, 2017 8:09 pm
- Forum: Engine Programming
- Topic: BSP depth sorting of translucent entities
- Replies: 2
- Views: 3413
Re: BSP depth sorting of translucent entities
Thanks. It's been a while since I've coded anything, and almost a couple years since I've touched the network code, so I wasn't sure if my guess was on the right track.
- Mon Apr 24, 2017 5:12 pm
- Forum: Engine Programming
- Topic: BSP depth sorting of translucent entities
- Replies: 2
- Views: 3413
BSP depth sorting of translucent entities
This is one of the things I want to investigate. The renderer uses the BSP tree order to automatically sort the surfaces of the map, so why not use it for sorting the entities too? It occurred to me that the reason why engines that sorts entities by depth does so by comparing XYZ coordinates is beca...
- Mon Feb 20, 2017 8:49 pm
- Forum: Programming Tutorials
- Topic: Detecting maps compiled with lit liquids
- Replies: 0
- Views: 21535
Detecting maps compiled with lit liquids
The key to understanding how to detect if liquid surfaces were compiled with lighting is to know that the flag that defines whether specific surfaces were compiled without lighting is not a surface flag, but a texinfo flag. The map compilers sets TEX_SPECIAL on the texinfo structure for textures tha...
- Fri Dec 09, 2016 12:56 am
- Forum: Engine Programming
- Topic: Standard Waterwarp Consistency Test
- Replies: 2
- Views: 4535
Standard Waterwarp Consistency Test
The screen distortion when submerged, known as "water warp" (from the r_waterwarp cvar name) is one of the main visual effects introduced in the first Quake game. However, its implementation did not behave consistently across the multiple possible configurations of the game. Configurations...
- Sun Oct 23, 2016 2:20 am
- Forum: Engine Programming
- Topic: Calculating the centroid of a msurface_t
- Replies: 2
- Views: 3325
Re: Calculating the centroid of a msurface_t
you should be able to use high-school maths to figure out the area of the triangle from that High school in Brazil is... disappointing, to say the least. Anyway, I feel that I can simply sum all edge-center vertices and divide by numedges to get the centroid in Mod_LoadFaces. Would this be innacura...