home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


Mac OS X Port

by JeroMiya on 10/22/2002 23:39, 26 messages, last message: 01/12/2004 22:35, 14878 views, last view: 05/05/2024 01:26

This discussion is for issues regarding porting cube to MacOS X, which I am currently working on and will post as soon as I get the license issues straight.

Current Progress: The code compiles and runs. Sounds and music are working, weapons are working, map editing is working, armor and items are working, HUD is working, menu is working. Issues are: mouse input stops at the edge of the screen (this may be just an SDL issue), some (actually most) of the levels cause the engine to appear frozen on startup. Networking is not working at the moment due to a dependancy issue.

Issues with the port:
One struct instance is defined as a list of lists, and the initializer list only uses one set of brackets. Just a warning in the compiler but I fixed it anyway.

Apple predefines the values defined in glext.h, only without the _EXT. Values defined in glext.h possibly conflict with Apple\'s GL implementation.
Fix: remove the _EXT and don\'t include glext.h

The networking code has a few Linux dependancies.

Other build instructions:
-These may not be the best settings for actually distributing your game.
First, delete all SDL, SDL_image, libz, and fmod header files included with the cube distribution (you want to use the mac versions).
set -framework SDL -framework SDL_image in linker flags
add ${HOME}/Library/Frameworks/SDL.framework/Headers to header search paths
add ${HOME}/Library/Frameworks/SDL_image.framework/Headers to header search paths
add ${HOME}/Library/Frameworks to your framework search path.

Alternatively, you can add SDL.framework and SDL_image.framework with \"Add Frameworks\" and convert all the references to SDL headers to SDL/headername.h, same with SDL_image headers.

Add your libz.a or libz.1.1.4.dylib using \"Add Frameworks\"

Add your fmod.a using \"Add Frameworks\"
Add paths to the libz and fmod header files to your header search paths, wherever they exist. Mine are /sw/include and ${HOME}/Programming/fmod/include

fix various errors that come up when you attempt to compile. One function in the enet library needs to be commented out in order to compile (the one which uses X11 functions to grab the clipboard contents). There are a couple of unsigned/signed comparisons and a struct instance initializer that should only show up as warnings.


Jeremy Bell
WolverineSoft Project Coordinator
www.umich.edu/~wsoft
homepage.mac.com/jeremybell/resume.html

Go to first 20 messagesGo to previous 20 messages    Board Index   

#7: I tried saving it again before I posted about this ...

by salavin on 11/01/2002 07:02, refers to #6

No efffect but with my ignorance of jpeg I have no idea whether this had any impact upon whatever if giving MacOSX OpenGL fits. It should be remembered that this OpenGL implementation does have a number of know bugs, I cannot be absolutely sure that it is even the images fault.

reply to this message

#8: ..

by the chump on 12/05/2002 20:38

hey, it's awesome to see that the osx port is nearing completion. can we expect a release version anytime soon? i've been drooling over this since i saw it on www.insidemacgames.com a month or two ago.

reply to this message

#9: hi

by Comander on 01/12/2003 17:51

what make the mac port?

reply to this message

#10: Re: Progress

by wonea on 01/19/2003 23:57, refers to #1

How's the port going?

reply to this message

#11: has the project died?

by bloopie on 03/25/2003 20:57

i have not heard much about the osx port in a while and was wondering if it\'s safe to say that the beta source is the last update. i downloaded the projectbuilder files but i don\'t have the sdl headers so i could not compile it (perhaps that\'s something for a rainy day).

reply to this message

#12: Re: has the project died?

by hungerburg on 04/12/2003 01:09, refers to #11

now, how often will it rain at your place?

reply to this message

#13: It was about to pour

by bloopie on 04/13/2003 22:53

so it got a little wet, and i decided to have a go at it. keep in mind that i have absolutely no programming knowledge beyond printf("hello world"); . i tried compiling and kept getting errors, so i kept downloading and installing libraries and frameworks and little by little, the errors went away. i had to change the paths to a few headers (thank God for fink; it had downloaded a few random header files for some reason that i needed to compile). building went to the very end, it created the application package and everything, all files compiled, but i received one damned error at the end, apparently within the app itself

"Linking /Users/metallus/Documents/Cube/build/Cube.app/Contents/MacOS/Cube (1 error, 1 warning)"

that says

ld: warning -L: directory name (fmod) does not exist

ld: multiple definitions of symbol __realloc

i have no idea if fmod is installed in the right place, so that was no big surprise. but i don't know a damn thing about programming, so i can't fix the error; it seems to be a problem with some kind of memory allocation in the source (or perhaps a result of my hack-and-slash header linking). anyway, i tried, and got really close. maybe someone else will have better luck. i have an old fortunecity account where we can host it until the bandwidth maxes out.

