PDA

View Full Version : MacBomber - a 3D Bomberman Clone for Mac OS


quarus
2006.06.17, 04:59 AM
Hi
I am developing a 3D Bomberman clone called "MacBomber" for Mac OS. It works fine on my machine (iBook G4 933 Mhz), however, I'm not sure if i have bundled all used Frameworks/Libraries properly, that's why i would like to ask you for your help: Could you please test if my game starts/works on your system ?
You can download MacBomber (and it's source) here (~8MB):

http://sourceforge.net/projects/macbomber/

Thanks for any Feedback

Fenris
2006.06.17, 06:19 AM
Hi there! :)
Wow, Bomberman. I'm looking forward to that one! Sadly, you've failed to package SDL itself. SDL_image and SDL_mixer are in there, but SDL isn't. It looks for it in the right place (@executable_path and all that is correct) but I think you just need to add it to your copy files phase. :)

quarus
2006.06.17, 07:22 AM
Hi there! :)
It looks for it in the right place (@executable_path and all that is correct) but I think you just need to add it to your copy files phase. :)

Thank you for your analysis :) ! I will let you know, when i fixed it..

quarus
2006.06.17, 07:56 AM
By the way, MacBomber uses Opengl. Do i need to add this framework too ?
(if not, please retry. I added the SDL Framework..)

sealfin
2006.06.17, 08:20 AM
No, the OpenGL framework is bundled with the OS.

Achithyn
2006.06.17, 02:14 PM
Greetings,
I'm just a lowly programmer right now (just starting), so I can't really give you any great advice or feedback (sorry!). However, just to provide what your game does on my mac may help. I have an iMac 2.1GHz (the one before the Intel iMacs came out). When I try to launch the game, it starts and then ends (app appears and then disappears). If this doesn't happen for everyone else, I wonder if there is something wrong on my Mac, since I can't install WoW either, due to some issues. Anyway, feedback is feedback - hope that helps somewhat. :p

I look forward to playing bomberman! :D

~Achi

akb825
2006.06.17, 02:26 PM
You should also package freetype, since it's failing to find it on launch. (it isn't packaged with OS X, but it is for X11, so perhaps I can change where it looks so I can run it...)

quarus
2006.06.17, 02:53 PM
Thank you all for your help so far. I really, really appreciate it! Regarding the missing freetype Library: MacBomber uses FTGL for Textdrawing, and FTGL uses Freetype. This is how my Targets->Frameworks&Libraries Folder looks like:


SDL.framework
SDL_image.framework
SDL_mixer.framework
Cocoa.framework
OpenGl.framework
lib3ds.a
libfreetype.a
libtfgl.a

As you can see, i use 3 libs. And this is what's in the Targets->Copy Files Folder:

SDL.framework
SDL_image.framework
SDL_mixer.frameworkd

Is it necessary to put the 3 libs into the "Copy Files" Build as well ? I guess it is, right ?

akb825
2006.06.17, 03:15 PM
Never mind, the version in X11 is out of date. I compiled freetype from the source it that and it worked fine. (I was doing some other stuff with it anyway :p) A few suggestions: I think the initial walking speed is a little slow. It's a bit too close when trying to get out of the way of your own bomb. It would be nice if the explosions faded out, rather than just disappearing. Also, I figured that picking up the flame would increase the length of the flame of your bomb, but that is not the case. The bad powerups should probably be the same color, otherwise people will see the red and instantly see that it's a bad idea. Finally, I don't know if this is in the settings, but you should probably implement multiple lives instead of just last to survive. (at least as an option) Very nice work so far, though. :)

akb825
2006.06.17, 05:03 PM
You shouldn't have to copy the libs since they are static libraries. My previous post was being written when I was trying to install freetype, so I didn't see your last post beforehand. If you linked the freetype static library, it should be fine now.

