Announcement

Collapse
No announcement yet.

Engine Compilation TroubleShooting

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

  • Engine Compilation TroubleShooting

    So I decided to play around with some engine code for shits and giggles.

    I grabbed the most recent source release for QuakeSpasm and also Code::Blocks with the MinGW GCC compiler. After some dicking around and researching on the internet, I've managed to fully compile QuakeSpasm and it runs quite nicely.

    However, as soon as I load a mod other than id1, it takes a shit and dumps me to the desktop. I tried compiling with both SDL and SDL2, both executables do the same thing. I might add that these are proven mods (like Arcane Dimensions), so I'm pretty sure it's not mod related.

    I've made sure that all DLLs are correct and in the right place (wouldn't run period if they weren't). I know there is a lesson to be had in this, just not sure what it is. Theoretically, if the source code is indeed the exact code used to build the latest QuakeSpasm (which appears to integrate SDL2 based on the mouse fluidity), then my compilation should be exactly the same. Or is my IDE/compiler doing something weird? The QuakeSpasm manual states the released build was compiled through MinGW, but perhaps it was through a path to the command prompt, and not through Code::Blocks?

    Just curious if anyone knows what I'm dealing with here.
    'Replacement Player Models' Project

  • #2
    Just stuff here

    a) And engine that depends on a ton of dlls just to run is not the right kind of engine to learn with.

    b) CodeBlocks is maybe the nicest IDE available on Linux. That being said, CodeBlocks is a very horrible IDE compared to Visual Studio in far too many ways to even list and it is royal pain debugging in CodeBlocks even if they have lots of experience.

    There are instructions in the following thread for something more suitable for someone new, if you are interested.

    InsideQC Forums • View topic - Lit liquids

    Whatever you decide to do, the important thing is that enjoy learning. (Because with engine coding and being new to it, that's the only joy you'll have when you start out, hehe.)
    Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

    So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

    Comment


    • #3
      to compile natively in linux, just go into the trunk/quakespasm/Quake/ directory and run make. easy.
      to compile natively on windows, make sure you've got mingw+msys installed and then just go into the trunk/quakespasm/Quake/ directory and run 'make -f Makefile.w32'.
      to cross-compile from linux, or via cygwin, run one of the the build_cross_win*.sh scripts. You may need to edit it to use a different compiler target/prefix if you're using some other variant of mingw.

      add -j$CPUCOUNT where $CPUCOUNT is some suitable value if you want a little more speed out of make. its not uncommon to add 1 or two to cover disk latencies.

      I have no idea about code::blocks, nor do I care. iirc I used it once, nuff said. I assume you can tell it to just use a 'makefile-based' project or something, and it might be able to figure out the rest, so long as you tell it what commandline to use for make.

      when it comes to debugging, gdb is kinda annoying and shit, but it does have its uses. I personally find that running something in valgrind is a lot more useful, if only for a simple usable stack trace when it does crash. GDB is quite powerful, but it changes the behaviour of code too often for it to actually be useful, in my experience.
      gdb --args MyProgram +_windowed_mouse 0 -basedir somewhere -game foobar<press: enter>run<get it to crash without mouse grabs active>bt full<try and figure out what the hell that stack trace actually means with all the gibberish spewed throughout it>
      You should normally then be able to figure out the area of code that is at fault, incluing the symptoms, and now you just have to figure out the cause. yay debugging. its like detective work, but you don't get to meet new (murderous/vilainous) people, hurrah.
      Some Game Thing

      Comment


      • #4
        Awesome, thanks for the replies guys.

        Originally posted by Baker View Post
        And engine that depends on a ton of dlls just to run is not the right kind of engine to learn with.
        I was beginning to think that. There's a lot happening that isn't readily available for me to interpret with external stuff. Kinda throws a wrench in the learning curve. I'm going to start over with a simpler engine, and download Visual Studio. And thanks for the link!

        Whatever you decide to do, the important thing is that enjoy learning. (Because with engine coding and being new to it, that's the only joy you'll have when you start out, hehe.)
        Pretty much the only reason I'm interested is learning, so I should be ok haha

        Originally posted by Spike
        to compile natively in linux, just go into the trunk/quakespasm/Quake/ directory and run make. easy.
        to compile natively on windows, make sure you've got mingw+msys installed and then just go into the trunk/quakespasm/Quake/ directory and run 'make -f Makefile.w32'.
        to cross-compile from linux, or via cygwin, run one of the the build_cross_win*.sh scripts. You may need to edit it to use a different compiler target/prefix if you're using some other variant of mingw.
        thanks for the explanation. I originally started off trying to natively build it and kept getting tripped up. This should get me on the right track.

        ====

        i'm gonna hit the sack tonight, but i have a lot of reading/learning to do tomorrow from your guys' comments. Looking forward to it, QC was getting a little stale. Much appreciated, thanks!

        EDIT: forgot to mention, i'm running windowsXP 32bit for an OS (i know it's ancient, but it's damn reliable)
        'Replacement Player Models' Project

        Comment


        • #5
          That big reply of Spike's was Spike's way of saying he generally uses Visual Studio
          Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

          So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

          Comment


          • #6
            hahaha yeah I was getting that impression! I got 2 of the top engine coders here telling me to go visual studio, so....code::blocks is going in the recycle bin lol
            'Replacement Player Models' Project

            Comment


            • #7
              If you are Linux and you are using CodeBlocks, it is because it is an "ok" IDE and there are few choices.

              If you are on Windows and using CodeBlocks, you better have a very good reason for using it.

              And there are a few reasons to use CodeBlocks on Windows, one of them is to use GCC as a compiler to make sure something compiles ok on GCC. Another great thing about CodeBlocks is you can have the Linux version and the Windows version in the same project.

              GCC also has some superior compiling capabilities from the perspective of an knowledgeable coder that aren't available in Visual Studio --- but these kinds of things are mostly important in a final distribution of something "done" -- not the actual process of writing/debugging code.

              But in general Visual Studio has so many advantages over CodeBlocks in debugging it's just crazy.

              And if you find someone using CodeBlocks on Windows and ask probing questions, 9 times out of 10 you'll find out they didn't make the choice to use it from a position of being knowledgeable but made the choice to use it from a position of NOT being knowledgeable.
              Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

              So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

              Comment


              • #8
                Finally found time to get Visual Studio 2008 up and running. Took some effort, I've never had to mount an image to a virtual drive before. MUCH nicer than CodeBlocks. And the fitzquake_plus I DL'd from your link at inside3d has some seriously clean code. Much obliged for the point in the right direction, baker.

                Question: is service pack 1 for VS a must-have? Or do I have enough for the time being?
                'Replacement Player Models' Project

                Comment


                • #9
                  Originally posted by Dutch View Post
                  Question: is service pack 1 for VS a must-have? Or do I have enough for the time being?
                  You can use it without the service pack.

                  Let us know how not following the provided instructions works out.

                  I'm just saying, you'll have a plenty miserable time with low-level coding if you can't follow instructions. Low-level coding is not nice, it is very cruel and unforgiving.
                  Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

                  So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

                  Comment


                  • #10
                    Originally posted by Dutch View Post
                    Question: is service pack 1 for VS a must-have? Or do I have enough for the time being?
                    Dutch ... you are good guy.

                    I want to show you what happens to people who don't follow instructions when working with low-level code:

                    I wrote an MP3 tutorial back a few years ago. It was based on the work of MH and Reckless/Revelator.

                    Here is guy deciding he'll just do whatever he wants ...

                    InsideQC Forums &bull; View topic - MP3 Support

                    Look how much of his own time he wasted.
                    Look at how much of other people's time he wasted.

                    MH started getting upset with him.

                    Then when this guy told us he was doing "his own thing", hahaha -- sheesh.

                    With low-level code, if you do not dot every I and cross every T, it will wreck you.

                    /It's a good read
                    Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

                    So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

                    Comment


                    • #11
                      Alrighty, service pack 1 it is, then
                      'Replacement Player Models' Project

                      Comment


                      • #12
                        Why no one bringing up eclipse CDT?

                        Comment


                        • #13
                          Originally posted by bloodsnipe View Post
                          Why no one bringing up eclipse CDT?
                          Write us up instructions on how to compile Quake using that.

                          And include a project file for that environment.
                          Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

                          So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

                          Comment


                          • #14
                            Originally posted by Baker View Post
                            And include a project file for that environment.
                            x2

                            Every engine i've downloaded so far has either visual studio or codeblocks projects. Or both. Given my lack of knowledge on the subject, the last thing a beginner like me wants is more variables to struggle through.
                            'Replacement Player Models' Project

                            Comment

                            Working...
                            X