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, 14895 views, last view: 05/19/2024 00:19

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

   Board Index    Go to next 20 messagesGo to last 20 messages

#1: Progress

by JeroMiya on 10/24/2002 23:24

I've made the following changes to the project structure:
I've compiled the enet library into a framework, which I link against.
I've attempted to compile the zlib and libpng libraries into a framework, which I also link against. There is a problem with this if you already have zlib and libpng installed in /usr/local/lib and /usr/local/include (or alternatively, /usr/lib and /usr/include ) since the two conflict during linkage. I will attempt to fix this problem, or decide whether a zlib/libpng framework is really feasable.


New issues:
I've found some issues with the latest source version of zlib and libpng on MacOSX. Neither pass their included test programs(this is in Jaguar), so I suspect that there may be an issue with image loading on some levels (but not all). I will compile a list of levels which do not load, and see if there is a pattern in what type of image files are in non-loading maps vs loading maps.


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

reply to this message

#2: Re: Progress

by JeroMiya on 10/25/2002 18:09, refers to #1

preping project files for posting. Should be online this saturday or sunday.



Jeremy Bell
WolverineSoft Project Coordinator
www.umich.edu/~wsoft

reply to this message

#3: CubeX test build

by JeroMiya on 10/30/2002 21:20

CubeX as I'm calling it, is a very very early test build of the Cube engine for MacOSX. For now, it's really geared towards developers and not users, as there are a number of issues with the build, but this should give some people a head start with Cube development on the Mac and could get some more people working on those issues.

homepage.mac.com/jeremybell/FileSharing.html

reply to this message

#4: Re: Progress

by salavin on 10/31/2002 03:49, refers to #1

I noticed in my testing on the source that the same images failed every time. Did you eve track down the issue ?

reply to this message

#5: Okay, it seems to one texture only...

by salavin on 10/31/2002 22:49, refers to #4

packages/egyptsoc/v096-01b.jpg

Copy another texture to that and the problem with level loading seems to go away (though it probably messes up somebodies pictures). I've run through about half the levels and no longer have an error on loading the textures.

The error that seems to be occuring is in gluBuild2DMipmaps() where it generates an invalid memory signal. It appears to be related only to the specific texture, but that's pretty annoying. I know absolutely nothing about the internals of jpeg images, so I have no idea what may be wrong with that image.

Perhaps a bit of OpenGL debugging is in order, but I have not done that before.

reply to this message

#6: Re: Okay, it seems to one texture only...

by pushplay on 11/01/2002 00:42, refers to #5

There are different varities of jpgs. Try resaving the file in photoshop or something like that.

reply to this message

#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

   Board Index    Go to next 20 messagesGo to last 20 messages


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


content by Aardappel & eihrul © 2001-2024
website by SleepwalkR © 2001-2024
54040156 visitors requested 71821207 pages
page created in 0.026 seconds using 9 queries
hosted by Boost Digital