Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming IT Technology

Sam Lantinga Slings Some Answers 45

Last week you asked Sam Lantinga , developer of the Simple DirectMedia Layer (SDL) about SDL and other issues related to gaming. He's responded with answers about the SL port to Sony Playstation, game audio, DirectX, his new job at Blizzard, and more. He even drops some hints about some interesting gaming developments to watch out for.

Out-of-the-box Linux 3D support?
by phutureboy

This may be more of a question for everyone else than for Sam (but Sam can feel free to answer also :) I'm not a big gamer, but I would play some if it weren't such a bitch to get the proper libraries working under Linux. Last time I tried was about 6 months ago... After following some really complicated directions and compiling umpteen obscure drivers I finally got SDL and hardware-accelerated OpenGL working. I had to disable it and revert to my previous versions, though, because it locked up my system a lot during games and made X pretty unstable. Anyway, my question is this: is multimedia support for Linux getting any easier to install? Is it possible that someday I will be able to install a distribution and have it automagically configure hardware 3D support, install SDL, etc.? Or is Linux multimedia still too much in the toddler stages?

I'm just a lowly PHP coder. I don't understand all this low-level mumbo jumbo. I just want to fire up a game every now and then and blow shit up. Is there hope for me?

Sam Lantinga: Yes, more and more distributions are starting to set up 3D out of the box. 3D on Linux is always a moving target however, so the best bet is for distribution to both include 3D detection and setup, and also to include information on how to upgrade the drivers to the latest versions.

As anecdotal evidence, Mike "Heimdall" Phillips, who up until recently worked as Q/A and technical support at Loki Software, Inc., installed Mandrake 8 on a box containing a Rage 128 video card, and the installation detected and set up 3D acceleration out of the box. He was up and running with most of Loki's 3D titles immediately.

Graphics Hardware Drivers
by m2

My question is a bit tainted by my personal opinion in this matter, but I'm sure Sam will be able to provide a different (and surely interesting) point of view.

At the risk of being a tad Linux centric, does the availability or unavailability of hardware specifications and technical documentation on graphics hardware affect a Linux game developer and why? With two concrete cases in mind, on one hand NVIDIA who provides binary drivers and "high level" documentation about their cards, and on the other hand, ATI for which there's source code for the drivers with support for half of the features the hardware offers, but neither openly accessible hardware documentation nor much "high level" docs, how do you think this can affect the future development of games for Linux (proprietary or otherwise)?

SL: From my perspective as a cross-platform game developer, the objective is to write a great game, not to have to read technical documentation on particular graphics hardware. With the improvement of the OpenGL API implementations on the Linux platform, the need for game developers to get their hands dirty with the technical details of the graphics drivers is slowly going away. IMHO, this is a good thing. :)

Now, in reality there is always a need to look at the way the driver interacts with the hardware, either to fix bugs, or to improve graphics performance. For this reason, it's a great thing to have the source code and full graphics hardware specifications available - it allows the developer to make smarter choices about graphic implementation, and results in a better game. This is true of Linux as well as Windows, and interestingly Linux is a richer field than Windows when trying to find out how hardware and drivers really interact.

In the specific case of NVidia, I've been impressed with both the quality of their drivers, and the responsiveness and commitment of the company towards Linux as a whole. While it's true that there is no guarantee that this will continue, it's very refreshing now.

What's your status with Loki?
by Mr T

Was your departure good? Daniel Vogel also left. Is Loki in a good position or did you leave because of some problem. What's the deal?

SL: My departure was good. I left because I was very interested in the opportunity to work on original game content at Blizzard Entertainment.

Loki owes me money like all the other employees, but they have stated that they will pay me back, and I am very hopeful that they will do so.

Blizzard Entertainment
by j7953

What are you working on at Blizzard? Do you get paid for continuing your work on SDL, or do you have to do that in your spare time?

SL: I am working on an upcoming unannounced title. It's great fun and I can't wait for it to be announced so I can tell people what it is that I'm working on. As for SDL, I'm still working on it in my spare time. There's a rumor of a super-elite crack team of developers working on the next generation SDL API, but I can't substantiate it. :)

Directx 8 and SDL
by drenehtsral

From playing with it, and noticing what has been conveniently removed from the documentation (but is still in the libraries), it looks like DirectX 8 is trying very hard to do away with directdraw and work purely through the 3d engine. Sprites are just 2d textured polys, etc ...

