Author Topic: Updated AprQ2 for Mac and Linux users  (Read 54218 times)

Offline Jay Dolan

  • Swanky Member
  • *****
  • Posts: 644
    • View Profile
    • Quetoo.org
  • Rated:
Updated AprQ2 for Mac and Linux users
« on: February 24, 2011, 04:59:12 AM »
Hi,

Anyone looking to play Quake2 on a Mac or on Linux might want to check out my maintenance effort for the AprQ2 engine:

http://jdolan.dyndns.org/trac/wiki/AprQ2

This "fork" of AprQ2 is based on the 1.211 source code, and is mostly focused on portability and stabilization.  You get the latest and greatest AprQ2 release, plus some useful things like updated R1Q2 Protocol 35 support and high-resolution conchars when using gl_scale > 1.0.  The INSTALL guide walks you through setup and installation of the game data plus a few recommended pieces such as R1CH's high-resolution texture pack.

Most recent changes include:

- Support for Mac OSX via SDL, libjpeg and libpng
- Fixed numerous compiler warnings for 64 bit architectures
- Fixed multithreaded SDL audio crash on Linux
- Fixed conchars crash when using gl_scale > 1.0
- Updated INSTALL and CONFIG documentation

Full CHANGELOG is available too, if you're interested.

Compiling it on either platform is actually pretty darn easy if you install the dependencies in the same manner required for Quake2World.  See http://quake2world.net/books/documentation/installation-maintenance for platform-specific instructions.

Hope this helps the handful of Linux and Mac Quake2 fans out there  :lolsign:

Offline [BTF] Reflex

  • Loquaciously Multiloquent Member
  • ****
  • Posts: 5324
  • !
    • View Profile
  • Rated:
Re: Updated AprQ2 for Mac and Linux users
« Reply #1 on: February 24, 2011, 05:17:16 AM »
erik is going to creampie all over this,  or he should anyhow.
  • 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
Sometimes I think it’s a sin when I feel like I’m winnin’ when I’m losin’ again

Offline erik

  • Full Member
  • ***
  • Posts: 187
    • View Profile
  • Rated:
Re: Updated AprQ2 for Mac and Linux users
« Reply #2 on: February 24, 2011, 09:00:32 AM »
Can someone with decent computer literacy walk me through the steps I would need to take to install this and get it working?

I read through the installation guide and I don't even know where to begin.
  • 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 Jay Dolan

  • Swanky Member
  • *****
  • Posts: 644
    • View Profile
    • Quetoo.org
  • Rated:
Re: Updated AprQ2 for Mac and Linux users
« Reply #3 on: February 24, 2011, 09:05:42 AM »
Are you on Mac or Linux?  I can walk you through it.  If you're on Mac, you should get started by installing MacPorts.  Once you have that, the rest is easy (and MacPorts isn't difficult to install either -- plenty of guides out there).  If you're on Ubuntu, installing the dependencies is dead simple.

Offline erik

  • Full Member
  • ***
  • Posts: 187
    • View Profile
  • Rated:
Re: Updated AprQ2 for Mac and Linux users
« Reply #4 on: February 24, 2011, 09:57:30 AM »
OS X Snow Leopard
  • 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 Jay Dolan

  • Swanky Member
  • *****
  • Posts: 644
    • View Profile
    • Quetoo.org
  • Rated:
Re: Updated AprQ2 for Mac and Linux users
« Reply #5 on: February 24, 2011, 01:07:41 PM »
Is MacPorts installed?  Once MacPorts is installed, you can type:

sudo port install libsdl_image libsdl_mixer subversion

That will actually install a little more than you need, but it's probably the easiest way to get it done.  That command will take some time, as your computer will download, compile and install a bunch of packages.

After that, you should perform a Subversion "checkout" of the AprQ2 code base.  This is very easy:

cd ~/
svn co svn://quake2world.net/aprq2/trunk aprq2

You'll see that it downloads all of the source files.  Then change to that directory and compile it:

cd aprq2
make

The rest of the instructions are called out in the INSTALL file.

Hope this helps.  If it doesn't, I *might* try making a .dmg for you this weekend.  It would still require that you provide pak0.pak, tho, as that file can not be distributed freely.

Jay

« Last Edit: February 24, 2011, 01:09:56 PM by Jay Dolan »
  • 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 erik

  • Full Member
  • ***
  • Posts: 187
    • View Profile
  • Rated:
Re: Updated AprQ2 for Mac and Linux users
« Reply #6 on: February 24, 2011, 03:39:49 PM »
As long as I have an existing pak0, I can just move that into a new directory (along with the hi-res texture paks), correct?

