Things that i should know before programming a game for linux

Hello!

I am just about to start port of a game from windows to linux,
i choose SDL. This game is simple 2d game, closest one i know to compare is boulderdash but has different rules. Graphics is prerendered in some images.I have few full screen movies and few waves to play during game…

I would like to ask group for some tips, how can it be done.
I don’t mean of course technicaly design of game engine.

This game is commercial, so i guess it meets with LGPL licencing.
Beside SDL i would like to use xine.lib for movies and SDL_mixer (i guess it’s part of SDL) for sound. As i would not publish sources of game i want to avoid problems with missing liblaries. Sometimes it happends that some lib is dynamicaly loaded during start of game, and oups… its missing. Some of them are like libxxx-1.0.0.so others just libxxx.so. Should I link SDL staticly into game ? how about xine ? i want to have out of box solution, therefor everything should be prepared, checked and installed by setup.

Grzegorz Jaskiewicz
C/C++/PERL/PHP/SQL Programmer

| This game is commercial, so i guess it meets with LGPL licencing.

Providing you release all the .o files of your project so others can
relink it with a different version of SDL.

You don’t have to provide this with your program, put it on your
website somewhere (you just have to make sure it’s freely obtainable).
Then in the installer or somewhere obvious, put something like “This
code uses SDL, and in accordance with the LGPL you can find all the
object files of this project at http://www.blah.com/objs/ should you
want to relink it”.

(that’s right, isn’t it?)

I’m sure www.gnu.org has lots to say about this kind of thing.