This leads me to believe that any future enhancements/optimizations/support/testing/etc ... that will happen with directx will be only on the direct3d part, and directdraw is probably going to be unsupported. Do y'all have any plans to deal with that?

SL: The next generation SDL API is leaning towards the concept of a texture manager and a plug-in architecture for operations on those textures. This should for the most part be a natural improvement upon the current design, and will lend itself well to 3D hardware acceleration. This design is for the 2D surface API though. At this point, the plan is to continue to support real 3D through the OpenGL API.

SDL and OpenAL (among others)
by Eugenia Loli

So, I was always wondering if there is going to be a 'real' integration between OpenAL and SDL. Currently, a lot of people are just using SDL_mixer which does a pretty good job for little shareware/oss games, but when it comes to commercial sound, 3D positioning and all these buzzwords, SDL needs OpenAL to break through against the goodies of DirectX has to offer.

Also, what about a wrapper against D3D? There is currently a nice integration with OpenGL, when SDL needs to use 3D acceleration, but under Windows (where a lot of SDL games already exist) most of the coders are using D3D. Also, based on the fact that D3D 8 is not as bloated as previous versions, a wrapper for other OSes could be easily achieved (IMHO).

Last question, again on the spirit of 'SDL Vs DirectX', are there any plans for more support for more input devices, like force feedback wheels etc.

Take care and thank you for all the hard work you have put on SDL the last few years. (and also greatly thank you for the BeOS port! :)

SL: Okay, there are several questions here. First, thanks for the appreciation! It should go to all the developers who have contributed to SDL and to products using it, because without them, it would not have become the great API that it is.

As for integration between SDL and OpenAL... SDL audio is fairly lightweight and designed to have mixer implementations be built on top of it. OpenAL is a heavy-weight 3D audio API. Different applications have different needs, and one audio API may suit a particular use better than another. You can always choose to use SDL for video and OpenAL for audio, or SDL for audio and another API for video, etc., you have many choices in the design of your game.

As an aside, there is support in the Linux implementation of OpenAL for using SDL as a back-end, and in fact this was used at one point to get the Linux implementation working on Windows. However, this isn't generally needed because of great native audio support.

There are no plans for a Direct3D wrapper for SDL. OpenGL works well on Linux, Windows, MacOS, and many other platforms.

Finally, yes, the device support and event model in SDL 1.3 will handle a much wider range of devices. Whether or not force feedback support will be included will depend on the state of the drivers for these devices across the range of platforms that SDL supports.

Gamecube, Xbox?
by evilMoogle

With SDL for PS2, are there any plans to do the same for the other next-gen platforms, the Gamecube and the Xbox?

SL: I don't know of any plans, but I'm sure somebody will do something as an exercise at some point. That's one of the great things about open source software. I'm constantly surprised at what people are doing with SDL.

higher level?
by magic

With X-Box supporting DirectX only (and a special version at that) and PS2 not supporting OpenGL in general, some of the utility of SDL is lost. For example, I can write a SDL & OpenGL game that compiles and runs on OSX, Linux, and Win32. But window, input, thread and audio management are the least of my problems when moving to X-Box or PS2... I have to rewrite my whole graphics pipeline!

There are, of course, some very good commercial 3D API's that will abstract over this problem. One of the strengths of SDL has been that you have abstracted over the low level and have avoided getting into the sticky business of fighting OpenGL and Direct3D for the 3D API. This also limits the utility of SDL, however, because of the lack of a solid, free API for abstracting the 3D API.

Do you see SDL moving higher up the graphics pipeline in the future, or is it your intent to continue to avoid higher level 3D calls?

SL: I like side-stepping the 3D API issue. :)

I don't plan on adding a 3D API abstraction at this point, however I'm open to the idea of getting a single working 3D API that would cover the platforms you mention. My suspicion, with my limited experience with the PS2 hardware, is that it would take longer to write a functional API that could cover the differences in platforms than it would to get a working subset of OpenGL implemented. There's a reason that many PS2 developers write directly to the hardware.

Sony Development Costs
by debrain

Sony charges stiff fees for Playstation (2) development licenses. Was one of the primary focuses of SDL a way to circumvent these fees, broaden the PS2 platform, broaden the SDL platform, or broaden Linux as a viable game platform?

SL: Mostly the port was done as a fun toy. The intention was to broaden the SDL platform, and possibly allow the average person to write games that would run on the Sony Playstation.