reply to this message

#14: Re: It was about to pour

by Shockie on 04/19/2003 15:08, refers to #13

hmm that undefined symbol looks like its saying that some function is called but there is no definition for it (in header files, and cpp files).

coctane me about hosting (click my name and send a message :D)

reply to this message

#15: Re: It was about to pour

by bloopie on 04/19/2003 19:49, refers to #14

the "multiple definitions" comment makes me think that somewhere in the code, the variable/object/whatever was given two or more definitions and the compiler does not know which one to choose. i did not take a look at the file in which the error occurred, so i'm not sure if it was two definitions within a single file, or if __realloc was defined differently in two separate files. i was tempted to try and hunt down one instance of __realloc and just comment it out, but who knows what kind of havoc that would have unleashed. unfortunately, my "learn c in 21 days book" (in 2 years i've reached about day 8) is not much help in this situation ;). there's a real email address in my userinfo now, so if anyone figures something out, feel free to drop me a line.

reply to this message

#16: ..

by Pathegreat on 04/20/2003 02:01

let me get this straght u want cube 4 mac? and if so y mac blows windows and linux is better

reply to this message

#17: ..

by bloopie on 04/20/2003 04:02

u got it straight. we want cube 4 mac, and nobody likes flamebait, even from k00l h4x0rs.

reply to this message

#18: Re: It was about to pour

by Shockie on 04/20/2003 05:41, refers to #15

upgrade to "teach yourself *C++* in 21 days (4th edition)"

ill take a look thru it tommorow for you

reply to this message

#19: ..

by Pathegreat on 04/21/2003 18:39

well it would be nice 2 have cube for mac but it realy is thier falt in being dumb enough to buy a mac realy the thing sucks ass!

reply to this message

#20: Re: ..

by Thalion on 04/21/2003 19:40, refers to #19

I wonder if moderator here has a "ban" button...

reply to this message

#21: my goodness...

by bloopie on 04/21/2003 20:43, refers to #19

Patthegreat: flamebait is never a good idea, but when you're using a static ip that is displayed right next to your name, it's an even worse idea. you have every right not to like macs, but this is not the place for those kinds of posts. by the way, i think you could actually benefit from safari and omniweb's built in spellcheck feature; you may want to give that a look.

reply to this message

#22: ..

by Pathegreat on 04/21/2003 22:03

iam so sorry bloopie forgive me i have bin an ass, everybody has thier reasons for bying what they want and the mac peopel should have a chance to play such a good game please forgive me

reply to this message

#23: ..

by bloopie on 04/22/2003 02:07

there's really nothing for which you should be sorry, but i appreciate the apology. i apologize if i sounded like an ass and let the post get to me. this site is a place for having fun and i need to lighten up. i'd better stop before i get all sappy and emotional and start hugging everybody ;)

reply to this message

#24: Re: pouring butterflies

by hungerburg on 04/22/2003 02:31, refers to #15

in the gnu library, realloc is in stdlib.h; most likely in bsd too. the underscores in front of the name may come from the compiler.

its also in cube/src/tools.h; this seems not to be a problem here - dont ask me why, though.

the fmod error only says, there is no directory by this name. (-L is used to set a search path.) if its somewhere else, and its found, no problem. (unix cube uses sdl for sound anyways.)

it might make sense to try and have cube running with power pc linux first, the mac has a byte order different from intel chips - dont ask me what this is, though.

I only hope for a port, Id like to see cube on the 21" trinitron screen in the office :)

reply to this message

#25: compiled

by dasnake on 01/10/2004 20:45, refers to #24

I\\\'ve successfully compiled cube with MacOSX 10.3.2, with no comments on the source except the _EXT thing.
Music and graphics seems ok, and in singleplayer I didnt notice any bug.
If I try to go networking everything stucks and I didnt find the source of such bug, yet.

This with the 2002 10 20 release, now I will try with the new one and I\\\'ll post the results

reply to this message

#26: You might want to check this out...

by none on 01/12/2004 22:35

http://www.sourceforge.net/projects/cube-osx/

Looks like someone's beaten us to it. it works fine for me.

reply to this message

Go to first 20 messagesGo to previous 20 messages    Board Index   


Unvalidated accounts can only reply to the 'Permanent Threads' section!


content by Aardappel & eihrul © 2001-2024
website by SleepwalkR © 2001-2024
53866260 visitors requested 71641413 pages
page created in 0.016 seconds using 10 queries
hosted by Boost Digital