| Beside SDL i would like to use xine.lib for movies and SDL_mixer (i

xine-lib (despite its name) is not LGPL, it’s GPL… so if you link
against that you have to make your program GPL too. Your best bet with
that is to ask on the xine-user mailing list:

xine-user mailing list
xine-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xine-userOn Fri, May 24, 2002 at 09:47:07AM +0200, Grzegorz Jaskiewicz wrote:


I will never win an emmy

6AD6 865A BF6E 76BB 1FC2 | www.piku.org.uk/public-key.asc
E4C4 DEEA 7D08 D511 E149 | www.piku.org.uk wnzrf at cvxh.bet.hx (rot13’d)

| This game is commercial, so i guess it meets with LGPL licencing.

Providing you release all the .o files of your project so others can
relink it with a different version of SDL.

Good grief… just dynamically link with SDL, that’s just as good.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment> On Fri, May 24, 2002 at 09:47:07AM +0200, Grzegorz Jaskiewicz wrote:

Hello Sam,

I just wanted to tell I have ported a couple of SDL games for amiga…

Here is the list :

  • kobodeluxe 0.3
  • Maelstrom 3.0.5
  • LBreakout 2 V2.2.2
  • Fly 0.3.0
  • Marbles 1.0.2
  • Epiar 0.12
  • Atakks 1.0
  • TuxPuck 0.7.8
  • Mures 0.5
  • Glaxium 0.3
  • SDLRoid
  • glTron
  • cdvst
  • gnUFO
  • Xrick
  • supertux
  • MangoQuest

All thoses games works quite well, I think they all have at least 75%
of the originals functionnalities.

If you could add an icon for each projects (at least thoses you work
on) or contact their authors it
would be nice

Here is the site where all thoses ports can be found at :
http://amiga.maniasys.com
for the most recents.

and :
http://sixk.maniasys.com/index_en.html
for the older ones–
Best regards,
SixK mailto:SixK at maniasys.com

xine-lib (despite its name) is not LGPL, it’s GPL… so if you link
against that you have to make your program GPL too. Your best bet with
that is to ask on the xine-user mailing list:

I thought that when using some lib NOT staticly linked i can use it in non
GPL software !
Fe. QT is using glibc but is not GPL !

Maybe somebody can asnwer my other questions too please, becouse licencing
problems are not mine worst.

Grzegorz Jaskiewicz
C/C++/PERL/PHP/SQL Programmer

IIRC, glibc is LGPL !
So you are allowed to use it on non free programs
as long as you use dinamic linking.

Paulo Pinto> -----Original Message-----

From: sdl-admin at libsdl.org [mailto:sdl-admin at libsdl.org]On Behalf Of
Grzegorz Jaskiewicz
Sent: sexta-feira, 24 de Maio de 2002 11:09
To: sdl at libsdl.org
Subject: Re: [SDL] Things that i should know before programming a game
for linux

xine-lib (despite its name) is not LGPL, it’s GPL… so if you link
against that you have to make your program GPL too. Your
best bet with
that is to ask on the xine-user mailing list:

I thought that when using some lib NOT staticly linked i can
use it in non
GPL software !
Fe. QT is using glibc but is not GPL !

Maybe somebody can asnwer my other questions too please,
becouse licencing
problems are not mine worst.

Grzegorz Jaskiewicz
C/C++/PERL/PHP/SQL Programmer


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

| > xine-lib (despite its name) is not LGPL, it’s GPL… so if you link
| > against that you have to make your program GPL too. Your best bet with
| > that is to ask on the xine-user mailing list:
|
| I thought that when using some lib NOT staticly linked i can use it in non
| GPL software !
| Fe. QT is using glibc but is not GPL !

glibc appears to be dual-licenced… it’s both GPL and LGPL (GPL if you
want to edit it and alter the code, LGPL if you just want to use it as
an API).

There’s this at the bottom of the ‘COPYING’ file from current
xine-lib CVS:

“This General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications
with the library. If this is what you want to do, use the GNU Library
General Public License instead of this License.”

Remember, Xine-lib is GPL, not LGPL…

| Maybe somebody can asnwer my other questions too please, becouse
| licencing problems are not mine worst.

Best place would be the xine-user list for the xine part. For SDL, or
any LGPL bit of software, it would appear you can just dynamically link
against them (so you have a libSDL.so) so others can use a different
version of SDL if they want.

This is probably getting OT now though. The GNU website is full of
things about how you can use (L)GPL code.On Fri, May 24, 2002 at 12:09:13PM +0200, Grzegorz Jaskiewicz wrote:


I am not a 32 year old woman

6AD6 865A BF6E 76BB 1FC2 | www.piku.org.uk/public-key.asc
E4C4 DEEA 7D08 D511 E149 | www.piku.org.uk wnzrf at cvxh.bet.hx (rot13’d)

so i see nobody is answering me for my real, except licence problems:
questions again:

am just about to start port of a game from windows to linux,
i choose SDL. This game is simple 2d game, closest one i know to compare is
boulderdash but has different rules. Graphics is prerendered in some
images.I have few full screen movies and few waves to play during
game…

I would like to ask group for some tips, how can it be done.
I don’t mean of course technicaly design of game engine.

Beside SDL i would like to use xine.lib for movies and SDL_mixer (i guess
it’s part of SDL) for sound. As i would not publish sources of game i want
to avoid problems with missing liblaries. Sometimes it happends that some
lib is dynamicaly loaded during start of game, and oups… its missing. Some
of them are like libxxx-1.0.0.so others just libxxx.so. Should I link SDL
staticly into game ? how about xine ? i want to have out of box solution,
therefor everything should be prepared, checked and installed by setup.

Grzegorz Jaskiewicz
C/C++/PERL/PHP/SQL Programmer

I thought that when using some lib NOT staticly linked i can use it in non
GPL software !

No, dynamic linking is covered too.

Fe. QT is using glibc but is not GPL !

There’s a special exception for system libraries when the app in question
isn’t shipped with the system
. This technicality is why Debian refused to
include KDE with their system for so long. But TrollTech finally gave in and
made a GPL’d version of QT – so, yes it is.On Fri, May 24, 2002 at 12:09:13PM +0200, Grzegorz Jaskiewicz wrote:


Matthew Miller @Matthew_Miller http://www.mattdm.org/
Boston University Linux ------> http://linux.bu.edu/

so i see nobody is answering me for my real, except licence problems:

Well, the licence problems were the interesting part. :slight_smile:

Beside SDL i would like to use xine.lib for movies and SDL_mixer (i guess

Well, you can’t, without contributing your code back to the community in
exchange for the use of theirs. If you wanted to license a commercial movie
playing library, you’d pay a bunch of money; to license xine-lib, you pay in
code.

it’s part of SDL) for sound. As i would not publish sources of game i want
to avoid problems with missing liblaries. Sometimes it happends that some
lib is dynamicaly loaded during start of game, and oups… its missing. Some
of them are like libxxx-1.0.0.so others just libxxx.so. Should I link SDL
staticly into game ? how about xine ? i want to have out of box solution,
therefor everything should be prepared, checked and installed by setup.

If you link SDL statically, you have to provide your object files, as
someone said. This may or may not be more of a hassle than dynamic linking.
Read this: http://www.libsdl.org/license.php.On Fri, May 24, 2002 at 02:28:16PM +0200, Grzegorz Jaskiewicz wrote:


Matthew Miller @Matthew_Miller http://www.mattdm.org/
Boston University Linux ------> http://linux.bu.edu/

Well, you can’t, without contributing your code back to the community in
exchange for the use of theirs. If you wanted to license a commercial
movie
playing library, you’d pay a bunch of money; to license xine-lib, you pay
in
code.

So, are there lgpl mpeg libs to playback movies ?
i guess there are, becouse loki games were using some !

Dear Grzegorz Jaskiewicz,

  • Grzegorz Jaskiewicz <gj_22 at wp.pl> [020524 14:28] schrieb:

so i see nobody is answering me for my real, except licence problems:
questions again:

I think your question was answered.

xine is not part of SDL, so look at xine Web-page or mailinglist to
solve that part of your problem.

SDL is LGPL, so you can produce close-software with SDL.
Under the conditions that James told you, you can link it static, but
it’s easier to link it dynamic.
The same applies to SDL_mixer, it’s LGPL too.

In fact I don’t know what is still your question?

Have a nice day,

Joerg

I think your question was answered.

in fact no, that was just 1/10 of my question !

I asked, about problems with others liblaries. Should i put libs that i use
into app dir, or install them in /usr/lib dir ? If user have newer version
of sdl (let’s say 2.0) it will not be backwardcompatibile, so he will not be
able to use my app ! … read please my questions again :slight_smile: and ommit
licencing problem

GJ.

Sure – SMPEG.On Fri, May 24, 2002 at 03:53:59PM +0200, Grzegorz Jaskiewicz wrote:

So, are there lgpl mpeg libs to playback movies ?
i guess there are, becouse loki games were using some !


Matthew Miller @Matthew_Miller http://www.mattdm.org/
Boston University Linux ------> http://linux.bu.edu/

I just wanted to tell I have ported a couple of SDL games for amiga…

Here is the list :

Wow…cool!

–ryan.

Hello Sam,

I just wanted to tell I have ported a couple of SDL games for amiga…

Very cool.

All thoses games works quite well, I think they all have at least 75%
of the originals functionnalities.

I suggest you send mail to the authors, submit any patches, and ask them
to update the SDL website. If for some reason you can’t get in touch with
the authors or they aren’t able to incorporate your patches, go ahead and
create new entries for the programs (and the listed descriptions) and mark
the platform Amiga with whatever completeness rating you feel is appropriate.

Good job! :slight_smile:

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment