Author Topic: Compiling Quake 2 Source/ Making a DLL  (Read 3433 times)

Offline Greenwood

  • Newbie
  • *
  • Posts: 30
    • View Profile
  • Rated:
Compiling Quake 2 Source/ Making a DLL
« on: March 18, 2009, 03:13:04 PM »
Hi,

I'm pretty new to programming, but I've always wanted to make some mods for Quake 2, so I thought I'd have a go at it. There are some tutorials on the net about how to get simple bots going, but the tutorials don't really show you how to compile the Quake 2 source code with VS Express.

So anyway I downloaded the Quake 2 source code, and tried opening up the game.vcproj file in the latest version of VS Express. I compiled it, and it basically gave me a folder called debugaxp inside my src directory. Inside that were a couple of newly created dll files- gameaxp.dll.embed.manifest, and gameaxp.dll.intermediate.manifest. I'm pretty sure these aren't the right things you need to create for a mod though, because they're too small in size. Shouldn't it be outputting a gamex86.dll? That's what other mods seem to have in their directories.

Anyone know what I'm doing wrong here? Thanks.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline QwazyWabbit

  • Carpal Tunnel Member
  • ******
  • Posts: 1373
    • View Profile
  • Rated:
Re: Compiling Quake 2 Source/ Making a DLL
« Reply #1 on: March 18, 2009, 08:33:41 PM »
Can't remember the VS Express interface but I think it's on the main project page before you open any source files. (I use VC6, the best one they ever produced and haven't matched since)

Anyway, the project settings is what you want  and you want to disable the AXP build and enable the x86 (debug and release) builds. I would start with Quake2 sources and learn the IDE and how to build it, not sure where you got them but the original idSoftware 3.21 sources never had a .vcproj file, they were done with VC6 and they only had .dsp and .dsw files for the project and workspace.

You should download R1ch's sources for his r1q2 project, he's already using VC Exp and the project should almost be a no-brainer to set up in your environment by now. The complication with R1ch's sources is the 3rd party DLL's like zlib that he uses are not part of his projects and you will need to be able to download, install and configure those in addition to his project and that's a complication you are probably not ready for yet.

All the Q2 code is native on the compiled platform so there is no need for .NET or manifests yet so you can probably ignore that for now.

The game DLL source for vanilla DM and SP Q2 is in the 3.21 sources and it is this project that will become the basis of your mod.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline peewee_RotA

  • Brobdingnagian Member
  • ***
  • Posts: 4152
  • Hi, I'm from the gov'ment and I'm here to help you
    • View Profile
  • Rated:
Re: Compiling Quake 2 Source/ Making a DLL
« Reply #2 on: March 19, 2009, 04:31:45 AM »
I know that the project for the gamex86.dll selects the "Debug AXP" build by default. The drop down at the top should allow you to select "release".

Also, if you're only making game changes, you only want to compile the game project. Just right click the game project in the project explorer and press build. You may run into a problem with the game asking for a .dll that simply doesn't exist. The gamex86.dll does not require the windows DLL that it mentions in order to compile or run. So if you go to project->properties and select release you can look through all of the settings and remove that windows DLL. It's probably only listed in project->general and linking->general.

Debugaxp compiles without any issues from VS2005 Express out of the box. If you rename the debugaxp.dll that it generates to gamex86.dll and place it inside your mod directory, then it will functionally act the same as the release version. However the real solution is to get the release to build.
« Last Edit: March 19, 2009, 04:34:13 AM by peewee_RotA »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
GOTO ROTAMODS (rocketgib)
GOTO ROTAMAPS (fireworks)
HappyFriar- q2server.fuzzylogicinc.com
 Tune in to the Tastycast!!!!  http://dna.zeliepa.net

Offline Greenwood

  • Newbie
  • *
  • Posts: 30
    • View Profile
  • Rated:
Re: Compiling Quake 2 Source/ Making a DLL
« Reply #3 on: March 19, 2009, 04:45:32 AM »
Thanks for the detailed responses guys. I'll have a screw around with it the first chance I get. In the last couple of days I've been messing around with getting the botcore client side bot to work, just doing stuff like getting it to output when it notices a player, stuff like that. It's pretty bloody cool to play with. Hopefully I'll be able to figure out how to make my own dlls and make a server side bot work too, and maybe some other stuff.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline QwazyWabbit

  • Carpal Tunnel Member
  • ******
  • Posts: 1373
    • View Profile
  • Rated:
Re: Compiling Quake 2 Source/ Making a DLL
« Reply #4 on: March 19, 2009, 08:25:32 PM »
Debugaxp compiles without any issues from VS2005 Express out of the box. If you rename the debugaxp.dll that it generates to gamex86.dll and place it inside your mod directory, then it will functionally act the same as the release version. However the real solution is to get the release to build.

Huh? What?
AXP targets the DEC Alpha processor, you can't just rename it and get it to work on an x86 unless the new VCE simply writes x86 code instead of the Alpha. It wouldn't surprise me if MS simply dropped the Alpha code and output x86 instead.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline peewee_RotA

  • Brobdingnagian Member
  • ***
  • Posts: 4152
  • Hi, I'm from the gov'ment and I'm here to help you
    • View Profile
  • Rated:
Re: Compiling Quake 2 Source/ Making a DLL
« Reply #5 on: March 20, 2009, 03:36:04 AM »
Huh? What?
AXP targets the DEC Alpha processor, you can't just rename it and get it to work on an x86 unless the new VCE simply writes x86 code instead of the Alpha. It wouldn't surprise me if MS simply dropped the Alpha code and output x86 instead.

I thought it was strange too, but it was one of those "just get it to run" days when I found that out.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
GOTO ROTAMODS (rocketgib)
GOTO ROTAMAPS (fireworks)
HappyFriar- q2server.fuzzylogicinc.com
 Tune in to the Tastycast!!!!  http://dna.zeliepa.net

 

El Box de Shoutamente

Last 10 Shouts:

Costigan_Q2

November 11, 2024, 06:41:06 AM
"Stay cozy folks.

Everything is gonna be fine."

There'll be no excuses for having TDS after January 20th, there'll be no excuses AT ALL!!!
 

|iR|Focalor

November 06, 2024, 03:28:50 AM
 

RailWolf

November 05, 2024, 03:13:44 PM
Nice :)

Tom Servo

November 04, 2024, 05:05:24 PM
The Joe Rogan Experience episode 223 that dropped a couple hours ago with Musk, they're talking about Quake lol.

Costigan_Q2

November 04, 2024, 03:37:55 PM
Stay cozy folks.

Everything is gonna be fine.
 

|iR|Focalor

October 31, 2024, 08:56:37 PM

Costigan_Q2

October 17, 2024, 06:31:53 PM
Not activated your account yet?

Activate it now! join in the fun!

Tom Servo

October 11, 2024, 03:35:36 PM
HAHAHAHAHAHA
 

|iR|Focalor

October 10, 2024, 12:19:41 PM
I don't worship the devil. Jesus is Lord, friend. He died for your sins. He will forgive you if you just ask.
 

rikwad

October 09, 2024, 07:57:21 PM
Sorry, I couldn't resist my inner asshole.

Show 50 latest
Welcome, Guest. Please login or register.
November 23, 2024, 01:20:15 AM

Login with username, password and session length