I can give your instructions a shot, as for a .dmg, I would be eternally grateful (those screenshots looked absolutely incredible). 

I won't have a chance to try any of this out for another 4 hours (when I get home from work).
  • 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: 1372
    • View Profile
  • Rated:
Re: Updated AprQ2 for Mac and Linux users
« Reply #7 on: February 24, 2011, 07:01:30 PM »
I had to do this on my OS X Snow Leopard system:

Xcode has to be installed and updated if you didn't already install it, use the OS X system install DVD to install the optional Xcode tools and the command line tools.

Get the Java Developer Package from here:
http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20719
Use your Apple membership ID to log in to get this tool. You DO NOT need to sign up for the $99 Mac Developer Program to get the packages or the updates.

Get the MacPorts installer here http://www.macports.org/index.php
Install MacPorts and then do the command Jay posted above. This will take a while depending on your internet connection speed.

Then build the Aprq2 system.

Jay, I got the following error at the end of the build:


Undefined symbols:
  "_png_set_gray_1_2_4_to_8", referenced from:
      _LoadPNG in gl_image.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [releasei386/aq2] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [release] Error 2

Build log shows:


gcc -funsigned-char -pipe -D__APPLE__ -I/opt/local/include -DUSE_CURL -DUSE_SDL -Wall -O2 -DNDEBUG -DGL_QUAKE -o releasei386/q2glx/gl_image.o -c ref_gl/gl_image.c
ref_gl/gl_image.c: In function ‘LoadPNG’:
ref_gl/gl_image.c:1045: warning: ‘color_type’ is deprecated (declared at /opt/local/include/png.h:661)
ref_gl/gl_image.c:1051: warning: ‘color_type’ is deprecated (declared at /opt/local/include/png.h:661)
ref_gl/gl_image.c:1051: warning: ‘bit_depth’ is deprecated (declared at /opt/local/include/png.h:659)
ref_gl/gl_image.c:1052: warning: implicit declaration of function ‘png_set_gray_1_2_4_to_8’
ref_gl/gl_image.c:1057: warning: ‘color_type’ is deprecated (declared at /opt/local/include/png.h:661)
ref_gl/gl_image.c:1057: warning: ‘color_type’ is deprecated (declared at /opt/local/include/png.h:661)
ref_gl/gl_image.c:1060: warning: ‘color_type’ is deprecated (declared at /opt/local/include/png.h:661)
ref_gl/gl_image.c:1063: warning: ‘bit_depth’ is deprecated (declared at /opt/local/include/png.h:659)
ref_gl/gl_image.c:1065: warning: ‘bit_depth’ is deprecated (declared at /opt/local/include/png.h:659)
ref_gl/gl_image.c:1072: warning: ‘width’ is deprecated (declared at /opt/local/include/png.h:647)
ref_gl/gl_image.c:1073: warning: ‘height’ is deprecated (declared at /opt/local/include/png.h:648)
ref_gl/gl_image.c:1087: warning: ‘channels’ is deprecated (declared at /opt/local/include/png.h:672)
  • 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 q2dude

  • Jr. Member
  • **
  • Posts: 83
    • View Profile
  • Rated:
Re: Updated AprQ2 for Mac and Linux users
« Reply #8 on: February 25, 2011, 12:40:22 AM »
Hey Jay,

I have some updates for your fork of AprQ2 that I'd like to see if you'd be interested in.  I've tested (most of) this against SVN revision 931.

See the attached files.