End-user availability?
by DeadMeat (TM)

I brought this up before when the port was announced, but nobody knew the exact answer, so maybe I can get it straight from the horse's mouth ...

From what I understand, the PS2 Linux distro uses a proprietary, binary-only driver/library/program to allow programmers to access the PS2's graphics chip. My question is, how will this hinder end users' ability to get their hands on SDL-based PS2 games?

Does this mean they'll have to buy a copy of the $200 Linux development kit? Or are developers allowed to freely redistribute the graphics runtimes? (Or have you found some other way around this, perhaps by accessing the PS2 hardware without the binary runtime?)

I'm just afraid that most PS2 gamers (read: non-geeks) won't find SDL games too attractive if they have to buy a $200 Linux kit to play them.

SL: The SDL port runs on Sony's Public Beta of Linux on the Playstation 2. This public beta is loosely based on a derivative of RedHat Linux, and works just like any other Linux system. It boots from a memory card, but once booted, it can access the network and hard drive like a UNIX workstation. You can download software RPM archives that were built on Linux for the PS2 and install them normally. This is the way I distribute the SDL runtime packages and Maelstrom for the PlayStation 2.

Since the Linux beta is publicly available only in Japan, I'm not sure what would be included in a commercial product that would be released in the U.S..

This discussion has been archived. No new comments can be posted.

Sam Lantinga Slings Some Answers

