Announcement

Collapse
No announcement yet.

A good quakec base?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • A good quakec base?

    I'm starting to code my new game, called Control. It uses the darkplaces engine. It will be a commercial endevour to be published on steam. It's about an engineer who must solve problems in order to progress through levels, but it will be non-linear, in that there will be many different problems to solve, so that different types of players are never stuck.

    I'm just starting to code in quakec. Not used it for well over 10 years! (2000? can't remember.)

    So my question is, what is a good base to start with? I currently have the original id software sources, but they are dated and full of bugs. I'd rather start with something that uses the more advanced techniques available due to newer releases of fteqcc and due to the darkplaces engine.

    Also, f**k me does it compile fast or what? I remember on my old 486dx4 100MHz, it took 10-60 seconds to compile. Now it's like waiting for "ls" or "dir" to finish. Once I get the darkplaces sources cracked open, I might look into the possibility of having a live coding environment, whereby you code directly in the engine, and the changes are immediate (Check out Bret Victor on youtube.)

    Another question, should I bother with svn/git for quakec sources? I'm not sure if they're big enough to clumsy around with it. Also, I am the only developer

  • #2
    if you're making a commercial game, you'll pretty much need a base mod that incorporates csqc, if only for the hud.
    I know of no decent basic mods that incorporate full csqc support. Its a rather significant paradigm shift from vanilla qc anyway. Thus I really can't suggest anything for you that's really suitable for your needs.
    You can try https://gitorious.org/cleanqc as a base for your ssqc parts.

    hash tables added to the qcc are what's changed since the 486 days, they're much faster.
    qclib (including fteqcc) can supposedly be compiled as a library/shared object with 'make qcvm.so' in the right directory (but you'll probably need to tweak it a bit for windows, apparently).
    See qclib's test.c's 'compile' function for an example.
    See qclib's progslib.h for the public interface (although much of that won't be relevent).

    If you're going to spend a long time writing something, some version-control system hosted by a remote server can be a godsend if only as a mirror. It can also be helpful to diagnose regressions etc too, even if its only you coding it.
    Some Game Thing

    Comment


    • #3
      The new features provided by compilers like fteqcc are something you'll use for your new code - there is no qc base that was upgraded to use switches, for loops, and arrays. That's stuff for you to use

      I also recommend looking into csqc for your HUD and GUI - it is client-side qc (if you'll remember, quake is server/client architecture).

      I assume you're in talks with Lord Havoc, it is really important for the engine developer/s to be aware and supportive of your project.

      I'm developing a game in a similar way to yours, only I use FTE instead of DP. Do you have a dev blog or something? Mine is in my sig.
      Scout's Journey
      Rune of Earth Magic

      Comment


      • #4
        Using DP? Here is a clean QC source with all of the DP stuff included (player physics, dpextensions). It also has a CSQC source and a version of NP++ with QC syntax hilighting, compile menu's blah blah blah.

        It's my QC development environment and it is very thorough. There are some extras (triggerable weather, rotating entities, other stuff) those things wont do you much good without the Radiant .ent to describe them. YOu can either go L337 and figure out my source to write your own, or I can simply post a link to my .ent.

        edit: Actually GB is half correct. I started modernizing QC a long time ago, but I never completed it. It's not as simple as you might think. I completely revamped the player code and on the surface there was no reason why it shouldn't work, it didn't work. I do not intend to share this source though. Not because it is incomplete, but because (when/if) I ever finish it, I will be using it personally.

        Also note that arrays are slow in QC. I wouldn't rely on trying to make 'lookup' tables for everything. Your code will crawl. For instance, lets say you homogonized the monster code with switches to where there was only 1 monster code and all monsters used it. Then let's say that you stuck all the specific data that needs to be injected into that one code in arrays (maybe even faking a multi-dimensional array), then of course plug all that into a loop...that would be great in an optimized way and epic garbage in a QC way.
        Last edited by MadGypsy; 04-10-2013, 09:20 AM.
        http://www.nextgenquake.com

        Comment


        • #5
          Originally posted by Spike View Post
          You can try https://gitorious.org/cleanqc as a base for your ssqc parts.
          This is basically a cleaned version of the original qc source?

          Originally posted by Spike View Post
          hash tables added to the qcc are what's changed since the 486 days, they're much faster.
          And also that a Core i7 is orders of magnitude faster than a 486

          Originally posted by golden_boy View Post
          I assume you're in talks with Lord Havoc, it is really important for the engine developer/s to be aware and supportive of your project.
          No, but now that you've said that...I will contact him immediately. Actually on another topic, I did send that email about baking lightmaps in blender, which he responded to rather quickly. But I didn't like the the answer ~ sounds like too much coding. There's quite a few other problems too. I then spent 2 weeks playing with q3map2 until I got results which I was surprised with and also happy about.

          Originally posted by golden_boy View Post
          I'm developing a game in a similar way to yours, only I use FTE instead of DP. Do you have a dev blog or something? Mine is in my sig.
          I know. I've read your blog gazillions of times. When I was researching particular things, your blog kept coming up in google searches It's a plethora of useful information, and I got netradiant working smoothly due to your tutorial. So thanks for that. I've been thinking about a dev blog too, but if I do one, I want it on my own domain. So I need to decide on a name for my game and buy the domain...that would be annoying at this early stage. I highly doubt "Control" is available as a game name. If I cave in, I'll let you know.

          Originally posted by MadGypsy View Post
          Using DP? Here is a clean QC source with all of the DP stuff included (player physics, dpextensions). It also has a CSQC source and a version of NP++ with QC syntax hilighting, compile menu's blah blah blah.
          That is awesome. Just what I needed, thank you kindly.

          Comment


          • #6
            in my QC dev environment, while in notepad++ if you press cntrl+f1 it will give you a compile menu for QC and cntrl+f2 will do the same for CSQC. If you look in the RUN menu you will find all my shortcuts if you forget. There is a third shortcut (run radiant) but unless you have your radiant in the exact same relation to notepad++ that i do (you wont) it is not going to work. You cxould easily edit the path to make it work though.

            Other than that it is everything you need. also..QuakeC.pdf is the entire QC manual. Basically everything you need to know about QC is in that manual.
            http://www.nextgenquake.com

            Comment


            • #7
              or instance, lets say you homogonized the monster code with switches to where there was only 1 monster code and all monsters used it. Then let's say that you stuck all the specific data that needs to be injected into that one code in arrays (maybe even faking a multi-dimensional array), then of course plug all that into a loop...that would be great in an optimized way and epic garbage in a QC way.
              wagh, that would be quite horrible indeed.

              Funnily enough, I'm doing something similar with my loot items atm. Because keeping them in a giant struct array is still better than having them all be individual entities...

              Switches are often quite useful to replace long chains of ifs. And for some things, arrays might still be the easiest way.

              Regarding a qc base with "all the Darkplaces stuff added", be aware that having unused stuff in your progs is also a good way to bloat it. It should only contain the stuff that's actually used. Hence I would suggest starting with cleanqc (this is what cleanqc is there for - an error-free, cruft-free qc source) and using Gypsy's code as a reference.
              Scout's Journey
              Rune of Earth Magic

              Comment


              • #8
                It's primarily modular, all he has to do is comment it out in the progs.src

                I'm ahead of ya'

                Also, my code is cleanQC... one that is really clean (cause cleanQC is not clean).
                Last edited by MadGypsy; 04-14-2013, 12:32 AM.
                http://www.nextgenquake.com

                Comment


                • #9
                  Then the argument is reduced to "give a man a fish" once again
                  Scout's Journey
                  Rune of Earth Magic

                  Comment


                  • #10
                    Yes it is, sir. This is why I made it, so people don't have to mess around with a bunch of dumb stuff. They can get right to work on what they want to make (primarily for DP). I was also careful to only really include add-ons that add functionality to the map. There are no super-duper weapons, new monsters etc. Just dpextensions, player physics, my triggerable weather and your rotating entities (which I fixed for you by the way - you had a compile warning. I forget what I did but it was simple and it didn't break anything.)
                    http://www.nextgenquake.com

                    Comment


                    • #11
                      dumb stuff? That's what builds character. ;-)
                      Scout's Journey
                      Rune of Earth Magic

                      Comment


                      • #12
                        Yeah, I've been having a problem lately with 2 things (choice of words and focus at work). Understand that in my mind "dumb stuff" was being associated with handfuls of posts instantaneously {snapping quickly} flashing through my mind explaining how changing those things generally throws the game off balance. That became shortened to "dumb stuff".

                        ...and then elongated to this post. (DOH!)
                        http://www.nextgenquake.com

                        Comment


                        • #13
                          If anyone is still interested in a "clean" QuakeC code in 2022, then maybe have a look here: https://github.com/maddes-b/QuakeC-r...ee/id1-cleanup
                          Last edited by Maddes; 08-30-2022, 02:21 PM.

                          Comment

                          Working...
                          X