Here's the changelog for my updates:
Quote
- Added "pain pics" to be used as either an ehancement or replacement for gl_polyblend 1.  Similar effect to modern shooters when getting shot.  (Uses attached pain_health.tga and pain_armor.tga. Note: These need to be scaled in code based on the resolution; currently these images are for 1920x1200 resolution.)
- Crosshair grows or stretches upon picking up an item, similar to modern shooters. (Not perfect; notice the item pickup text flashes when using CL_AddPainPic2(), e.g. while spectating as it's coded.)
- Created a nice and simple crosshair to be used with or without the crosshair stretch effect (See ch8.tga).
- Added bobbing items; weapons/armor will bounce or bob, similar to Quake3. (cl_bobbing_items)
- Added gl_timebasedfx; the world light and fog level is controlled based on the time of your computer.  (gl_fog must be set to 1 (on) for fog level to be controlled)
- Increased CMD_BACKUP from 64 -> 256 (Makes it less likely that you will freeze in place with only minimal packet loss)
- Added cl_draw_playername, cl_draw_playername_x, cl_draw_playername_y from Q2PRO (view player names by pointing at them in game)
- Added cl_smoothsteps from R1Q2 (only cl_smoothsteps 3 from R1Q2 is active when cl_smoothsteps > 0 is set) (Not a complete port from R1Q2, but seems to work.. albeit a bit glitchy?)
- Allowed use of cl_maxpackets while cl_async is active; IIRC, it helps to save even more bandwidth, which I need.
- Updated functions CL_LoadClientinfo and S_RegisterSexedSound() to better cope with some of the "skin" variable hacks such as "skin female/../male/grunt" or such. (Not perfect, but almost*.)
- Fixed netgraph for widescreen resolutions (atleast up to the 1920x1200 that I use) (Needs to be fixed to scale by resolution; currently a hard-coded value.)
- Increased CON_TEXTSIZE from 65536 -> 1048576 (1 MiB of console text) (I like to read the scrollback after several games ;)
- Modified m_accel code on Linux (for good or bad)
« Last Edit: February 25, 2011, 12:58:17 AM by q2dude »
  • 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 VaeVictis

  • i was -1 because you fucking suck
  • Brobdingnagian Member
  • *
  • Posts: 4498
    • View Profile
  • Rated:
Re: Updated AprQ2 for Mac and Linux users
« Reply #9 on: February 25, 2011, 01:35:20 AM »
will give this a try in crunchbang tomorrow :) look forward to it... so far, i havent got a single game to compile right in crunchbang >_> and i have no clue why...
  • 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 [BTF]Dizzy

  • Full Member
  • ***
  • Posts: 141
    • View Profile
  • Rated:
Re: Updated AprQ2 for Mac and Linux users
« Reply #10 on: February 25, 2011, 04:40:21 AM »
Same here, haven't had time to dig deeper. I'll take a look this weekend though, unless Jay has a quick answer.


Jay, I got the following error at the end of the build:


Undefined symbols:
  "_png_set_gray_1_2_4_to_8", referenced from:
      _LoadPNG in gl_image.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [releasei386/aq2] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [release] Error 2

  • 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 Jay Dolan

  • Swanky Member
  • *****
  • Posts: 644
    • View Profile
    • Quetoo.org
  • Rated:
Re: Updated AprQ2 for Mac and Linux users
« Reply #11 on: February 25, 2011, 05:49:43 AM »
Hm, looks like you guys ended up with a different version of libpng than me.  I'll be sure to update my ports tree and try the build again.  Hopefully it's a minor fix, I'll check it in, and you guys can just `svn up` and try again.

Unfortunately (well, not really :D) today is my last day at my current job, and so I'll be without a Mac just for this weekend.  I start a new job on Monday, and I think I'll be getting one of the brand new Macbook Pros (score!).  So there's some chance I won't be able to address this at all until next week.. but I'll try.

Just out of curiosity, can you guys tell me what version of libpng you have installed?

`port list installed | grep png`

Mine says 1.4.5.

q2dude, some of those changes would be welcome additions for sure.  Can you join #quetoo on Freenode and we'll discuss further?  Ideally, we can decide on which of your features are stable enough and then set you up with Subversion access so you can commit them directly.

Jay

Offline Jay Dolan

  • Swanky Member
  • *****
  • Posts: 644
    • View Profile
    • Quetoo.org
  • Rated:
Re: Updated AprQ2 for Mac and Linux users
« Reply #12 on: February 25, 2011, 06:23:43 AM »
Yep, MacPorts just recently started including libpng 1.4, while previously they were at 1.2.  1.4 changed a few function names around, and that's where that unresolved symbol came from.  If you `svn up`, you should now be able to compile the game.  The deprecation warnings are still there, but everything works (including loading of PNG textures).  I'll squash those warnings soon, too..

Thanks for pointing this out to me!

Jay

Offline [BTF]Dizzy

  • Full Member
  • ***
  • Posts: 141
    • View Profile
  • Rated:
Re: Updated AprQ2 for Mac and Linux users
« Reply #13 on: February 25, 2011, 06:43:24 AM »
Worked like a charm! Thanks so much.
  • 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: 1372
    • View Profile
  • Rated:
Re: Updated AprQ2 for Mac and Linux users
« Reply #14 on: February 25, 2011, 06:47:26 AM »
Yep, libpng is at 1.4.5 on MacPorts.
Did svn up and all is well, good build all around.

Nice job Jay. 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

 

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 22, 2024, 07:13:38 AM

Login with username, password and session length