Comments Filter:
  • Seriously, I'd love to be doing game design/programming for a living...

    SDL is one of the better things to happen for the open source community though - I just wonder how many commercial gaming companies will pick it up and run with it - making all the Linux gamers happy.
    • Then do it.

      Unless you've got a family or other oblgations you really should just go for it. Find out what you need to know to get hired. Learn it. Write a demo game, brush up your resume and fire it off to everyone.

      Writing games is HARD work. Interesting work if you can get a project you like. On the other hand, you'll probably start out at a fairly low level job and not have much say on what you work on - could get stuck doing little black boxes. Games almost always involves crazy amounts of over-time as dead-lines approuch.

      Still, the couple of years I worked on commercial games was the most interesting programming I ever did. Didn't make much money, but glad I did it.

    • Which part do you envy? I write games for a living. I generally work 20-40% more hours than my friends in "corporate" programming jobs, and my salary is about 20% less... The company that I worked for most recently just folded. This is the fifth game company that I've worked for in the last 6 years that's gone under. Now, it's entirely possible that I'm just really good at picking shitty companies to work for, but I don't think my experiences are all that unusual. So for all of you that wistfully dream of jobs making games... don't stop dreaming--but do go into it with both eyes open.

      Game programming is the most rewarding job I've done, and I have no plans to leave the industry. But it's also the most volatile and stressful environment I've ever been in.

      I realize this is off-topic. Sorry.

      And, sigh, I'd love to be working for Blizzard, too. ;-)

    • Re:I envy him... (Score:3, Insightful)

      by JohnG ( 93975 )
      SDL is one of the better things to happen for the open source community though - I just wonder how many commercial gaming companies will pick it up and run with it - making all the Linux gamers happy.

      I think some commercial companies might be a bit scared of Linux, especially upstarts which would be adopting a new dev tool. Not scared of Linux because it's hard to code for (everone knows UNIX is a programmers best friend. hehe), but scared of Linux because every non-GPL'd software gets bashed. Just look at reviews on HappyPenguin. All the shareware/commercial games have at least one comment saying something like "This sucks because there's no source"
      As someone else who wants to write games for a living, and also loves Linux, it's hard. People don't seem to realize that commercial games, first of all take a hell of alot of work, It would take a decade or so for a fully opensourced Quake III or Myth II, etc to be developed. Secondly commercial income can lead to many great free (speech) software, just look at Loki's contributions.
      It's not fair to expect a game programmer to do a job he doesn't like, so you can have a free game, and it's shortsighted to think that all commercial endeavors are "evil" and have no benefit to free software, but that is exactly what software companies are up against.

  • by Anonymous Coward
    Since the Linux beta is publicly available only in Japan, I'm not sure what would be included in a commercial product that would be released in the U.S..

    Y'know.. i keep seeing these comments from rather informed people talking about the PS2 linux, and then saying "but it's only available in japan, so i couldn't tell you anything about that".

    Will someone please tell me: is or is not the ps2 linux currently freely available under the gpl? if so, where, and why do we need to wait for sony to port it? if not, why hasn't some japanese person set up a web site with sony's linux alterations there?

    or are all of sony's linux patches done through closed-source kernel modules?

    Don't any japanese people read slashdot? (I don't know why they would, i'm just
  • We do need more people doing work like this. I always thought that the cool thing about the Dreamcast was how much it had been hacked open...

    /Brian
  • I'm lucky enough to program with SDL for a living, and it really rules - no doubt about it.

    It's really easy to get involved with, and you can find a link to its homepage here [libsdl.org]

    Good work Sam - you've really pulled one out of the hat here !

  • I don't know if you are reading the comments on this article, but I just thought that I would say hello. ;)

    -Your anonymous friend who remembers when you were just learning C++ in the Tercero lab.
  • Well, I posted this yesterday but it got wiped out by the database crash. I'll try again:

    I think many people agree that for Linux to become a popular and legitimate gaming platform, there needs to be some sort of breakthrough game that is released exclusively for Linux. If that were to happen, people might come to Linux like people came to CD-ROMs when Myst came out ("If you build it, they will come").

    My question is, and I wish I had asked Sam, would it be harmful for Linux to develop this game on SDL? My reasoning is that if this great game was released for Linux and written in SDL, the cross-platform nature of SDL would guarantee that the game would be out for Windows and Macs in no time at all. Then there would be no reason to switch to Linux...

    So then is it a good idea to develop Linux games for SDL? Should we worry about releasing games solely for Linux?
    • Good mod, it is an intersting post.

      If that were to happen, people might come to Linux like people came to CD-ROMs when Myst came out ("If you build it, they will come").

      As a linux zealot, my first response is hell yeah. Right on brother. The realistic response is yeah right. It's one thing to add a CD-ROM drive or video board to your hardware to play the latest game, it's another thing to learn a whole new operating system, no matter how cool the game looks. It's not like upgrading from 98 to 2000 to play some game, going from windows to linux is like a life changing type of thing if you're a windows only user.

      Should we worry about releasing games solely for Linux?

      Unfortunately, this is a money question. Can any comany recoup it's development costs by releasing only on linux? Maybe. I tend to think that they're just aren't enough people out there playing games on linux to make the kind of numbers worth it. Look at Loki. They're doing a great job, but struggling. Of course, what things be different if they had newer/better games. Not everyone likes Civ and FPS type stuff.

      Blizzard, right now, is one of the top game companies. If they did something on the order of Diablo III on linux only, I'm willing to bet that we would see a major shift of people using linux. You're going to need something that major to make people convert in my opinion.

      Personally, I'm going to wait and see how Neverwinter Nights handles it. I've pre-ordered mine, have you? That's the closest thing us Linux people have to a killer game that's not rumor or speculation.

  • ...installed Mandrake 8 on a box containing a Rage 128 video card, and the installation detected and set up 3D acceleration out of the box.

    I'm using one of those vid chips on MDK8. anything 3d (OPenGL, etc.) related locks up this box; tight. I love MDK [linux-mandrake.com], but it's NOT "out of the box".
    Yes. I bought the MDK8 Pro-Pack. So "out of the box" is meant literally...
    • You may need to tweak the settings on some machines- the same goes for Windows, it's just that Windows operates differently so that it's differs as to what card/motherboard/memory/etc. combination might need tuning to make it work.
  • CrystalSpace (Score:2, Informative)

    I think SDL is a great piece of code, I like it alot. But for mostly 3D apps, I think it might be worth to consider CrystalSpace [linuxgames.com], a powerful LGPL 3d engine. It works on Linux, Windows, MacOS, BeOS, and more. A PS2 port is in the work, too. I must admit that I have so far not used it; but I heard so many good things about it, i believe it is wort checking it out, if you intend to write a 3D applcation for many platforms.
  • Sony is going to be in a tizzy about this technology. While Sony has been very open about giving away middleware licenses, it's all been under NDA controls; Sony now officially has no control over what games get published on the PS2 and which ones do not. This is the worst possible situation for Sony; they make their profits based on royalty sales of third-party games. Now a third-party developer can develop PS2 games without getting any proprietary technology directly from Sony and without paying Sony a cent. There was recently a decision in Sony vs. Connectix in the US that makes it less likely that Sony can successfully pursue unlicensed game development. Given the $130 loss on each piece of hardware, this means that Sony is set to lose a big pile of cash. When Sony upper echelons get wind of this, the guy who released the Linux port in Japan will be demoted to toilet cleaner.
    • Sony now officially has no control over what games get published on the PS2 and which ones do not. This is the worst possible situation for Sony; they make their profits based on royalty sales of third-party games. Now a third-party developer can develop PS2 games without getting any proprietary technology directly from Sony and without paying Sony a cent.

      Actually, the worst situation would be if MS got control of their technology.

      But not everyone is sympathetic to Sony. There was this comment [slashdot.org] earlier on slash, where the author lamented: Why, does everyone here want to spend their money on PS2s? When you buy a PS2, you give money to Sony, who is both a member of the MPAA and the RIAA.

      This is one of the essential contradictions that geeks have to deal with. Games vs Politics. It can get confusing after awhile

      It is like the old time monkey trap from India. You place a fruit into a jar where the hole in the top is just large enough for the fruit. When the monkey reaches in, the monkey's hand is then too big to take out while the monkey holds the fruit. To escape the Monkey has to let go of the fruit. The monkey, of course is too greedy, and the reactively holds on to the fruit while the hunter makes his approach. Bye, bye, monkey.

      Now the right way for the Monkey to handle this would be to hack the jar by turning it over, spilling the fruit out. But there are no Monkey ackers that are smart enough to figure this out.

      Fortunately, they do not have to deal with the monkey equivalent of the MPAA and RIAA. I think.

      For Geeks, the choice is to either outsmart or avoid the trap.

      It is a bloody mess when you start to mix your politics with your entertainments.

      - - -
      Radio Free Nation [radiofreenation.com]
      is a news site based on Slash Code
      "If You have a Story, We have a Soap Box"
      - - -

    • Nah, I don't think so. Why? Because people pay Sony for a reason - PS2 development kits are a damn useful thing (for example: you *could* try coding your game on a consumer PS2, but wouldn't you like to debug it more easily? What if there are several people working on it, and they all want to debug it?).

      Hardware aside, Sony also give you source code, processor manuals and guides, and all the stuff you need if you want to pump up your game so it blows the competition away. If you don't do that, you're pretty much making shareware, and I don't see shareware making commercial developers on any other platform fear for their revenues...

      Before anyone asks, I'm a games programmer currently working on PS2. I do kinda know roughly what I'm talking about! :o)
    • Sorry, no. First of all, you would be hard pressed to publish a game for the PS2 without going through Sony. PS2Linux doesn't change this... You can't just dupe a copy and boot it up. Sony presses the discs. You want to write a game using PS2Linux and then sell it? Fine, but the person who plays it will have already paid Sony for their PS2Linux disc, and will have to download your game to play it. Good luck getting it on a shelf.

      Sony is obviously very carefully releasing the port, and I think it's time that people treat this as what it is: A great way to make programming the PS2 accessible to hobbyists without destroying their PS2 game market. They build cred, they open up the system a bit, but they keep their core business. Sony's done Linux, game, and demo hackers a big favor, and we should recognize that they did this in spite of the fact that people will try to rip them off... So we should concentrate more on doing cool things with it than on dancing on Sony's grave.
    • Lets be realistic. SDL is a thin wrapper for handing input, sound, and 2D bitmaps. That's it. For 3D, it leans entirely on OpenGL. So you're not going to be writing amazing PS2 games with SDL.
  • by MSBob ( 307239 ) on Wednesday August 22, 2001 @12:18PM (#2204676)
    Having seen a few gaming APIs in the past including a proprietary one that was highly protected by one of my former employers I can testify that SDL beats them all. Why?

    Because it's simple

    SDL takes the concept of KISS to the appropriate level. SDL makes things as simple as you can make them but no simpler. Everything you need is there and stuff that isn't you can implement yourself. I've used SDL_Image and SDL_mixeer and SDL_Mpeg and they are all wonderfully simple things yet they give you enough flexibility to implement what might be missing. It's so hard to maintain balance between flexibility and completness in a library but SDL makes an amazing job at that. Of course there is some rough edges and a bug or two but overall it's an outstanding API that anyone who wants to write games should have a look at.

    DirectX might be more complete but by the time you learn it all Microsoft will have released a new version (again) which will render some of your knowledge obsolete. KISS definitely isn't the prinicple behind DirectX

Some people manage by the book, even though they don't know who wrote the book or even what book.

Working...