Author Topic: Porting to mac (need some info)  (Read 4034 times)

BinarySpike

  • PGP
  • Posts: 19
Porting to mac (need some info)
« on: May 04, 2006, 11:31:00 PM »
I need some info on what exactly DP does... that is platform specific... you guys probably know this info... I can't test it but I have several linux friends that play and well... us mac dudes from bzflag can't play... so I'm gonna port it... there's not much code...

From what I can tell you can run CD tracks ingame... (strange... never thought of doing that on mac)

And you have events... (mac events in C++ == carbon)

OpenGL (cross-platform)

Do you use STL at all?

BSD sockets right? I hope so... if not then your networking is probably bad... I also see you use Quake Engine... is there a mac port?

Also, what are all the needed libraries? like do you use zlib? libcurl? do you compile shared libraries and then compile them on the client? where is the server?

(you can see I need a ton of info... I have the source... and I know enough about programming to port it)

I didn't see any porting tips or info... and I'm just now browsing this forum...

Thanks, ;)
-BinarySpike

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Porting to mac (need some info)
« Reply #1 on: May 05, 2006, 01:48:52 AM »
CD tracks are disabled by default.  You won't need them.  I don't think anybody uses that feature.  Your best bet would be to work off of the Linux port since OSX is unix-based now.  There may be some OSX Quake2 ports that can help you out, too.  The OS-specific code is in its own directory (just win32 and Linux now) and uses native API for most of the stuff, but you could certainly use STL to take care of that.  The graphics are all OpenGL.  The linux socket code should port over pretty directly to OSX.  I think libjpeg is the only external library you need.  The server and client are compiled into the same executable.  You can make a separate makefile, though, to make JUST a server, but I haven't seen a need for that.

Dirty_Taco

  • Map Committee
  • Autococker
  • Posts: 1630
_
« Reply #2 on: May 05, 2006, 11:52:02 AM »
Post removed
« Last Edit: July 26, 2010, 12:47:51 AM by Dirty_Taco »

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Porting to mac (need some info)
« Reply #3 on: May 05, 2006, 11:59:49 AM »
Is there a way to cross-compile for the mac platform?  If you manage to get this working, it would be nice to have a way to keep it up-to-date without having to rely on somebody who owns a mac.  Also, now that there are x86 macs... how does that work out?  Will we need an x86 version and a PPC version?

BinarySpike

  • PGP
  • Posts: 19
Re: Porting to mac (need some info)
« Reply #4 on: May 05, 2006, 06:26:36 PM »
Is there a way to cross-compile for the mac platform?  If you manage to get this working, it would be nice to have a way to keep it up-to-date without having to rely on somebody who owns a mac.  Also, now that there are x86 macs... how does that work out?  Will we need an x86 version and a PPC version?

Gcc might support cross-platform compling... not sure...
(like architecture building)

You can create ONE binary that works on rosetta and ppc at the same time... (Universal Binary, but that only works on 10.3 and up)

I run 10.2 so I can't do rosetta builds :( but I know ppl who can...

SDL would make it cross-platform to all platforms... that would be awesome... but I don't know SDL, I know carbon very well... and OpenGL so I can easly port it...

and btw, if I compile it it will work on 10.1+ (which is nice)

I will have to learn some OpenGL things... like fonts... etc. etc... never done that... but NeHe will have the code needed...

and if you use shaders/anistroptic filtering *shudder* I will not be able to test it... I only have Rage 128 Pro (At least I think it's pro)

*edit*
I need some help... if somebody could get me on AIM, MSN, or YIM so I could ask some questions... that would be great :D

iBinarySpike (AIM)
BinarySpike[[at]hotmail[dot]]com (MSN) (don't send me mail here it causes me problems)
BinarySpike (YIM)

BinarySpike

  • PGP
  • Posts: 19
Re: Porting to mac (need some info)
« Reply #5 on: May 05, 2006, 07:47:05 PM »
Btw, I see OpenAL and ogg vorbis, I don't know what q2a3d is for either... or a3d, if somebody could catch me on IM I could probably do this in a day or two

(just don't try on thursdays... those are my *no computer* days... I'm not on most of the day busy with other things)

BinarySpike

  • PGP
  • Posts: 19
*confused*
« Reply #6 on: May 05, 2006, 08:03:25 PM »
I'm confused... do I need Quake to run this program?

TinMan

  • Autococker
  • Posts: 1347
Re: Porting to mac (need some info)
« Reply #7 on: May 06, 2006, 11:53:07 AM »
You can just install Linux binary compatability in Mac I'm pretty sure, that's what all my friends use to run their linux apps on their Mac laptops.

Dirty_Taco

  • Map Committee
  • Autococker
  • Posts: 1630
_
« Reply #8 on: May 06, 2006, 12:19:22 PM »
Post removed
« Last Edit: July 26, 2010, 12:47:33 AM by Dirty_Taco »

XtremeBain

  • Developer
  • Autococker
  • Posts: 1470
Re: Porting to mac (need some info)
« Reply #9 on: May 06, 2006, 03:46:03 PM »
This game used to be a Quake 2 mod.  However now it is a completely stand-alone game based on the Quake 2 open-source engine.  id doesn't typically release Mac ports of their engines(read: games) they typically have another company perform the porting and possibly the publishing of the title(I think Aspyr does it?).  This being said, all the Mac Quake engine code is not included in the open-source code that id has released, which means the community has to port the code themselves.  Now there have been some projects which have been dedicated to porting the Quake 2 engine to OS X (I'd start by checking out www.quakesrc.org).  jitspoe hasn't spent any time making Paintball2 compatable with OS X simple because he doesn't have the necessary Mac hardware to do so, and there hasn't been a terribly high demand.

Dirty_Taco

  • Map Committee
  • Autococker
  • Posts: 1630
_
« Reply #10 on: May 06, 2006, 06:33:28 PM »
Post removed
« Last Edit: July 26, 2010, 12:47:27 AM by Dirty_Taco »

TinMan

  • Autococker
  • Posts: 1347
Re: Porting to mac (need some info)
« Reply #11 on: May 06, 2006, 07:03:21 PM »
Yes it is, but if you search it here on the forums you'll see that it doesn't have mod support.

BinarySpike

  • PGP
  • Posts: 19
Re: Porting to mac (need some info)
« Reply #12 on: May 07, 2006, 08:33:24 AM »
Thanks guys for the quake info...

I'll check out the IRC 8)
(I looked on freenode)

I tried installing linux on this machine but it wouldn't boot from the installer disk (Suse)

Also, not everybody knows what linux is, I doubt some n00bs would understand how to run the game...

btw, my friend (AlliedArmour) loves this game, so I don't think I'm just gonna port it and disappear... I'm a bzflag fan (ranked 8th in the bzcontest) and I love games...

One thing I'm kinda down about is that you use function pointers in your modules. *shudders*

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Porting to mac (need some info)
« Reply #13 on: May 08, 2006, 12:05:04 PM »
What's wrong with function pointers?  That's how all modules work, more or less, though I have to admit I don't particularly care for the way it was handled in Q2, but it all boils down to the same thing.  If you load a library, you have to use a function pointer to call functions in it.

I wish I knew of a good OSX port to get you started.  If you have an OSX port of Quake2, it shouldn't take a whole lot to get it working with Paintball2.  You can just diff the OS-specific code, add in a few lines there, and everything else should be cross-platform compatible.  You shouldn't have to touch things like the OpenGL code at all.