Considering writing a QuakeC/Modding tutorial

Speaking of QuakeC I came across this tutorial playlist by MexiCouger a while back. The series uses FritzQuake opposed to a modern source port like FTE or Iron wail. It was made back in 2011 so the resolution on the video is not great.

 
  • Like
Reactions: Gibbon and Esrael
This is something I wanted to do for a while too, so if you want any help, or even a collab, just let me know.

Some points:
- SublimeText is a somewhat good alternative too. Even tho it doesn't have a specific QuakeC synthax highlighter, the standard C one works fine - you just cannot go specifically where some function was declared for example, but you do get a list of all its references. Plus, there's an FGD synthax plug-in for it that helps wonders. Also recently I came up with a simple build script to compile the progs from SublimeText itself using FTEQCC (no GUI), which is really helpful if you're insane like me and work with 3-4 mods at the same time.
- For Git/GitHub, one can use the standalone GitHub Desktop application that's really, really straightforward to use, more than vscode's integration I'd say.
- As for coding style: I'm an open-braces-on-the-same-line guy, but I use tabs for indentation, so well have to come to an agreement here if we want this to move on hahah

About the guide structure, I think that's good. I'll see if I come up with a skeleton for the rest of the content.
 
Last edited:
  • Like
Reactions: whipowill
I agree with bmFbr about GitHub desktop. For a complete newb to coding and Git, it has been a lifesaver and VSCode's built in is no where near as intuitive. If 4LT and bmFbr want, I can start on video scripts as they complete the documentation. If we collaborate this way, the videos can just get people started and the docs can be the more detailed, fine grain info. I'd love to help because it will fill in all those holes in my own knowledge!
 
Also here are 3 excellent QuakeC intro videos by Ryan Scissorhands. sadly there's no playlist and the series is incomplete. These are mainly dealing with weapons but there's a lot of great info. The only issues here are: it is very hard to see the code on the screen and Ryan is kind of all over the place at some points. You cannot beat edited videos for clarity. But then again I am an editor - so I am biased.

 
This is something I wanted to do for a while too, so if you want any help, or even a collab, just let me know.

Some points:
- SublimeText is a somewhat good alternative too. Even tho it doesn't have a specific QuakeC synthax highlighter, the standard C one works fine - you just cannot go specifically where some function was declared for example, but you do get a list of all its references. Plus, there's an FGD synthax plug-in for it that helps wonders. Also recently I came up with a simple build script to compile the progs from SublimeText itself using FTEQCC (no GUI), which is really helpful if you're insane like me and work with 3-4 mods at the same time.
- For Git/GitHub, one can use the standalone GitHub Desktop application that's really, really straightforward to use, more than vscode's integration I'd say.
- As for coding style: I'm an open-braces-on-the-same-line guy, but I use tabs for indentation, so well have to come to an agreement here if we want this to move on hahah

About the guide structure, I think that's good. I'll see if I come up with a skeleton for the rest of the content.
I just want to chime in on Sublime Text. There is an IDE for Windows, Mac and Linux called Kate. Which seems to be the successor to Kwrite. But that is besides the point. It also has .QC support but it is called "QuakeScript". There is also this for Kate in FTE Flavor.

There is also a QuakeC support for VSCode with intellisense support some where on gitlab. I will try to dig it up in the next few days if I can find it. :)

Just thought I would point this out for those of us who do not want to use SublimeText and have some form of intellisense with our IDE of choice.
 
Oh man, I almost forgot about this! I got sucked into toying around with engine stuff, haha!

Yeah, after reading some posts, I think I could go with different tools/styles, but the important thing is to be consistent IMO. I was leaning towards VScode because that's what I use at work, and since it decouples the editor *proper* from the IDE niceties provided through the "language server", it seemed like it would be the best bet for features tailored to QuakeC. There are other good options I/we could go with, it's just that my main concern is to not overwhelm newcomers with options up-front.
 
Yeah even though I'm used to Sublime I think vscode is more widely used nowadays. So it's something that people may even have installed/be familiar with already if they're seasoned coders.
 
This is a great idea. I just started modding Quake about 6 weeks ago and it was very difficult to find information online. Some links that I found that were helpful:
I never did find anything on CSQC but I was able to figure it out by looking at other people's code.

The "state of the game" is pretty complicated. Having a page to explain that would be pretty nice also. QuakeWorld vs NetQuake vs KEX, QuakeSpasm vs FTE vs Darkspaces, etc.
 
Clicked through into that Intro to QuakeC page, and--
...many built-in functions (functions prototyped in the QuakeC code but actually defined within the game engine and written in C) return strings in a temporary string buffer, which can only hold one string at any given time...
And here I was hoping that QuakeC would be a nice, simple, not-cursed language. Oh, well--at least it's not as bad as ACS's "int fixedPointNumber = 0.0" shenanigans...

There's a part of me that hopes little tripping hazards like this are fixed in FTEQCC.

EDIT: Also, not being able to add fields to anything that's not an entity is gonna be a pain, but I've already learned to use Thinkers as global info storage in GZDoom, so oh well. It does make me yearn for a feature-complete Rust game engine with TrenchBroom integration, though. Imagine having a real programming language and a good map editor...
 
Last edited:
  • Like
Reactions: Fairweather
While this is good, it doesn't really introduce you to how the language works for those who are starting out. Things like function declarations, parameters, variables, constants, QuakeC inheritance etc.. I was thinking something like a K&R C style mini book but for Quake C.
Yeah, that's the whole issue. We need a proper practical guide into the id1 codebase, how think functions work, how entities get initialized, how the standard functions are correlated, what happens when you fire a weapon, how monster AI works, etc. All we have is either those old-style, script-kiddie style tutorials without much explanation and background, or simply strict language documentation.
 
Yeah, that's the whole issue. We need a proper practical guide into the id1 codebase, how think functions work, how entities get initialized, how the standard functions are correlated, what happens when you fire a weapon, how monster AI works, etc. All we have is either those old-style, script-kiddie style tutorials without much explanation and background, or simply strict language documentation.
There are a couple of older tutorials out there. These really helped me with some of the items you list above and they go into some great details.

Getting Started and centerprint example
https://web.archive.org/web/20120625075110/http://elf.planetquake.gamespy.com/tutorials/tut1.htm
A simple weapon mod
https://web.archive.org/web/20120625075110/http://elf.planetquake.gamespy.com/tutorials/tut2.htm
More advanced weapon mod
https://web.archive.org/web/2012062...icliberationfront.co.cc:80/tutorials/tut3.htm

Also Shamblernaut made a flow chart (attached) a while back but I am not sure if it was ever completed.
 

Attachments

  • qc-map.pdf
    19.1 KB · Views: 78
I've been wanting to take the TC I'm working on, strip it down and turn it into a tutorial on how to do a non-shooter from scratch with FTE extensions, csqc-rendering, q3-specific features like shaders, custom hulls etc, and other FTE-focused tricks. But eh, seems like a ton of effort and I've never done a tutorial before so..

I've been able to mine a ton of useful info about fteextensions and csqc from Spike and other helpful people the past six+ months though. Off the top of my head, things like box-to-polygon collisions, render targets in csqc, how to set up shaders and pass uniforms to them in csqc. All this stuff is either poorly documented or not documented at all atm far as I can tell.

If you wanted to include an FTE-specific subsection I could make a list of my findings with usage-descriptions and maybe an example or two. Now I don't fully understand what I'm doing a lot of the time when it comes to FTE stuff :p But might help demystify csqc/fteextensions somewhat at least.
 
  • Like
Reactions: Gibbon