Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Perl Programming

Developing Games with Perl and SDL 248

segphault writes "Andy Bakun has written an excellent 20 page guide to game development with SDL_Perl for Ars Technica. The tutorial, which includes extensive code examples and plenty of screenshots, walks readers through the process of building a clone of the original Atari Kaboom! game." From the article: "One of the biggest benefits of using SDL is that it allows portable media applications to be written without having to be concerned with specific implementations of media libraries for each target platform. Bringing Perl into the picture takes the portability one step further, allowing media-rich applications to be written in a high-level language that can be targeted to a number of platforms. While programming using SDL requires knowledge of C and access to a C compiler, using SDL_perl does not. This greatly decreases the amount of time it takes to get something up on the screen and working."
This discussion has been archived. No new comments can be posted.

Developing Games with Perl and SDL

Comments Filter:
  • Hmmmm.... (Score:5, Interesting)

    by ObsessiveMathsFreak ( 773371 ) <obsessivemathsfreak.eircom@net> on Wednesday February 15, 2006 @07:37AM (#14723329) Homepage Journal
    It sounds good as a learning tool. It would be great if budding game coders, especially younger coders, could be given a simpler enviornment in which to begin toying with graphics and sound coding.

    However, it's in Perl. And I really have to ask myself; Do I want to play games coded by people who started programming games in perl?

    But seriously, whenever you code a game, you always end up using a scripting language of some kind. Perhaps this just cuts out that virtual middleman that is c/c++?
  • by rheum101 ( 601693 ) on Wednesday February 15, 2006 @08:10AM (#14723401)


    ...it's an oversimplification to state that perl cannot achieve the same performance as C/C++ ... where 99% of the time is spent deep within optimized libraries and perl (or any scripting language) is used to initialize and facilitate interaction, then it is quite possible that no material performance hit will result ... only profiling can really reveal this ... ...and perl / PHP / whatever is a MUCH easier on ramp than getting into deep C++ OO structures...
  • by Lazy Jones ( 8403 ) on Wednesday February 15, 2006 @08:32AM (#14723455) Homepage Journal
    We had great game development libraries for stuff like that 10 years ago, e.g. Allegro [demon.co.uk]. While I appreciate the Perl support here, I don't think anyone would put more than a couple of hours' worth of effort into a game that doesn't support pretty 3D stuff on modern graphics cards. If you want to do such things, SDL_Perl isn't a viable option (look at the effort involved [bloodgate.com]).

    So, sit down on your bums and write a Perl API for DirectX with good WINE support, folks. ;-)

  • by MosesJones ( 55544 ) on Wednesday February 15, 2006 @09:19AM (#14723597) Homepage
    Mildly interesting but in terms of modern games it won't cut the mustard so then you are looking at smaller games and a platform to learn on. IMO there is only one top platform to learn game programming for and that is the Java mobile phone platform J2ME [sun.com] that even comes with a standard (and pretty simple) 3D API [jcp.org]. Its also the fastest growing gaming market out there at the moment, and its still an area where mere mortals can break in and create the killer game and make money. Aiming at the PC market means you are against the multi-million dollar budget folks and that just isn't sensible.

    If you want to learn game programming... get a decent phone.
  • by monopole ( 44023 ) on Wednesday February 15, 2006 @09:41AM (#14723684)
    The neat thing is that PyGame is very fast. I've used it to implement tricky realtime cluster rendering for 3d monitors as well as frame accurate animations for temporally multiplexed displays.
    The nice thing about Python is that since it is bound to just about everything it also supports some very fast and powerful 3d engines such as VTK, OSG, and Delta3d.
  • Re:Other languages (Score:2, Interesting)

    by Tusaki ( 252769 ) on Wednesday February 15, 2006 @09:52AM (#14723739)
    Several games.

    Jake2 [bytonic.de] (Quake 2 clone) as the AC already posted.
    Puzzle Pirates [puzzlepirates.com]
    Tribal Trouble (good!) [tribaltrouble.com]

    check out javagaming.org [javagaming.org] for tons of discussions about the subject.

    and tools? how about:

    LWJGL: http://www.lwjgl.org/ [lwjgl.org]
    JMonkeyEngine: http://www.jmonkeyengine.com/ [jmonkeyengine.com]
    Xith3D: http://xith.org/ [xith.org]

    And there are probably tons of other games and tools I'm forgetting.

    And regardless what the trolls will say, it is perfectly possible to create a 2006-level game in java.
  • by WWWWolf ( 2428 ) <wwwwolf@iki.fi> on Wednesday February 15, 2006 @10:02AM (#14723813) Homepage

    You can use OpenGL in SDL. The net effect, with all of the SDL extra libraries is something along the lines of the entire DirectX toolkit already.

  • Re:Easy (Score:3, Interesting)

    by sbrown123 ( 229895 ) on Wednesday February 15, 2006 @03:54PM (#14726577) Homepage
    I agree with you there. I wrote a Java wrapper around SDL and OpenGL a few years back. After doing that, almost all the rest of the code for a game (actually interactive applications in my case) could be written in Java using the wrappers. After presenting some examples to some hardcore C/C++ programmers, they stopped complaining about the "Java is slow" stuff. Ofcourse, they had to continue that C/C++ could make it go slightly quicker and take less memory. I couldn't argue with them there. But what they couldn't do with C/C++ was develop similiar apps/games as quickly. Now, someone who did not know these C/C++ programmers would argue that they just didn't know the languages that well. But for those who wonder I have this: how many times have you written a large C/C++ application and found yourself looking for some oddball memory leak?

    Its a natual progress with languages. Languages like C and C++ are giving way to languages like Java and C#. But interestingly enough Java and C# will be replaced too: by scripting languages like Perl. As programmers, we just have to accept this and move with the tide or drown in ignorance.

"Protozoa are small, and bacteria are small, but viruses are smaller than the both put together."

Working...