|
Posted by metlslime on 2007/08/08 04:57:56 |
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. |
|
|
@Can You At Least Fix Non Power Of Two Rendering?
#1429 posted by Baker on 2014/07/04 16:06:42
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.]
#1430 posted by Joel B on 2014/07/04 16:11:04
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
#1432 posted by Baker on 2014/07/04 16:16:55
@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
#1433 posted by Spike on 2014/07/04 18:13:32
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
#1435 posted by Lunaran on 2014/07/05 01:37:21
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
#1436 posted by JneeraZ on 2014/07/05 12:36:35
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?
#1437 posted by JneeraZ on 2014/07/05 12:37:53
I should mention that deleting the progs.dat file in the mod folder makes everything happy so it's definitely the QC.
#1438 posted by JneeraZ on 2014/07/05 12:52:01
#1439 posted by JneeraZ on 2014/07/05 12:52:39
Although the link to the FrikQCC compiler is dead (inside3d).
Try
#1440 posted by ijed on 2014/07/05 15:50:32
FTEQCC http://www.fteqw.com/
Been using it for years, very reliable.
FTEQCC
#1441 posted by Preach on 2014/07/05 22:25:38
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
#1442 posted by necros on 2014/07/06 03:18:51
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.
#1443 posted by Spike on 2014/07/07 13:20:32
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
#1444 posted by than on 2014/07/07 14:32:53
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!
#1445 posted by than on 2014/07/07 14:52:31
ok, so I just discovered that the torch model 'flame.mdl' uses frame groups and my code works.
Btw, Current Progress Here:
#1446 posted by than on 2014/07/07 15:37:37
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...
#1447 posted by JneeraZ on 2014/07/07 15:54:13
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:
#1448 posted by necros on 2014/07/08 01:24:20
Willem:
#1449 posted by necros on 2014/07/08 01:29:49
Spike:
#1450 posted by necros on 2014/07/08 01:37:46
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!
#1451 posted by JneeraZ on 2014/07/08 01:48:41
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.
Yeah,
#1452 posted by necros on 2014/07/08 02:22:04
i know what you mean.
I still want to make a model editor that'll let you do modern uv mapping like you can do in 3ds max or maya but both the crap code i wrote so far and the huge amount still left to be written puts me off, just not enough time. :(
MDL
#1453 posted by than on 2014/07/08 04:38:40
Well, I'm not planning on doing any MDL writing for the moment, although I might look into making a tool to update the skin lumps, since that's easy. Aside from the UV format being horrible, the vertices are packed into chars, so making a tool that allows you to alter a model with minimal loss of precision seems like it wouldn't be much fun.
As I mentioned, the only thing I'm thinking about seriously for now is a viewer and WAD file editor. Oh, and probably something that allows you to create and edit PAK files, since my current code merely allows you to extract the files from inside. At least PAK is a sane format... thank god JC never implemented compression :)
A MAP editor would be fucking awesome, but that's by far the most complicated thing, so I doubt I'll ever get that far. A port of Trenchbroom using asm.js might be feasible though, but it would require also porting wxWidgets, which I could barely even get to compile normally, let alone with asm.js.
Btw, for anyone who thinks web apps are shit (yeah, most of them are I guess), the tech does seem to have gotten a LOT better in the last couple of years thanks to HTML5 and an explosion of libraries to iron over browser incompatibilities and lack of support for various standard features. There's an entire modelling package here: http://clara.io/ Compared to that I guess a basic Quake editor would be quite easy.
|
|
You must be logged in to post in this thread.
|
Website copyright © 2002-2025 John Fitzgibbons. All posts are copyright their respective authors.
|
|