PDA

View Full Version : Porting a Linux Game (NiL) To OSX


Earendil
2004.07.28, 02:10 PM
Ahoy boys and girls!
Previously I had inquired about this at macrumors.com, but a member there said to come here and re inquire.

I would like to try and port a Linux game called NiL ( http://nil.sourceforge.net/ ) to OSX. NiL its self is actually a port of an old DOS game called Liero, which is an extremely simple and fun humen-v-humen 2d scroll screen shooter that can be played network or split screen with one keyboard.

Though I am willing to try and port this game myself, the reality is I've only ever dabbled in C/C++, and that was 5 years ago under OS8.6. I really haven't had the time to open up XCode or even mess with the Unix commands.
That said, I'll be a Freshmen in college this fall, and Comp Sci is one of my morning classes, so now is as good a time as any to dig in and get dirty!

NiL uses the SDL lib which afaik is a very good thing, and should help make porting it easy, if not child's play. Am I correct in this? Could it be possible that all that needs to be done is for the source to be recompiled under OSX? Or are there bound to be complications?

Any ideas? Thoughts? Suggestions? Volunteers? ;)

Tyler
Earendil

IBethune
2004.07.28, 03:08 PM
If the app is weel written most of it will be portable because of SDL, and hopefully any OS-specific bits of code will be nicely isolated, so you can replace them with Mac OS code. If not, it could get a bit more messy.

Anyway, take a look and if you have any trouble just ask.

- Iain

SOUR-Monkey
2004.07.28, 05:20 PM
I would be really interested in doing this. The thing which originally got me into game programming all those years ago was making a Liero clone for Mac OS, and I never actually did it.

I have not used SDL much, and I'm very new to OpenGL, but I'd be interested in trying anyway. PM or eMail me if you're interested.

Earendil
2004.07.28, 08:58 PM
After downloading the "source code" and dinking around with it, I'm sorry to admit I don't know what the h*ll I'm doing :(
In the few simple programs I made, on my own time, back when I was 15, the projects were very well self contained. This thing though is a might bit larger (what a surprise) than my own kid projects, and I don't even know where to begin with it. I was hoping to open the whole thing up in XCode and at least attempt to recompile it under OSX without any modifications. See if something so simple would work. But I don't even know how top open it all up at once, or find the master file :(

SOUR-Monkey,
It's great to find someone else that has played this game!! You are welcome to follow the link and download the source, and dink around with it if you know how. If you get it to compile let me know. Apparently you can compile it from source or from binary. There is a bug in the binary that keeps the worms from moving around, so I'd try and compile from the source. I hope that makes sense, I don't really understand it myself, and am just trying to repeat what I read.

Tyler
Earendil

lightbringer
2004.07.28, 11:15 PM
I actually ported NiL a while ago (before I got into game development I was heavily interested in bringing over more titles to the OSX public). Long story short there are some screwed up things in the source that would take a good deal of work (and more understanding of coding for the X window system) to clean up and fix. Over time I also lost interest in the project and thus I am here today talking about it and not having it done.

I'll never go back and finish yet, it's pretty boring compared to the games I'm writing myself :D

Good Luck,
Derek

SOUR-Monkey
2004.07.29, 01:17 AM
Damn, it is written in C++. I won't be able to change much of it.

I'll have a further look tonight when I have more time, but unless it requires very little modification then I can't see myself being much help.

Earendil
2004.07.29, 02:29 PM
I actually ported NiL a while ago (before I got into game development I was heavily interested in bringing over more titles to the OSX public). Long story short there are some screwed up things in the source that would take a good deal of work (and more understanding of coding for the X window system) to clean up and fix. Over time I also lost interest in the project and thus I am here today talking about it and not having it done.

I'll never go back and finish yet, it's pretty boring compared to the games I'm writing myself :D

Good Luck,
Derek

Perhaps I'm asking a dumb question, but when you say the "X Window system" do you mean Windows XP? If so, than perhaps you were messing with the original DOS or Windows Port of the game. NiL as it is to day is for the Linux OS. Also, recent work has been done to it, so perhaps you would be willing to look back into it? Pretty please? ;)
If you did originally work on the Linux port of the game, than you provided disheartening news, though I suppose I'm glad I heard it before I spent much time on it.

And Derek, I must ask an off topic question. Though "LightBringer" seems like a name one might come across often, I haven't ever met someone with that name. Except for once, a long time ago, a gaming buddy of mine by that name disappeared and wasn't heard from again by me or a few people he played with. You wouldn't be the same guy that played Myth oh so long ago, would you?

Tyler
Earendil

IBethune
2004.07.29, 07:26 PM
Sorry to sound discouraging, but you nee to do some more research.

The X Windows system is a windowing system that is used on Linux to handle the display of Windows (hence the name) and a few other things. It is NOT an operating system such as Windows XP or Mac OS X.

If your linux game uses the X Windows system then either you need to modify it to run using Apple's X11 implementation of X Windows or you need to rewrite a large bit of the code to use another windowing system using carbon/cocoa/SDL/...

Try searching around on Google for X Windows, X11, XFree86 to find out some more about X Windows.

- Iain