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

 



Forgot your password?
typodupeerror
×
News

Ask Sam Lantinga About SDL On PS2 And More 176

Sam Lantinga is the author and project lead of the Simple DirectMedia Layer (SDL), which was recently ported amid general acclaim to the Sony PS2. People have been curious about SDL for a long time (it's been around for a while, and used in quite a few games). He's not just a library programmer though; he also designs games (in this case, working with Lauren MacDonell) and thinks hard and lucidly about the intricacies of information display within them. Here's your chance to ask Sam directly what's on your mind about SDL, game design and more. Note -- many questions are answered within the links already given, so hit those first. One question per post, please (but as many posts as you'd like) -- we'll forward the highest-rated questions on to Sam, and post his answers soon after.
This discussion has been archived. No new comments can be posted.

Ask Sam Latinga About SDL On PS2 And More

Comments Filter:
  • by reverius ( 471142 ) on Friday August 10, 2001 @02:38PM (#2111154) Homepage Journal
    Writing and distributing a game for a computer is fairly easy. But I don't see how the same process could be applied to the PS2.

    How would games developed for the PS2 with SDL actually get to people? I doubt we're going to see a lot of free, open-source games on DVD at Best Buy. But (for instance) I can play a whole slew of SDL-based games on Linux, Windows, and BeOS with just a quick download.

    It seems to me like this might be a problem for the PS2.
    • Maybe as a large complimation?

      You have seen the ones:

      1000 Game complimation

      As the PS2 uses DVD you might well be able to do this (or similer) and have a menu at the beginning that lets you choose which game to play.

      Would that be a problem?

      StarTux
    • Believe it or not, the PS2 *does not* depend solely on the DVD format. How else could you play original playstation games on it? It has 2 sets of lenses (or lense hardware). You could just burn a cd with the proper ps1 headers on it and get ready to rock.
      It's slashdot, but some people forget to do their homework.
      • It's slashdot, but some people forget to do their homework.
        Hehe, so where did you go do your homework? If you knew the slightest about PS2 compatiblity with the PSX, you would know that after detecting a valid PSX CD (which has to be valid, not a burned copy) it executes it on the IOP - the original PSX processor.

        And if you played close enough attention, you'd also notice that the orginial PSX BIOS loads as well ... hmm.

        Using your logic, you might as well keep developing for the original PSX, because on the PS2, that's all you would have access to.

        The PS2 does depend on the proper format for its own games, but I won't go so far to say that it requires DVDs as I don't know that for certain.

        BTW, what the hell are "proper ps1 headers" anyway? Just curious.

        M. R.

      • Although the PS2 does require modification to play burned CDR's, right? I thought it needed a mod chip for that. Also, can it play PS2 games with PS1 headers, or does it expect a PS1 game once it sees the headers?
  • by geekster ( 87252 )
    I've trying/using SDL for quite some time and I'm wondering if DOS support is planned... I like the way that Allegro is supported on so manny platforms, but I feel SDL is better when used on linux.
  • Direct Input?? (Score:2, Interesting)

    by kenixkil ( 460602 )
    I'm not sure if SDL already does this, but is SDL planning on doing something along the lines of Direct Input in order to get things like force feedback joysticks, and rarely used controllers (i.e., Steering wheels, PC Light Guns) to be easily put into a game?

    -Kenix "Beer is proof that God loves us and wants us to be happy."
  • 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 [mpaa.org] and the RIAA. [riaa.org]

    MPAA:
    Sony Pictures Entertainment

    RIAA:
    Sony Broadway
    Sony Class./Sony Music Soundtrax
    Sony Classical
    Sony Direct
    Sony Discos
    Sony Masterworks
    Sony Music Special Products
    Sony Music US (Latin)
    Sony Portrait
    Sony Wonder

    • You forgot Sony Pictures Classics, from which 'Crouching Tiger Hidden Dragon' was published.
    • Actually, I've heard that they lose money on every sale. The games sold more than make up for it. I know for a fact the XBox is the same: it'll sell for about 70% of the price it cost to make (published in Wired and other places). Price wars seemed to have forced this odd situation. Since Sony makes money from every game sold, and they know roughly the average number of games a console user will buy, they can max profit by undercutting competition in prices, selling more games (which have a HUGE profit margin), and make a bundle.

      And related to this, my plan is to by a few XBoxes after someone hacks a linux distro for it. I won't buy any games, it looks good just as a high-end graphics linux box (and far cheaper than a comparable PC). And to top it off, I'll basically be taking money from Microsoft.

      Maybe I'm oversimplifying, so if I'm wrong, please speak up!
      • Actually, selling a console for underneath the cost has been the long standing rumored tradition (PSX, N64, DC, PS2, and next GG and X-Box). It hasn't been a recent development as far as I know. Furthermore, down the road at some point or another the cost for the hardware does go down to underneath the initial sell price, so usually the console maker cuts the price (i.e. PSX) and they make money on the hardware. Also, Sony only sells game licenses unless they made the game (e.g. Gran Turismo 3), so they do make a bit, but I would estimate that they only make around $20-$25 of that $49.99 that you pay for games. It is still a lot, but most casual gamers that I know buy roughly 5 titles for any system due to the recent strong divisions in the consoles (N64 vs. PSX; DC vs. PS2; anticipating GC vs. X-Box with the former). It really isn't that insane of a profit yet, and it shows in that Sony is losing money. One other factor in the recent console generation is that X-Box and PS2 have a harder time of making money because many people that have not bought DVD players are now investigating into just getting a game console to play them. They figure that it is easier to just buy one hardware unit to perform multiple functions. MS and Sony will lose money over this and it could possibly have been the reason why so many PS2s were sold but so few blockbuster games have gone alongside them.
        • They'd like you (and the IRS) to believe that. The average user probably buys two games.

          I can build a basic computer system for under $400 (including DVD and hard drive). That's with a $35 case and onboard video & sound. It'll cost me $100 for good 3D video, but video cards have the highest margin by a mile. Do you think microsoft can't negotiate a deal to get parts at 75% of my cost?

          And when you take into account a console doesn't have to worry about buses and compatibility and and ports and peripherals, you get huge savings. One board, no slots, 2 joystick ports. Hypothetical ethernet. No 250-300W power supply. Plastic. No middlemen.

          • You're missing the research and development costs, marketing, getting developers on board and giving them help, support for the dummies who can't operate the machines correctly, and a whole lot more. Sure, the parts are relatively cheap but pushing out a console is not. They have to absorb those costs somewhere and no matter what, it is a money losing scheme for them in the first few years.
    • 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.

      You have hit on the essential contradiction that geeks have to deal with. Games vs Politics

      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 hackers 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.

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

  • by m2 ( 5408 ) <[slashdot.org] [at] [spam.ksub.org]> on Friday August 10, 2001 @04:54PM (#2114861) Homepage Journal

    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 accesible hardware documentation nor much "high level" docs, how do you think this can affect the future development of games for Linux (proprietary or otherwise)?

    Thanks

  • by phutureboy ( 70690 ) on Friday August 10, 2001 @05:53PM (#2116033)
    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?
  • Do you think its going to become more popular? Or is it doomed to fail by the wayside and dies off?

    StarTux
  • Sam, do you get the joke about calling you sasami on OPN irc yet?

    o/~ pretty mutation - magical recall! o/~

    Agian, good luck at your new job!

    -- Mongoose
  • Linux ports (Score:2, Interesting)

    by xpccx ( 247431 )
    It seems that one of the reasons that Linux games have been selling poorly is their release date coming much later than the original release for Windows.

    Now that you work at Blizzard, can you comment on whether Blizzard has an interest in releasing games for Linux along with the PC and MAC?

  • Maelstrom (Score:3, Interesting)

    by jmauro ( 32523 ) on Friday August 10, 2001 @02:49PM (#2119206)
    I'd first like to thank you for the port of Maelstrom, which has to be one of the most addictive games ever. (One of my friends called it legalized crack.) But how hard is it to port a classic game like Maestrom to SDL? Was it more work that it would of been to start over? Or because of its size and complexity was it relatively easy?
    • I doubt Maelstrom was all that difficult. But porting any game really has more or less the same problems, and it also depends on how the game is written.

      The main detail when porting any game is to make sure anything that is system specific; that is, input/output code, is heavily abstracted. If abstraction layers already exist, it is fairly easy to add in new code. If they don't, then it's still not all that difficult to split out the code and rewrite it.

      Descent [warpcore.org] didn't have proper abstraction, mainly since the code was a mess. It is still not a terrible lot of work to go through abstraction, because most of it is just mad grepping and replacing.

      Other problems include endianness (usually not hard to compensate for; just stuff some macros or defines to byteswap things on load), and word size. And let's not forget depending on large protocols, like D3D, that don't exist in other operating systems.

      On the whole, though, no, it would not be more work to start over than it would have been to port. Writing a game is a LOT harder than rewriting graphics and interface code. I should know. [sandwich.net]

      - aoiushi, #sdl

    • Re:Maelstrom (Score:3, Informative)

      by mav[LAG] ( 31387 )
      If you get the source distribution of Maelstrom, the /Doc subdirectory contains a bunch of docs written by Sam on the porting process.

      This includes how he dealt with using the native Mac resources, X video issues, timing and network synchronisation. All are entertaining and highly informative and answer your questions :)

  • ABI (Score:1, Interesting)

    by Anonymous Coward
    We all know SDL provides a great API for games programming. Are there any plans to create an ABI so that the same game binaries can run unchanged on different platforms (but on the same architecture)?
  • by debrain ( 29228 ) on Friday August 10, 2001 @02:44PM (#2119425) Journal
    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?
    • 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?

      Looking at all of your possible choices, and knowing relatively little (I've played the games, never tried coding w/ SDL), I really find it hard to believe it was developed solely for any one of these reason. It seems likely that there is no PRIMARY REASON, but more likely a combination of broadening all of the platforms, AND providing a base for game programming on the linux platform.
    • I think I can answer that: SDL was written long before the PSX2 came into existance. It has *nothing* to do with circumventing any fees *or linux*. It's all about *cross-platform* multi-media. Also, SDL doesn't focus on games. Many media players and emulators use SDL and it's helper libraries.

      - Andreas

      GLtron [gltron.org]: cross-platform gaming on Linux, Win32, MacOS, MacOS X. Soon with networking

  • higher level? (Score:5, Interesting)

    by magic ( 19621 ) on Friday August 10, 2001 @02:44PM (#2119426) Homepage
    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?

    -magic

    • 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!

      I'm currently preparing to port my game GLtron [gltron.org] to the SEGA dreamcast, and believe me, dealing with windowing, input, i/o and audio is the hardest
      part. Without libraries, it requires in-debt knowledge of the system you're porting to.

      Compared to that, keeping your graphics stuff somewhat API independent is fairly easy. In my (simple) case, it's just setting up some blending modes & texture states, and then send the vertices to the card.

      - Andreas

    • Re:higher level? (Score:2, Informative)

      by oman_ ( 147713 )


      SDL is for PS2 Linux.
      PS2 Linux has a version of Mesa (OpenGL clone)
      that ships with it.

      Unfortunately texture mapping isn't optimized with that release so the performance isn't
      what it could be.

      But if you're using OpenGL you're missing all the strengths of the PS2. I'd only use SDL for a frame buffer application or some port of an emulator or something.

      If you're going to code anything brand new just go straight to low-level. Otherwise you'll be wasting most of the machines power.

    • Let's say I'm a D3D or OGL programmer. Doesn't matter what platform I'm programming on - my rendering pipeline still looks basically the same:

      Geometry loading -> Vertex transform -> vertex lighting -> vertex shading -> rasterization

      Now, where does PS2 or Xbox come into play here about changing your graphics pipeline? I'm curious...

      Of course, you have to change the API you're using. And in general, there are a few fundamental differences between OGL and D3D. However, I think that these are not *too* difficult for an experienced game engine coder(s) to work around.

      Personally, I find D3D easier to understand (mainly because OGL's built-in matrix stack had me confused for a good while... who knows exactly why).
      • Re:higher level? (Score:1, Informative)

        by Anonymous Coward
        I've worked on all four platforms you've mentioned here, and as far as I can see the main difference is that of programmability.

        On a PS2 you have the ultimate level of control, of course at the expense of ease of programming. If you're not using any middleware then you have to write your own clipping code, and decide where you want the clipping to take place. Generally you want the clipping to happen after you've done your transforms on VU1, and the two approaches I've seen have been to do the clipping on VU1 or (the approach I favour) to have the main CPU assist VU1 in the clipping.

        Although having to write your own clipping is a pain, it does allow you to generate new vertices late on in the pipeline. This means you can do things like procedural geometry (eg trees, bezier patches) without taking a CPU hit.

        OpenGL allows you to write portable code at the expense of taking advantage of specific options your hardware might have. Having the extensions though allows you to target specific hardware options quite easily. For example, if you want to use pixel shaders then you use the NVidea extensions that expose this, but you'll still need to write a different renderer to support devices that don't have these extensions.

        Direct3D attempts to encapsulate all these extensions as part of its API. So you still end up writing a different renderer if the driver doesn't support the CAPS you need, but you should only need to write one version of say your vertex shader that'll run on any hardware that supports these. It also gives the software emulation of vertex shaders which is nice. Vertex shaders are less flexible than VU1 programming on the PS2, but in most cases they're nice to use.

        The XBox gives you lower-level access to the hardware than you get with DirectX giving you even more flexibility.

        In short, the pipeline doesn't differ all that much between the different things you're using. OpenGL and Direct3D are better suited to different things (ie workstation style graphics and game graphics), while the PS2 and Xbox are definitely geared up for rendering game graphics!

        Where it really gets different is with texture management. On the PS2 this is a total nightmare -- lots of hard work just to get yourself with a decent amount of textures per frame. On the Xbox this is pretty much all done for you, and on top of that you get texture compression.

        Sorry for posting anonymously...I'm sure some will understand why!
  • All of you are wondering this, so mod me up! :)
    Is ((Blizzard+Sam+SDL)==(Diablo2.linux))?
  • I know this will be targetted as "flamebait", but I feel it should be said: why would the average game player bother with these games, when they can just as easily purchase a used copy of Final Fantasy IX (for example) for around $20? And get a professionally-crafted title?

    This is clearly not DirectX, and it will never receive the recognition in the gaming industry that DirectX has simply because it's been adopted by the fringe. Do you honestly believe that most Playstation owners will honestly care?

  • just a thought about these types of libraries in general...

    Seems to me that a lot of gamers have complained on and off about the lack of original games and general stagnation of the game industry. In my opinion, that was alleviated a bit with the introduction of 3d engines that were produced specifically to make life easier for game developers. No longer did you need to have a large staff of programmers to write your game engine (2d or 3d) from the ground up. Take a portion of your game dev budget and plunk it down for a proven graphics engine. Get some artists, perhaps some 3d modelers and have at it.

    I think the proliferation and evolution of game development libraries like this will lead to making better games. The more of the budget that can be dedicated to fine-tuning the gameplay and design, the better. On the other hand, though, I fear that making games really easy and quick to create will lead to even more cheap, crappy quickie games with no substance.
  • by Mr T ( 21709 ) on Friday August 10, 2001 @03:34PM (#2120935) Homepage
    Was your depature good? Daniel Vogel also left. Is Loki in a good position or did you leave because of some problem. What's the deal?
  • Performance issues (Score:3, Informative)

    by uriyan ( 176677 ) on Friday August 10, 2001 @03:34PM (#2120942)

    To what extent do the games compiled with SDL for PS2 are slower than the analogous native versions? If a programmer uses a special programming style, does that improve the performance?

    Also, does the overhead of SDL grow since there are so many platforms/tricks to be supported (i.e. if a feature of PC hardware leads to a certain architectural solution, the same feature does not necessarily exist or is relevant to the PS2 architecture).

  • Gamecube, Xbox? (Score:5, Interesting)

    by evilMoogle ( 304970 ) <evilmoogle@@@evilemail...com> on Friday August 10, 2001 @02:54PM (#2121500)
    With SDL for PS2, are there any plans to do the same for the other next-gen platforms, the Gamecube and the Xbox?
  • by Usquebaugh ( 230216 ) on Friday August 10, 2001 @04:42PM (#2123543)
    Hi Sam,

    correct me if I'm wrong but to develop games for the PS/2, you need the Sony "TOOL" DTL-T10000 and the Metrowerks development environment, this runs about $20,000.

    In your communications with Sony has anything been expressed about opening up the PS/2 to home developers? The Linux thing is neat but most hackers would like to develop a game for the PS/2 and then burn it to DVD for distribution to friends, customers etc.

    I'm reasoning that the first console to have an affordable dev environment is going to clean up in market share. It would be a shame to see the Xbox 'innovate' in this manner.
    • correct me if I'm wrong

      Okay.

      The TOOL system is a plain ol' PS2 with a minor modification... it can run uncertified games (used for testing). The DevKit is a whole different kettle of sheep dung.

      As to CodeWarrior, where the hell did you get that idea? CW is just one of several compilers that can come up with PS2 binaries. The PS2 Devkit itself comes with a version of gcc [sourceforge.net], and Codeplay (the company I work for) is about to release vectorC {PS2}. [codeplay.com]

      And a note to anyone thinking having a PS2 version of SDL will allow you to write PS2 titles, guess again. A PS2 will only run certified software (unless you have the aforementioned TEST kit), so being able to compile for the box is only half of the problem. You also need to fork out cold-hard-cash for the certification.

      Of course, PS2 Linux will let you run your own titles, but only other people with PS2 LInux will be able to use it.
    • In your communications with Sony has anything been expressed about opening up the PS/2 to home developers? The Linux thing is neat but most hackers would like to develop a game for the PS/2 and then burn it to DVD for distribution to friends, customers etc.

      Never gonna happen. The console sells at a loss, Sony makes that up by licensing fees on the game titles. If every Joe with a PS2-SDK-Linux-SDL could crank out his own games:

      - the quality of games would go down (I'm sure there would be some real gems, but I'm generalizing).

      - Licensing would become a nightmare, with hobbyist either bitching about having to pay, or design companies bitching about hobbyist not paying.

      - DMCA violations left and right as hobbyists reverse-engineered the console.

      Hope this clears some things up for you.
      • - DMCA violations left and right as hobbyists reverse-engineered the console.
        Which part of the PS2 when reverse-engineered would make it a violation of the DMCA? I heard that most of the greatest code on the original PSX were made because of reverse-engineering the provided libraries and that lead to some stellar graphical titles at the time. Sony picked up on this and just released barebones development tools and libraries for the PS2 as the rumor goes, so you can just interact with the hardware directly. That's what makes it harder to develop on the PS2 since there is a lot of R&D costs associated unlike X-Box.
  • by j7953 ( 457666 ) on Friday August 10, 2001 @04:31PM (#2124427)

    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?

  • directx 8 and SDL (Score:5, Interesting)

    by drenehtsral ( 29789 ) on Friday August 10, 2001 @03:49PM (#2124548) Homepage
    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 driectdraw 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?
  • by Mr. Sketch ( 111112 ) <`mister.sketch' `at' `gmail.com'> on Friday August 10, 2001 @02:54PM (#2126412)
    Are you the least bit concerned that Microsoft might claim that 'DirectMedia' infringes on it's trademark of 'DirectX', 'DirectSound', etc?
  • The future of SDL (Score:3, Interesting)

    by Sludge ( 1234 ) <slashdot@NosPaM.tossed.org> on Friday August 10, 2001 @08:33PM (#2128470) Homepage

    It was a cause of concern when I read that you left Loki Software. Even though I understand that you personally hold the Copyright for SDL, the nature of Loki seems to imply that it's presence encouraged you to continue development. With that part of your life behind you, would you like (or have you made) a public statement about the future of SDL?

  • by DeadMeat (TM) ( 233768 ) on Friday August 10, 2001 @02:43PM (#2129537) Homepage
    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.


  • This is primarily a PC (as opposed to console) question:

    I have tried writing a game for SDL under both Linux (redhat 6.2, XFree 4.0.1, Geforce DDR), and under windows 2000 (geforce DDR, and also tried with an ATI all in wonder pro). In all cases, i could not get a page flipping full screen mode to work, and i could not blit the screen full and "flip" to achieve anything faster than 16fps at 1024x768. This is a dual pIII 800 i've been trying this on.

    My question is: Is it hardware or software?
    • That's mostly hardware.

      1024x768 at, say, 32bpp is 3.1MB. About 50MB per second if you get 16fps. This really doesn't sound like alot, until you consider that you're blitting to the buffer as well -and- you sit around waiting on the bus to 'flip' the buffer; and the bus is an awful lot slower than direct memory access.

      You can get around this by using a hardware buffer and hardware surfaces, but you're stuck with using just images and usually color key that way; no primitives for the time being, and alpha blend isn't always supported in hardware.

      As far as full screen page flipping goes, you need to use a hardware surface. You won't always get one; check the flags on the surface that is returned. May also need SDL_DOUBLEBUF, it's been awhile since I messed with that.

      - aoiushi, #sdl

      • yeah, i tried the hardware surface, and the double buffering and all that. None of which has actually been supported in any other mode than software emulation (i.e. copy the page not actually change the buffer that the card scans out of) on any machine i could put together using SDL on either linux or windows. I wrote a small terminal emulator in SDL and that was neat =:-) I just wouldn't use it for a 2d videogame where you actually have to blit graphics around =:-(
    • fyi moderators: parent is a valid question.. I've seen the issue first hand. i've seen questions asked about it on the mailing lists and the answer was something like (I don't remember who from) "why do you need to do that anyway?"

      But besides that, using SDL for one of my meager projects [freshmeat.net] has been nice. I only wish it could come out of the box on some platforms.

  • Are there any plans for supporting sub-windows in the manner of GLUT? What would be your suggestion as an implementation strategy for someone who wants to use this functionality with currently available SDL?
  • Weakest Link? (Score:3, Interesting)

    by Anonymous Coward on Friday August 10, 2001 @03:22PM (#2130712)
    Having ported a bunch of Windows games, and worked on SDL, what would you say the weakest technical link in writing games for Linux et al, is? With SDL we have a common 2D interface, with OpenGL, common 3D, OpenAL for 3D audio. What's left?
  • I've used SDL for almost 2 years now, and it completely blows away everything we have had to trudge through to get graphics going on a linux platform (Hell, it blows away what is available for DOS/windows... I haven't had this much fun programming cince my atari!)

    SDL will become a de-facto standard soon, it's fast, coupled with OpenGL it's powerful, and it's a dream to program with.. Svgalib was nice back in the 1980's but this is a real graphics lib.

    Hell, you can make a side-scroller game in PERL with it.... and there's a few embeded GUI's based on it now.
  • by _marshall ( 71584 ) on Friday August 10, 2001 @03:17PM (#2145098) Homepage
    First of all, I'd like to say that I love Myth 2. Without SDL, I don't know that Loki would have business. Anyway, on to the question.

    The Linux desktop as a whole has gained ground-breaking increases in the number of users, but still falls way behind Windows. In my opinion, the only thing that's holding back Linux is it's lack of entertainment, specifically in the game department. In order for Linux to truly take off, Linux needs a plethora of games to even try and be on the same level as Windows.

    Where do you see Linux gaming in the next few years, and do you think it will directly affect the number of users?
    • by Anonymous Coward
      Without SDL, I don't know that Loki would have business.

      Without Loki's business, I don't know that we would have SDL.

  • Will WarCraft3 use SDL at all? And the other question about WarCraft3?

  • Marketing (Score:2, Interesting)

    by xZAQx ( 472674 )
    What most Linux enthusiasts have realized is that Linux needs marketing in order for it to become a prominent desktop platform for end-users. We've been getting some help from IBM and Compaq to name a couple. Since you are using Linux as the core of the PS2, would you consider advertising it as so? It seems to me that many computer-literate console players would be intrigued by seeing a "Powered by Linux" sticker on their PS2s enough to go out and buy/download a distro.
  • Loki (Score:4, Interesting)

    by HoserHead ( 599 ) on Friday August 10, 2001 @03:05PM (#2147117)
    Hi Sam.

    First, thanks for SDL and SMPEG. They ran mpg321 [freshmeat.net] very well for a while. Thanks, too, for your development help.

    I know you probably get asked this a lot, but as a loyal Loki customer I just have to know: now that you and most other Loki programmers have moved on to bigger and better things, in your opinion does Loki have a chance in continuing to produce Linux games?

    • Apparently not... they just filed for Chapter 11. :(

      Not quite related to the context of your question, but... that's the answer. I think.

      IANAL, and I also don't work for Loki. :)
  • by Eugenia Loli ( 250395 ) on Friday August 10, 2001 @03:14PM (#2147164) Journal
    So, I was always wondering if there is going to be a 'real' integration between OpenAL [openal.org] 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 [v3x.net]? 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! :)

  • SDL and Python (Score:2, Interesting)

    by xiexie ( 237547 )
    SDL was written for porting games, and as such, you would expect most programs that use SDL to be written in C or C++, for speed. However, with the Python bindings for SDL, programmers can write in a better application programming language and still take advantage of your cross-platform "game" library. What applications do you envision with SDL and very-high-level languages?
  • by LukeyBoy ( 63868 )
    If Sony is distributing a bootable version of the Linux kernel to people outside their organization, don't they have to make their modifications available to everyone under the GPL license? When I first heard about Linux on the PS2, I was excited (I have one) but apparently when I last checked they weren't selling it yet. Now with them sending you a copy, they're clearly distributing the kernel (plus the compiler and other utilities) in a closed format. What gives??
    • This guys is a GAME DEVELOPER and is working on *SDL*. Where does it say to ask about GPL legalities and kernel distributions...???

      SHeeeeesh....... Welcome to Slashdot - we only have one drum and we beat it loudly.

      Why was this ever modded up to +5? It's not even flamebait - it's just totally off topic. Why don't we ask him about his opinion on stem cell research too....
    • To clarify an important point:

      You only have to make the source available to the person you send the binaries. There is no (ridiculous) requirement that you must open the source to everyone.

      However, you can't forbid that person from redistributing the source afterwards which generally makes the point moot.
      • Yes, but note that *those* people can then freely distribute *both* binaries & source.

        With so many clamouring for this, dont you think there would have been *one* person to have made it widely available by now..?

      • You only have to make the source available to the person you send the binaries.

        And if Sony is releasing a DVD containing a Linux kernel and GNU operating environment, it is releasing binaries to everybody who buys the Linux kit, must release source code for all GPL covered software on that DVD, and must make it available for the cost of duplication + S&H to all persons who have received Sony's binaries (GNU GPL [gnu.org], section 3b). In fact, Sony included the source tarballs on the Linux DVD.

        This, however, doesn't stop Sony from putting every single driver into proprietary kernel modules, which are treated as "mere aggregation"[?] [everything2.com] under the GPL.

    • From http://news.cnet.com/news/0-1006-200-5756218.html [cnet.com], linked in the slashdot story:

      The programming blueprints, or source code, for the kernel--the heart of Linux--is included on the DVD, Sony said. But the source code for a proprietary "runtime environment" that lets games play on the system is not.

      I know its slashdot, but I can't believe being a blind, mad, and paranoid GPL zealot will still score you +5.

    • They only have to release the source to their modifications to those that they distributed the binary to. Perhaps Sam received the modified source with his copy.

      Dinivin

      PS IANAL
    • GPL states that you have to distribute the source with the binaries. No exceptions That's why GPL is often referred to as viral.
      Completely new things like drivers can possibly be distributed in binary only or library format IANAL.
      • actually, the gpl states that if you derive from gpl'd works, you must make the source code available to anyone, provided they meet two conditions: you've distributed the binary to them, and they request the code. nowhere does it state that the source code must be distributed with the binaries.

        the gpl is referred to as "viral" because anything that is derived from a gpl'd product must be gpl'd. it spreads. like a virus. hence the term "viral".

        • nowhere does it state that the source code must be distributed with the binaries.

          I beg to differ:

          "3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:

          a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,

          b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,

          c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)"
  • by pinkpineapple ( 173261 ) on Friday August 10, 2001 @06:23PM (#2153249) Homepage
    I was investigating the possibility of using the SDL as the lowest layer in the system. My goal was to replace X Windows entirely, and use SDL instead to create a window system based on OpenGL in a manner not to far fetched with what CoreGraphics is doing inside MacOS X. It appears that SDL on the platforms it supports (in my case linux) , relies on the XWindows windows server and event propagation model.

    Do you think it would be feasible to plug something with less complexity than X Windows at the bottom of SDL to do such a task. How tied is SDL coupled with the platform architectures it supports?
    • This should be quite possible. Although I don't know anything about SDL, the fact that it is portable to non-X applications means that it must only use X for implementation and does not expose it to a program that is using SDL.

      Replacing X with a much better designed and modern interface has been a long time dream of mine and this sounds like a way to do it.

      I suspect SDL may lack features for allowing more than one program to cooperate on the screen (ie it lacks overlapping windows). But these should be possible to add with a few calls that should be designed to resemble the rest of SDL as much as possible.

    • SDL is not limited to XFree86. It also targets SVGAlib amongst other things (such as aalib - thats trippy)
  • by LL ( 20038 ) on Friday August 10, 2001 @03:41PM (#2156744)
    As with any system, there are trade-offs. The PSX2 graphics chip (EmotionEngine) has a number of features which require careful programming to exploit, especially given the (relatively) limited main memory (32M). The question is to what extent you expect to compromise your API's growth in capability/portability to support gee-whiz features. The dual of this question is of course that with a cross-platform API, you tend to end up with something equally mediocre across all systems, potentially leading to a catch-up mentality in the marketing perception which is particularly fatal in the computer gaming sector which continually relies on new features to draw in users. How do you expect to handle these compromises without alienating too many of the stakeholders (developers, manufacturers, users, etc)?

    LL

Beware of Programmers who carry screwdrivers. -- Leonard Brandwein

Working...