BTW, I have a version of FTGL that I compiled that has freetype built right in. (basically I just included the source) Fortunately all this business of freetype reminded me of it, so I was able to update it somewhat. It now includes the newest version of freetype (2.2.1) and now that I have an Intel Mac, I have been able to tweek it so it runs correctly when built for i386. (it turned out in order to have it work I had to tell freetype that it wasn't really a Mac. :p With those settings, it works perfectly on both PPC and Intel, so I'm assuming their Mac-specific functions are for classic compatibility) You can download the project here (http://akb825.com/downloads/FTGL.zip), and it also includes a framework version, so you (hopefully) will be able to include it as easily as SDL. (also, in general it will be better since you can dynamically link it and be able to meet the requirements of GPL even for commercial products)

quarus
2006.06.17, 06:43 PM
Wow! Thanks ak825 for actually messing with freetype to get macbomber up and running!! I'm glad you like it. Thank you for providing the FTGL Framework too!
There's however one thing i don't understand. You said:

If you linked the freetype static library, it should be fine now.


You mean i have to compile FTGL again, and link freetype statically, right ? I'm confused, because i thought i did. How do you build FTGL with statically linked freetype lib (probably a stupid question - i know).

As you have already noticed, there are some (very) rough edges in macbomber at the moment. Bomb/speed/timing settings haven't been tweaked yet and there is room for improvement regarding the graphics as well. I will post an updated version of the bundle, however this may take a while...

Anyway, thank you again for your input !!

akb825
2006.06.17, 06:58 PM
What I mean is you mentioned that you had the freetype static library in your list of libraries, which means it should have been fine. However, it's possible that the FTGL library was looking for the dynamic library, which was causing it to look unsuccessfully for the dynamic library. If you want, though, you can just be safe and use the framework in the project I linked, since I know it works on computers without freetype installed. Both the static library and framework should work.

I guess I could have compiled FTGL with the static library of freetype, by simply telling it to link the static library. However, the rout I took was to actually include the source directly in the project. That way, it compiles freetype right along FTGL. That way, it's a lot easier to make different versions without having to juggle libraries. (such as a Universal Binary version, or a backwards-compatible version etc.)

lokijki
2006.06.17, 09:55 PM
It won't open at all for me... No message comes up and it doesn't show up on the dock at all.

quarus
2006.06.18, 05:25 AM
@akb825: Thank you for clarification !

@lokijki & others: Well, thanks for trying it anyway. I will try to fix things. Unfortunately I'm a bit busy at the moment so it may take a while :(. I will let you know ...

socksy
2006.06.18, 07:28 AM
lokiji, did you check the console?

quarus
2006.07.07, 09:24 AM
Hi !

I uploaded a new version of MacBomber. This time it uses the FTGL library kindly provided by akb825. It would be great if someone actually could try it out. You can find MacBomber on its sourceforge project page:

http://sourceforge.net/projects/macbomber/

(it says release Date 14.06.06 - however it's the newest version)

Thanks for any help.

unknown
2006.07.07, 09:39 AM
dyld: Library not loaded: /usr/local/lib/libfreetype.6.dylib
Referenced from: /Volumes/MacBomber/MacBomber.app/Contents/MacOS/MacBomber
Reason: image not found

akb825
2006.07.07, 12:48 PM
No download available. You must have forgotten to either remove the FreeType library from your dependancy list or remove something that has the FreeType library as a dependancy.

quarus
2006.07.07, 01:14 PM
Ok...turns out that the linker always preferred linking against the dynamic freetype library, instead of going with the (specified) static one. The only way i found to change this behavior was actually to rename the dynamic lib so that the linker took the static freetype Library in the projects folder. (Yes, I'm pretty sure that there must be a better way to solve this problem)

Freetype requires the dynamically linked Library libz, however this should be no problem, because if google is right, this lib is part of the Mac OS X Core System (..famous last words).

I really hope that i'm not starting to annoy anyone, however i would be really grateful if someone could give macbomber one more try. I uploaded a new version at the usual place:

http://sourceforge.net/projects/macbomber/

unknown
2006.07.07, 01:28 PM
dyld: Library not loaded: /usr/local/lib/libfreetype.6.dylib
Referenced from: /Volumes/MacBomber/MacBomber.app/Contents/MacOS/MacBomber
Reason: image not found

move the freetype libraries to a different location to test if you linked it correctly.
You might want to remove the dynamic lib when linking as well (if that doesn't work you probably need to specifically do a static build).

quarus
2006.07.07, 02:03 PM
dyld: Library not loaded: /usr/local/lib/libfreetype.6.dylib
Referenced from: /Volumes/MacBomber/MacBomber.app/Contents/MacOS/MacBomber
Reason: image not found


That's odd... How big was the file you downloaded from sf.net ? It has to be around 17 MB. I just tried to download the app, however it seems that some Mirrors are still hosting the old file (8MB). I also moved everything concerning libfreetype from /usr/local/lib. It still starts up here.

So, maybe the sf servers just need some time....

unknown
2006.07.07, 02:32 PM
and it works!

quarus
2006.07.07, 02:46 PM
and it works!

Yeah !!!! :wow: :wow:
*opens bottle of champagne*

Finally ! Thanks everyone !!

akb825
2006.07.07, 02:53 PM
Just FYI, if you're using my version of FTGL, you don't need to link freetype: it's built right into the framework. (or static library if you decide to go that rout)

Edit: and another FYI, it doesn't work in Rosetta: it froze my MacBook Pro. (not just the application: the entire computer)

quarus
2006.07.07, 06:11 PM
Just FYI, if you're using my version of FTGL, you don't need to link freetype: it's built right into the framework. (or static library if you decide to go that rout)


I actually tried to use the framework. I placed it under /Library/Frameworks and then added it to my project. However it didn't work, because it couldn't find a lib (libfreetype IIRC). Is there something i forgot ?

Edit: and another FYI, it doesn't work in Rosetta: it froze my MacBook Pro. (not just the application: the entire computer)

That sounds bad. Maybe it gets better when i start using your framework properly...

akb825
2006.07.07, 07:47 PM
Did you take out the static library you had in there before? For FTGL, if you want to use the framework, you need to make sure there is nothing else from any previous builds of FTGL that you used, then put the framework in. It should work after that. I double checked and I did change the installation path to @executable_path/../Frameworks, but if that was broken you'd get a message saying that the FTGL framework can't be found. The only library it's set to link to is OpenGL, so if it's saying that it can't find freetype, then it's something on your end.

lightbringer
2006.07.07, 10:25 PM
Edit: and another FYI, it doesn't work in Rosetta: it froze my MacBook Pro. (not just the application: the entire computer)

The night 10.4.7 was released I got some e-mails from Mountain Tanks (http://www.batteryacid.org/mountaintanks) players saying their X1600 Intel iMacs lock up when running the game. After filing a bug report I got a call from ATI (Chris Bentley, what a great guy) basically saying, "We feel for game developers, so let's figure this out." After some investigating we determined the glTexSubImage2D() call in FTGL was the source of the problem. While I have yet to come up with a fix (glTexImage2D() works, but it's not easy to just throw in there as far as I can tell) Bentley has admitted that the driver on the particular version that Apple used for 10.4.7 (which has been fixed internally for a while and works in 10.4.8 seeds) has this issue that accidently slipped by them.

While I don't want to derail this thread (in fact, perhaps a mod could move the relavent discussion over) this is a major issue as a few of us (at least) use FTGL and I want you all to be aware.

quarus
2006.07.08, 08:36 AM
Bentley has admitted that the driver on the particular version that Apple used for 10.4.7 (which has been fixed internally for a while and works in 10.4.8 seeds) has this issue that accidently slipped by them.

Interesting! Well, let's hope that it won't be too long until 10.4.8 (or an software update).

@akb825:
I will try again to use the FTGL Framework in Macbomber - this time properly i hope.

lightbringer
2006.07.10, 06:19 PM
Interesting! Well, let's hope that it won't be too long until 10.4.8 (or an software update).


Sure, you could wait for 10.4.8 and then check for the culprit machines and throw up an error saying they have to upgrade. Because I have a shipping shareware title I had to attend to this.

So here's the fix Keith and I came up with. I wrote an alternate path in my text renderer to use Polygon + Outline fonts on these offending machines. It looks good enough to work.

useTextureFont = true;

// $$ fix for a nasty 10.4.7 ATI X1600 glTexSubImage2D() bug
{
std::string renderer = (const char *)glGetString(GL_RENDERER);
std::string version = (const char *)glGetString(GL_VERSION);

if(renderer == std::string("ATI Radeon X1600 OpenGL Engine") && version == std::string("1.5 ATI-1.4.32"))
useTextureFont = false;
}

quarus
2006.07.11, 11:50 AM
So here's the fix Keith and I came up with. I wrote an alternate path in my text renderer to use Polygon + Outline fonts on these offending machines. It looks


Using an alternate path for not 10.4.8 Machines makes sense. What about using FTGLPixmapFont or FTGLBitmapFont ? Do these two FTGL Font types also cause a crash ?

OneSadCookie
2006.07.11, 07:24 PM
I believe derek is now using a polygon font for fill, with an outline font to get antialiasing of the edges.

The bug appears to only affect TexSubImage2D, and therefore only texture fonts.

eXCOXIII
2006.07.20, 02:57 AM
Good Project !!

I'm a newbie for programing , may my quesion is stupid :blush:

i wanna asking ; can I run OS X application on Windows OS ?

and can I develop macBomber on Windows ?

If it posible , please tell me

Thanks

eXCO

Blacktiger
2006.07.21, 09:43 AM
eXCO, the short answer is no you cannot run OS X apps on Windows, nor can you run Windows apps on the Mac. I haven't looked at the macBomber source code so I can't say how easy it would be to port to Windows, but based on the fact that the developer is using SDL I would suspect that it shouldn't be too difficult for an experienced developer. However, based on the fact that you didn't know whether Windows could run OS X apps I would say that such a project would be well beyond your abilities at this point.

quarus
2006.07.22, 08:42 AM
Good Project !!
Glad you like it !

I'm a newbie for programing , may my quesion is stupid :blush:
i wanna asking ; can I run OS X application on Windows OS ?
and can I develop macBomber on Windows ?


As Blacktiger already mentioned: You can't run MacBomber on Windows right now. However porting to other Operating Systems should be easy, because MacBomber uses platform independent libraries. But there are no plans to port MacBomber to Windows right now (sorry!). Maybe i will port it to linux sometime ( if MacBomber sparks enough interest... ).

ia3n_g
2006.07.23, 02:00 AM
It looks pretty good, and I'm excited for it to be finished. Minor bug reports: the return key has to be pressed twice to select the start submenu, and when I quit, the OS tells me that it unexpectedly quit. Hope the feedback helps.

quarus
2006.07.23, 07:12 AM
It looks pretty good, and I'm excited for it to be finished.
Thank you !

Minor bug reports: the return key has to be pressed twice to select the start submenu, and when I quit, the OS tells me that it unexpectedly quit. Hope the feedback helps.

That's odd. You mean this little Dialogue box pops up, and asks you if you would like to contact apple ? What OS / machine do you use ? Has anyone else experienced this problem ?

Hope the feedback helps.
It indeed does ! Thank you.

Ishrock
2006.08.21, 04:27 AM
Loved the game. Gotta get some bots in there though. It all seemed to work fine except that when I close the window, instead of gracefuly exiting it crashed. I'm on a 1.4GHz 1GBram mac mini. Good luck with it all!

quarus
2006.08.22, 12:57 PM
Loved the game. Gotta get some bots in there though.
Thanks for your feedback! Yes, bots are on my ToDo list.
It all seemed to work fine except that when I close the window, instead of gracefuly exiting it crashed. I'm on a 1.4GHz 1GBram mac mini. Good luck with it all!
I really don't know what could be the cause for this. I will however release version 0.3 soon, which will be a bit more verbose on exit. I hope this will help me to track down this nasty bug. :\

quarus
2006.09.01, 09:55 AM
Hey guys,

MacBomber version 0.3 is ready for you all. You can find a list of new features, screenshots and download links there:

http://macbomber.sourceforge.net

MacBomber version 0.3 contains new features like ingame music ( just for the menu so far, but my buddy is working on it.. so it is all good ) and support for 1024x768 screen resolution.
I would totally appreciate it if you guys tested the new version of MacBomber again, because last time you all helped me a lot.

Thank you in advance !
Enjoy the new version and I hope you all like it!

Take care


P.S: If MacBomber should crash, please post the console output.