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
I Am Not A Lawyer! This Is Not Legal Advice! 
'may I use them also with the knight animations left untouched in qme'
if you started with the knight model in qme, then the result is still a derivative work in some small way, and still subject to id's copyright.
strictly speaking such derivative works (note that this includes maps that just contain id's textures) should not be distributed at all, but we usually do so anyway on the understanding that the recipient has the full version of quake. I believe we follow that interpretation thanks to someone at id saying it'd be okay despite not being stated in the license, but I can't prove that sadly.
you may also be able to get by on fair-use laws, depending on legal jurisdictions... so you can probably get away with loading up the model and deleting the skins+verticies+triangles. names and sizes of frames+skins is probably okay under fair use, but sticking to those frame numbers means that your resulting model is probably going to play back at the wrong speed or something stupid/ugly like that, so its not something that's really worth much anyway.

the sources for the maps was also released (under the gpl) a while back, but combining that with the vanilla textures is arguably a violation of the gpl!

if you want a _total_ conversion, then delete pak0.pak and pak1.pak from your harddrive...
(and use a different palette... if only because quake's sucks...) 
 
I wonder what is minimum PAK content to run engine?
I guess palette, sprites to run MENU, start map, what else? 
Minimum 
gfx.wad

Should be it I think. 
 
dp+fte will both start up with absolutely nothing, depending on your definition of 'start'.

FTE:
for instance, if fte can't find id1/pak0.pak (or equivalent) then it'll not know what sort of game its meant to be running nor which gamedirs it should use. you can get it to behave with -basedir . -quake -nohome and it'll get the idea then. alternatively put fteqw.exe+default.fmf in the same dir and you can get the same effect without commandline args (possibly with other gamedirs instead, no id1).
if there's no [qw]progs.dat then fte will fail to spawn any entities. however, it will still load the world, the PutClientInServer function will fall back to spawning the player with noclip, and the various other missing functions will be ignored. The result is that you can at least view maps with nothing but the engine and a bsp... (and one of those 3 ways to get the filesystem code to be happy).

DP:
dp tends to have extra dll dependancies. I don't know if it'll cope without a progs.dat, but it should be fine if you give it a progs with just entity self;.float movetype;void()PutClientInServer={self.movetype=8;};
or you can just compile some gpled progs. obviously this isn't needed if you're just running it as a client.

QuakeSpasm/Other:
ignoring dll dependancies, other engines will definitely need some gfx.wad, for the palette lump, the colourmap(in sw renderers) lump, conchars lump, the various sbar image lumps (apparently quakespasm doesn't need those any more). They'll also need a gfx/conback.lmp, in most cases a gfx/pop.lmp (so they actually allow loading files without the demo's pak0.pak - this file can be generated correctly from the engine source which defeats the point of the check for it). annoyingly they'll also need a player.mdl (player baselines expect it, use a renamed spr or bsp if you want). any menus that are displayed (most noticeably the main menu) will need their images to load in order to avoid sys_errors.
you'll need a progs.dat if you're running it as a server. You'll need to provide everything up to end_sys_fields without reordering etc. this will also include a few functions which will need bodies, though they can be empty (you'll probably want at least the noclip thing though).
you'll also need a map, presumably.
those are the files/lumps that I can think of. 
I Confirm That Pak0 And Pak1 Are Needed.. 
..to run Quake, so better leave them there.
As for my TotalConversion project, do ya think a single person could bear all the load of work needed ?
I'm relatively good at creating textures, levels, models.. even weapons(aarrrgh!), but I fall short on fx sounds and AI code for example :(
AI is an intangible thing so how could people be aware if I use IDsoftware one ? 
Thanks Spike 
I found this thread about minimum code in QuakeC too: http://quakeone.com/forums/quake-talk/quake-central/11506-quakec-developer-tools.html

...but I think writing everything from scratch is kinda tedious task. 
AI Code In QuakeC 
Quake's AI uses a set of think functions for various behaviours: th_run, th_stand, th_die,etc.

These functions start a chain of frame functions: void run1 [0] () { ai_run (<somedistance>)}, void run2, run3 etc.

Each function in the chain references a frame number in []'s.

The ai_run, ai_walk, ai_slide, etc. within each chain function moves the enemy by the set distance so that the monster can move realistically with its steps. For instance, at a frame where a foot touches the floor, you might not have an ai_run function or the ai_run will have a small value so the monster stops or slows with its steps.

Other functions do other actions timed with that frame in the animation.

Study the qc source for reference. 
 
Is there a documentation for the QuakeC opcodes? I'm planning to write a small compiler for something less crappy than QuakeC. 
 
pr_comp.h in the Quake engine source code 
General Purpose Question 
I have a couple of Quake related utilities that were made for Win95 era. They won't run in compatibility mode in Windows 7. I know I have the source for at least one of them. They are very unique programs I was going to hand off to Quaddicted as they don't have them in the archives. One is a fractal terrain generator (FraQuake) and the other is a map editor that creates maps from simple text files (Phase II).

So the question is:

Is there a way to have these simply recompiled to work on modern OSes? Does something "automagic" like this exist? Or are their services that I could use to port these to run on modern OSes? I obviously know next to nothing about coding. I've never run a virtual machine either. I would assume there's a way to scratch the itch but love to hear options. VBRUN300.dll is required for both of them So I assume written in Visual Basic... errr maybe? 
 
Generally speaking I find virtualization is the best way to keep using those tools. I use a win95 VM on my win10 machine for things like that (specifically, I set it up to run the QME installer).

Converting an app to run on modern windows otherwise would provably be a LOT of effort by comparison, unless perhaps the source code was already readily available... 
@pritchard 
Thanks, I am looking into installing Windows 7 32bit as I have a disk and license for that (note that it has 16 bit support whereas 64 bit versions don't). I have WinXP somewhere as well but lost my license. I know there are other options but I try to not "borrow" licences. ;)

I do have the source code for one of the the two proggies but in researching this it looks like VB3 is *really* freaking old and tough to find info on this stuff when you don't know what you are doing. 
You Could Include The Source 
In your quaddicted upload. (Always and forever :) ) 
@Qmaster 
Of course! I thought I had to email the files to Spirit. I can upload them? Will be happy to. 
 
Well 
Ya you have to email them to spirit, but I mean please package them in the same zip beforehand and sounds cool. FraQuake? Whoa. Text mapping...hmmmm 
@Qmaster 
PhaseII is an oddity to be sure but both of these apps have a really interesting UI and are (to me) a pretty interesting part of our collective Quake lore. They were coded by a women who was injured in a car accident and kind of fell out of the Quake scene as a result. I've never been able to track down what happened to her after her hospitalization. I will email these to Spirit but here they are for the curious. No source for PhaseII unfortunately. Well worth a look IMO. That's why I wanted to get them running again.

https://www.dropbox.com/s/plh6rsopnx3c863/fraquake.zip?dl=0

https://www.dropbox.com/s/4hgvr5ojab38xnl/phase2.zip?dl=0 
BSP Parsing Code 
Can someone point me to code that parses BSP files?

Extra beer if it's in python or the like :-) 
It Would Be Totally Fine To Point Me To The Relevant 
sourcecode on github or something :-) 
 
Here you have add-on for blender that parses BSP. It's a python script, so very close to what you are looking for: https://github.com/andyp123/blender_io_mesh_bsp

I don't know about any other python BSP parser, but i bet there must be more of this... somewhere... :D 
Quakespasm Source 
BSP Parsing Code 
https://github.com/ericwa/Quakespasm/blob/master/quakespasm/Quake/gl_model.c#L1969

if you just want a wireframe blob, walk through the faces lump, read the firstedge+numedges values and walk through the surfedges lump from that firstedge value for numedges entries. for each surfedge indicated, look up the edge entry that it indicates - if the surfedge is negative, negate it and use the second vertex from the indicated edge entry, otherwise use the first vertex from the edge.
that'll give you a loop of verticies, aka a triangle fan. get the actual vertex positions from the vertex loop.

textures come from surf->texinfo->texture. texture coords come from dotproduct(vertexcoord, surf->texinfo->vecs[S|T])-surf->texinfo->vecs[S|T][3];
lightmaps are overcomplicated. you'll need to calculate the texture coord extents, divide by 16 and round out to calculate the size of the per-surface lightmaps. then blend the up-to-four lightmaps per surface, atlas the result somehow according to the current lightstyle etc.

collision+pvs+ents+submodels are a different matter entirely, but they're half the fun. 
Oh Awesome 
Thanks you two!

I was thinking about writing a map validation tool that unzips, reads bsp, checks if everything is there and parseable. 
Quake Development CD 9/4/96 
I downloaded this file way back 2005. I had the impression it was able to recompile the quake.exe. By means of doing so I would be able to alter some of its components in the way I had the oppertunity to create my own "quake". The file is only 700kb large, has most of subdirectories full of *.c and *.h files.

Now I finally have it installed it looks as if I'm missing something. I knew I would get into trouble, reason I restrickted myself to qcc only.

Now I have a directory /quake/utils, tried the install.bat but get redrawn to D:QUAKE/UTILS/QCC>nmake /f "qcc.mak"CFG="qcc -WIN32 Release" The command or filename is incorrect.

Where should I start? 
 
I know there is a Install VC++ and MASM.
order, or use DJGPP to compile the dos version.

I'm downloading a file with 1Gb info , but I have no idea whee to begin. 
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.