News | Forum | People | FAQ | Links | Search | Register | Log in
Coding Help
This is a counterpart to the "Mapping Help" thread. If you need help with QuakeC coding, or questions about how to do some engine modification, this is the place for you! We've got a few coders here on the forum and hopefully someone knows the answer.
First | Previous | Next | Last
 
Yeah, me. Hence why my curiosity. :P 
Ahh! 
 
@Can You At Least Fix Non Power Of Two Rendering? 
Uh? What is an example? Do you mean textures that don't comply to the Quake standards listed in http://www.celephais.net/stuff/texturefaq.htm ? Or are you talking external textures or what?

Or do you mean something else?

[I have been thinking about a revision of Mark V to tidy up some of the things pointed out in the thread.] 
 
Quick comment on this:

> Apparently the cvars saved1-saved4 were added in SoA and never used, for anything, by anyone.

FYI frikbots use saved1. 
 
I can't give an example now because im in work. But some textures go blurry if they are a weird size. Best exanple I know right now is the large metal panel texturre on ziggurat vertigo 
@Spike 
@baker, markv with bsp2?

Not sure if I understand the question. But yeah if I do any kind of clean-up release of Mark V I will incorporate the bsp2 code you donated to the project.

[I'm kinda of preoccupied with trying to port Mark V to Android combing using FTEDroid and Q14A for ideas/pointers. Looking at FTEDroid source has been immensely helpful and is a bit shocking the extent of your implementation.] 
NPOT 
just use https://www.opengl.org/registry/specs/ARB/texture_non_power_of_two.txt
or in other words, if that's supported, ignore the fact that its an npot texture and upload it regardless.
This avoids various columns/rows getting ignored/duped to resize it. Resizing is evil, mmkay?
iirc, vanilla glquake's code was fine with the npot check disabled - so long as the drivers support it. 
@baker 
Sorry it took so long for me to post examples.

Here's what the blurriness looks like in fitzquake -

https://www.dropbox.com/s/s2w8it70khmvrrx/1.jpg
https://www.dropbox.com/s/syr2vgpsj6bl0r6/2.jpg

And here's the same textures in directq -

https://www.dropbox.com/s/j6pgvqxos4s45mv/1a.jpg
https://www.dropbox.com/s/507l4a3f93tslzg/2a.jpg 
 
FYI frikbots use saved1.

Good to know, although I don't know why/how someone would play a custom q1sp with frikbots.

And it looks like you making and wasting time worrying about this.

I'll produce a FitzQuake 0.85 and a Mark V with an option "gl_crosshair_hide_on_centerprint" (or whatever) that will always hide the crosshair with centerprint on the screen and a simple tutorial to implement.


That's very nice, but probably not necessary, and also not a help to people who prefer other engines. It probably looks like I'm spending far more time on this than I really am. And, if you're getting back to FQmk5 development, fix the bugs in the FQmk5 thread first :D 
 
Has anyone recently performed the super awesome service of compiling a set of "starting" QC files to begin building on top of?

Also, a link to a proper compiler for modern Quake?

The reason I ask is that I found some "clean 106 QC" code and I'm using FrikQCC to compile it but even a clean, base compile gives me some weird crap trying to run the mod like, "can't find level maps/info_player_start.bsp" which basically sounds like something is out of alignment.

Is there a place to go to get a good working base of QC and a proper compiler these days? 
 
I should mention that deleting the progs.dat file in the mod folder makes everything happy so it's definitely the QC. 
 
NM, I think I have it ... Thanks QuakeWiki!

http://quakewiki.org/wiki/Getting_Started_Modding 
 
Although the link to the FrikQCC compiler is dead (inside3d). 
Try 
FTEQCC http://www.fteqw.com/

Been using it for years, very reliable. 
FTEQCC 
There's a more recent version of FTEQCC at http://triptohell.info/moodles/fteqcc/ which has come up twice in the past month. It fixes at least one compilation bug I've encountered, so it's worth having for stability. 
FTE And Arrays 

void debugArrayPrint(float f)
{
bprint(ftos(f));
bprint("\n");
}


with this code:



bprint("debug test:\n");

float i = 0;

float array[5];
array[0] = -1;
array[1] = -2;
array[2] = -3;
array[3] = -4;
array[4] = -5;

float a[1];
a[0] = 1;
float b[2];
b[0] = 2;
b[1] = 3;

array = a;
for (i = 0; i < 1; i++)
debugArrayPrint(array[i]);

array = b;
for (i = 0; i < 2; i++)
debugArrayPrint(array[i]);


gives this output:

debug test:
1
2
-2


I would have expected:

debug test:
1
2
3


It seems like arrays are not handled the way they are in C and only copy the first element. Is it at all possible to pass them like pointers so that functions can freely take array pointers as arguments and return array pointers?

Like for example, if I wanted to create a vector system where we always push elements via a method (let's called it push_back), which would automatically copy the array to a larger one when space ran out. 
 
Arrays are not pointers. Pointers don't exist in QC.
Remember that each and every access is expanded into a function call with a binary search inside in order to read/write the correct global for that index.
Or in other words, no pointers.

array = a; does indeed read+store the first element. it should return a pointer, and refuse to assign to a pointer. but it doesn't. this is a known bug, but as its (normally) an error anyway, it hasn't been a high priority to get it to throw a hissy fit instead. :P
Trying to compile such a statement is also an error in C (lhs is a const pointer, and thus assigning to it is a syntax error).
If you really want to copy one array to another, embedding it within a struct and copying the struct should work (in recentish triptohell builds anyway). The catch is that you can't copy specific blocks.
If you're using opcode extensions (and fteqw), you can just memcpy data from one array to another, but if you're not then you'll need to write some sort of loop to do it instead (use preprocessor?). 
MDL Question 
I'm currently plodding along with my little Quake Web Tools thing, which is currently intended basically to allow you to view Quake file types by just dragging and dropping them onto a web page. Right now I am slowly working towards an MDL viewer, and have encountered an oddity - frame groups.

So, it appears that no models are actually using frame groups for anything, and that frames [i]could[/i] be grouped after extraction by simply processing them by name, since the frames are sorted by animation by name (e.g. walk1 - walk14 for the knight's walk cycle). I also seem to remember animations being defined explicitly in the Quake C somewhere.

So are frame groups used at all? What for? I need a model that has them that I can test with. 
ARGH! 
ok, so I just discovered that the torch model 'flame.mdl' uses frame groups and my code works. 
Btw, Current Progress Here: 
Currently there isn't much to show, but here it is for anyone interested:
http://pecope.co/experiments/quake_web_tools/QuakeWebTools.html

You can drag various Quake file types onto the drop zone at the top and get some kind of file preview, although currently the previews are very limited.
PAK: full file list and allows you to extract the files by clicking on the filename.
WAD: displays all textures in the wad
LMP: displays the image
BSP: displays the texture lump only. Basically the same as wad
MDL: displays skins only
PAL: displays the palette (treats it as a special case LMP)
SPR: does nothing currently, though there is some stub code, so you don't get an error.

My current plan is to make all of the main file types properly preview-able in a modern web browser on any platform said browser runs. This means that it should work fine in Chrome on MacOSX, Windows and Linux. Firefox worked last time I checked, and Opera should too. No idea about Safari and IE, but supporting different browsers is not a priority as long as it works on the good ones: Firefox and Chrome.

Once previewing files works properly (and perhaps before BSP preview works... I dunno) I'd like to start making a sort of browser based TexMex, although this is something that would likely be a lot of work - even if it only supports Quake 1 format WAD. Eventually editing other formats would be nice, but it's so much work to do things like an editor, and who knows, maybe someone will port TrenchBroom to asm.js :)
http://en.wikipedia.org/wiki/Asm.js

I wonder how WebQuake was made... 
 
The MDL format is SO much fun ... that's probably the most bizarre code I've ever written in relation to Quake. At every turn, there's something weird happening. And that's just reading. I never got around to writing it.

There were moments that felt like staring into the abyss... 
Than: 
Willem: 
Spike: 
Thanks for clearing that up. I knew that the arrays were a sort of hack but wasn't sure what the limitations were with them. Still, better than nothing!

Trying to compile such a statement is also an error in C (lhs is a const pointer, and thus assigning to it is a syntax error).
Yeah, the example had the array size declared because fteqcc wouldn't accept entity[]! That should have clued me in! 
 
necros

I don't doubt that it's possible, I just said I never got around to attempting to write it. :)

I had grand plans at one point to expand ToeTag into an entire Quake editing suite ... it was going to be amazing. And then one day I looked up from the keyboard and saw the mountain of code still ahead of me that needed writing and something broke inside of me.

Still ... it was going to be great. 
First | Previous | Next | Last
You must be logged in to post in this thread.
Website copyright © 2002-2024 John Fitzgibbons. All posts are copyright their respective authors.