Slashdot Mirror


Developing Games with Perl and SDL

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

248 comments

  1. Fine for simple games but... by Viol8 · · Score: 1, Informative

    ... I can't see perl being fast enough for games that require
    really complex physics or enviroment calculations , or sophisticated AI.

    I do think this is a nice way of getting people started in games
    programming though.

    1. Re:Fine for simple games but... by shobadobs · · Score: 0, Troll

      I can't see perl being fast enough--

      Obviously.

      I do think--

      Obviously.

      Thanks for your contribution.

    2. Re:Fine for simple games but... by Anonymous Coward · · Score: 2, Informative

      Tim Sweeney had a talk about related stuff at POPL'06, you can check the homepage for his slides.

    3. Re:Fine for simple games but... by Anonymous Coward · · Score: 0

      Replying to your own post in that manner is the lowest form of wit. You didn't even manage to get that high. Loser.

    4. Re:Fine for simple games but... by Andrzej+Sawicki · · Score: 1

      When was the last time you saw a game with a sophisticated AI? Chess excluded.

    5. Re:Fine for simple games but... by tgv · · Score: 1

      While I like the Oscar Wildeish style of your comment, the commentator is right: your post is one of the higher forms of obviousness. Your pride may be hurt, but there's no need to start calling names.

      By the way, the tone of your reply is sarcastic.

    6. Re:Fine for simple games but... by rheum101 · · Score: 5, Interesting



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

    7. Re:Fine for simple games but... by Vintermann · · Score: 1

      I don't think we're going to see all that impressive games for linux anyway, they don't follow the usual open source rules, as has already been discussed to death. They will be small, they won't have really complex physics or enviroment calculations, or sophisticated AI anyway. So they might as well be written in Perl.

      (They can still be fun, though. Two amusing games, mortal szombat and frozen bubble, were written in perl as I recall. But they are both clones of old games on other platforms)

      There is a way high-quality open source games could be produced, though, that I intend to promote. The group auctions at http://fundable.org/ can at least be used to ransom games already developed, and that site shows promise. Perhaps it will be extended in such a way as to provide reliable up-front funding of FOSS games as well.

      I'm trying out a promotion campaign through http://www.pledgebank.com/promotefundable (you can tell I like these sort of schemes, can't you? :-)

      --
      xkcd is not in the sudoers file. This incident will be reported.
    8. Re:Fine for simple games but... by Anonymous Coward · · Score: 0

      Since when are chess AIs advanced?

    9. Re:Fine for simple games but... by Viol8 · · Score: 1

      >obviousness. Your pride may be hurt, but there's no need to start >calling names.

      Nothing to do with pride. I do a harmless post and along comes
      one of the standard issue slashdot yaboosucks crowd who do
      nothing except make failed attempts at putting down others
      because they think they're being standoffishly intellectual.
      Its a bit sad.

      >By the way, the tone of your reply is sarcastic.

      One step up from his then.

    10. Re:Fine for simple games but... by Viol8 · · Score: 1

      True , but if most of your game is going to be written in
      highly optimised C with a few dozen lines of perl wrapper, why
      bother with Perl in the first place?

    11. Re:Fine for simple games but... by shobadobs · · Score: 1

      Oh, grow up. You were karma-whoring at the top of a story and got called on it.

    12. Re:Fine for simple games but... by syntaxglitch · · Score: 1

      Chess AI is actually probably 90% brute force with some position evaluation functions using heuristics of some sort. Processor-intensive, yes, but not really "sophisticated". This works because any given board configuration has a limited number of availible moves, and look-ahead trees can often be pruned aggressively since bad outcomes are easy to recognize.

      If you want a sophisticated AI, go find a program that plays Go at a master player level.

    13. Re:Fine for simple games but... by Volanin · · Score: 1

      I agree with you perl is not the most adequate for complex games, but this simple tutorial has cleared more doubts that I had than any C tutorial I have seen... VERY well written. =)

      --
      If I clone myself, can I call it a thread?
      If a girl winks to us, can I call it a race condition?
    14. Re:Fine for simple games but... by Vo0k · · Score: 3, Insightful

      Moreover, writting in Perl is fast and easy. You can test your ideas, check if the game would be playable at all, create a working mockup in Perl and finding "not enough raw horsepower" move to C with the "final product". Sure it will take longer than writing everything in C from scratch, but shorter than writing everything in C and then deciding it sucks and abandonning it.

      --
      Anagram("United States of America") == "Dine out, taste a Mac, fries"
    15. Re:Fine for simple games but... by Anonymous Coward · · Score: 0

      That is stupid. The only way for Perl to not be a performance hindrance is for the game to not be compute-bound or to write the engine in another language and then using Perl for scripting. Then Perl is no different than the usage of every other scripting language in games. EVE uses Python. WoW uses Lua. Jack and Dexter have GOAL. Quake 3 had C + VM + custom shader and UI scripting languages.

    16. Re:Fine for simple games but... by Anonymous Coward · · Score: 0

      Probably because you don't know C well enough!

    17. Re:Fine for simple games but... by Anonymous Coward · · Score: 0

      You are missing the fact that proper utilization of optimized perl libraries will give most of these benefits without extended development time.

    18. Re:Fine for simple games but... by somersault · · Score: 1

      why exactly are you wanting all your games to be Open Source? Most games will benefit a lot from being privately funded, and best of all, people get paid for doing a job that they will enjoy. Open Source is all nice and well if you're unemployed, or dont ever want to have free time. I did have fun making bots for Counter-Strike years ago, in between leaving school and starting uni, and I made the sourcecode available www.planethalflife.com/teambot , but not that I have a job I wouldnt want to spend my spare time coding up a professional level game and making it OSS (actually I have wanted to for a while, but I dont make the time). If I made some crappy little 2D space shooter then I wouldnt mind releasing that as Open Source, but if I made a really decent 3D shooter, or some 2D game with a lot of depth, then I think it would be fair if I wanted to try to make some cash off of that too, and then maybe release the source after 5 years or so. I enjoy giving back to communities, but if someone gets a chance to make a living from doing something they love (making games) then I fully respect and support them in wanting people to have to buy their game. Anyway I'll stop ranting

      --
      which is totally what she said
    19. Re:Fine for simple games but... by Viol8 · · Score: 0, Troll

      I don't need or care about karma. Not everyone who posts here
      is a 13 years old or thinks like one. You were just being an
      arsehole.

    20. Re:Fine for simple games but... by WillerZ · · Score: 1

      There are no programs that play Go at a master player level. I can beat most of them most of the time in ieven games, and I'm only 11 kyu.

      --
      I guess today is a passable day to die.
    21. Re:Fine for simple games but... by maxwell+demon · · Score: 1

      Well, that kind of supports the claim that an AI that plays Go at master player level would have to be quite sophisticated, doesn't it? After all, he didn't claim that you would actually succeed in finding it, did he?

      --
      The Tao of math: The numbers you can count are not the real numbers.
    22. Re:Fine for simple games but... by Anonymous Coward · · Score: 0

      Actually eve client is 90% python, with only the core engine in C/C++.
      Serverside is almost pure python, with just stackless python making it all run.

      E.g. most of the gamelogic is python, not C/C++, only the graphics engine is in C/C++.

    23. Re:Fine for simple games but... by Anonymous Coward · · Score: 0

      Any half-way professional chess engine ever to come after the eighties is light-years more sophisticated than that... get a clue.

    24. Re:Fine for simple games but... by CastrTroy · · Score: 1

      What makes you think that a company can't make money from opensource software? Do you think all the people at Redhat are working for free?

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    25. Re:Fine for simple games but... by somersault · · Score: 1

      you can make money from support, but I'd much rather earn my cash from coding than answering the phone. Also, if your software actually works and is well designed, then it shouldn't really need support (and if someone then cannot use your software, it is likely not because of a problem with your software, but because the person needs a basic course on how to use PCs).

      Making money from support has always seemed a low down tactic to me to make money off of OSS, which I thought was ideally meant to be free. But if it allows users who can actually understand their machine and its problems to get free software, then great. I bought a boxed version of Redhat, and I doubt it cost as much as I paid to actually make the CDs and manuals..?

      --
      which is totally what she said
    26. Re:Fine for simple games but... by Anonymous Coward · · Score: 0

      Except that it worked! You bit big time.

      Does the word "oops" come to mind? If not, the word "loser" should.

    27. Re:Fine for simple games but... by Anonymous Coward · · Score: 0

      You assume that this brute force process is low in rperformance requirements.

    28. Re:Fine for simple games but... by tgv · · Score: 1

      It would be more valiant if you posted with your real name/handle.

    29. Re:Fine for simple games but... by Andrzej+Sawicki · · Score: 1

      It can win against most very good players, so I call it sophisticated. Other games do not have that kind of AI, because the programming involved is neither clever nor a brute-force search.

    30. Re:Fine for simple games but... by Anonymous Coward · · Score: 0

      Yeah, not everyone does...unfortunately you do.

      Teeny bopper faggot.

    31. Re:Fine for simple games but... by Anonymous Coward · · Score: 0

      Idiot. He replied to a troll who replied to his post. Learn to browse at -1. Loser.

    32. Re:Fine for simple games but... by Eivind+Eklund · · Score: 1
      ... and, of course, you could even use some or other decent programming language. Interfacing C from Perl sucks, at least compared to Ruby (and I'm told so about Python, too), and Ruby is much more pleasant to program in. Or at least that's my opinion, after a year of Ruby experience and about ten years of Perl experience.

      Eivind (Perl Must Die!)

      --
      Doubting the existence of evolution is like doubting the existence of China: It just shows that you're uninformed.
    33. Re:Fine for simple games but... by syntaxglitch · · Score: 1

      Point is, chess AIs are strong players only because the game is so amenable to brute-force look ahead approaches. Yes, the programs are still quite sophisticated, but all that sophistication would likely perform at average competence at best without the look-ahead. For very open-ended games (like Go, as mentioned earlier) where brute-force is not an option, strong AI players simply don't exist.

    34. Re:Fine for simple games but... by syntaxglitch · · Score: 1

      That was, in fact, precisely my point. :)

      To the best of my knowledge, no such Go AI exists.

    35. Re:Fine for simple games but... by Andrzej+Sawicki · · Score: 1

      I agree. Too bad there are plenty games less open-ended than Go, and still without a good AI.

      By the way, my original comment was to a post claiming a sophisticated AI would (among other things) prevent the use of high-level languages. The only case where that applied was a chess AI with its "sophistication", all other game AIs being rather simple.

    36. Re:Fine for simple games but... by Vintermann · · Score: 1

      Why, I DO want you to earn money off your open-source software! The things I dislike are:

      1. That copying/modifying the games are illegal

      2. That everyone pays a fixed, high sum to get a copy.

      3. That you don't get paid. I'm serious!

      If you set up a group auction at the site I mentioned, you can promise to release your game as open-source once a certain sum has been promised. There are many great things about this: It gets open source. I hope you agree that FOSS software is preferrable, all other things being equal? You get paid, which is a good thing, and insures that the services you provide won't be undersupplied. Under group auctions, everyone has reason to commit a sum propotional to the value of the game for them, so you can still get some money from people who might not be able or willing to pay 30$. Best of all from the buyers perspective, they don't risk paying for nothing: if you don't reach the sum you want for your game, no one pays anything, and the game isn't released.

      --
      xkcd is not in the sudoers file. This incident will be reported.
    37. Re:Fine for simple games but... by somersault · · Score: 1

      "no one pays anything, and the game isn't released" if the people haven't played the game how would they know that it's worth paying for? I think it would be great to get paid for spending your time on something, obviously, and have enough money to fund you on another project, and also yes it's nice to release your source, but if you do, then obviously nobody will need to pay you any more, they will just compile your game for themselves, and copycats can modify things slightly then claim the result as their own work etc.. I'd rather release something, then delay the release of the source for a year or 2, or at least the parts of the source that I dont want people copying for a couple of years. That does seem like it would slow down developement though. I wouldnt mind it if individuals requested the source and told me what projects they were going to use it on, then at least I'd feel I was being recognised for the work I'd done, and could put links on my site to say ' is using my code'

      --
      which is totally what she said
    38. Re:Fine for simple games but... by Vintermann · · Score: 1

      "If the people haven't played the game how would they know that it's worth paying for?"

      Commercial games have this problem too.

      One alternative for you might be to release a binary version for free and then allow the users to buy open the source with a group auction. Or buy extra level sets or whatever. The important thing for you is that you make money, and don't have to worry about copying, for in essence your customers have already paid for that right. You don't get per-copy fees, true, but you can set your one-time price at whatever it's worth to you, and which the market accepts.

      btw, my experience is that open source projects rarely borrow code from each other, but that they are good at acknowledging the original authors.

      --
      xkcd is not in the sudoers file. This incident will be reported.
  2. That's cool and all... by Anonymous Coward · · Score: 0

    But what if I'm too lazy to copy and paste, and just want to download the game?

  3. Hmmmm.... by ObsessiveMathsFreak · · Score: 5, Interesting

    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++?

    --
    May the Maths Be with you!
    1. Re:Hmmmm.... by bhima · · Score: 2, Informative
      As a embedded developer, I think the simpler development environment you are opining about is this: http://www.xgamestation.com/about_gamestation.php

      Because much of the complexity new developers run into is baggage from the Operating System and the Development Environment.

      And YES Linux is just as guilty as Windows is these days.

      --
      Nothing in the world is more dangerous than sincere ignorance and conscientious stupidity.
    2. Re:Hmmmm.... by WWWWolf · · Score: 1
      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?

      Yeah - do I want to play games coded by people who started programming games in pure assembler? I mean, even the best game programmers make indecipherable code, and then they had to do that in a cryptic language that few people have patience to learn... =)

      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++?

      I think that Perl/Python/Ruby + SDL is definitely going to be an interesting as a whole platform for simpler games.

      The scripting languages have also proved to be excellent platforms to do all sorts of prototypes of humongous systems in. With SDL, also great for game prototypes, even full games.

      And yes, they are also great as an embedded interpreter in "real" games.

    3. Re:Hmmmm.... by Mr_Silver · · Score: 3, Insightful
      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?

      I would ask yourself, "why do you care what it is written in?". The whole point of playing a game is that its supposed to be enjoyable. The fact that it is written in Perl, C, BASIC, Java or Cobol is immaterial if you enjoy the game.

      Would you suddenly consider Half-life 2, GTA or any other game "rubbish" just because you found out that it was written in a programming language that you didn't like or didn't think would be suited to the task?

      I see a similar thing with people who snub Visual Basic applications. Yes we all know how good or bad VB is at development but if someone has produced a tool using it which does what you want, quickly, easily and at the right price, why does it matter what it was written in?

      --
      Avantslash - View Slashdot cleanly on your mobile phone.
    4. Re:Hmmmm.... by namekuseijin · · Score: 1

      What's the matter? Perl is far better than BASIC, and whoemever ever played an MSX knows that Konami developed its many great classics for that platform in that damn language! Some of them were later ported to the Famicom/Nes by the names Castlevania, Metal Gear and the likes...

      --
      I don't feel like it...
    5. Re:Hmmmm.... by Sloppy · · Score: 1
      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?
      Nothing wrong with that; most of us have played games written by people who started with BASIC or 6502 assembly language.

      Some other good news is that python + pygame will give a programmer pretty much the same tool that this article is about, except with readable code as a bonus.

      --
      As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
    6. Re:Hmmmm.... by NNland · · Score: 1

      There is SDL + Python, PyGame, and a few other packages for Python, which, in my opinion, tends to be easier to learn than Perl. Plus there are already many games produced with Pygame, etc.

    7. Re:Hmmmm.... by bill_mcgonigle · · Score: 1

      Yes we all know how good or bad VB is at development but if someone has produced a tool using it which does what you want, quickly, easily and at the right price, why does it matter what it was written in?

      Maintainability. But you're right for a game that pretty much doesn't matter. For business applications, there's a point to not encouraging VB apps - who knows when Microsoft will discontinue various versions of the language.

      --
      My God, it's Full of Source!
      OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
    8. Re:Hmmmm.... by __aaclcg7560 · · Score: 1

      I never heard of MSX until now. Very interesting.

    9. Re:Hmmmm.... by pjt33 · · Score: 1

      Ah, but if it's written in PERL the programmer is probably really twisted and the last level will be absolutely impossible.

    10. Re:Hmmmm.... by rsd · · Score: 1

      wow, that was a flashback.

      I remember when I first learn Z80 assembler I wanted to move a sprite
      in screen 2 using the arrows keys, because it was too damn slow in BASIC.

      The result was that it was just too fast to follow.

      Good days

    11. Re:Hmmmm.... by Anonymous Coward · · Score: 0

      And security. Abuse, by crack dot com, was written in Lisp. It also had a local privilege elevation security bug:

      http://www.remoteassessment.com/archive/infabase/a buse/abuse-lisp-gain-privileges.4218.txt

      Note the last line of that security archive: "Reported: November 01 2002."

      Abuse was released in 1995. It takes forever to uncover bugs in an app when relatively few people use the language it is written in.

    12. Re:Hmmmm.... by asbjxrn · · Score: 1
      And security. Abuse, by crack dot com, was written in Lisp. It also had a local privilege elevation security bug

      I don't know that much about the game, so your point may be valid, but it looks to me that the bug was in that relatively unused language called C++ which was used for the game engine. (The exploit in particular mentiones buffer overflows, which are relatively more common in C++ than lisp.)

      From the faq on http://abuse.resourcez.com/:

      E. Was Abuse Written Entirely in Lisp?

      This has the unfortunate possibilty of becoming a well spread misconception.
      While the external entity code that you will write for modifications and
      additions (or total reconstruction) of the game will be in Lisp, the game
      engine was written in C++. There is also a small amount of 80x86 assembly
      in the DOS version.

      Here is the wc (word count) output on the source code.

      Lisp code: 5374 16377 142220 total
      C++ code: 67904 185889 1717174 total
      Asm code: (negligible)
    13. Re:Hmmmm.... by shotgunefx · · Score: 1

      What the hell does that even mean? That you think it would be somehow coded poorly (which an end user wouldn't care as long as it performed well enough) or that Perl programmers would write bad, as in boring games?

      Personally, I started off in programming writing games in x86 asm and C targeting the 268-486. (yeah! mode X and self optimizing code)

      The last 6 years have been Perl almost exclusively. Started off as mostly web related stuff then to general programming.

      Last few months, I've been working with Perl/SDL for a digital dashboard replacement for my car. (The hardware side is PIC based)

      Granted there's no 3D (yet), mostly lot's of animated sprites and text, but Perl/SDL has been more than up to the challenge, especially considering the target platform is an old 466mhz celeron I had laying around.
      Performance is way past satisfactory.

      And excruciating sparse documentation aside, it's been pretty easy. Especially comparing it to my early experiences.

      You're not going to write Doom3 in it, but I think once the changes stop and it settles a bit, I think it will be a nice platform for making games.

      --

      -William Shatner can be neither created nor destroyed.
  4. Python has been used for this. by Poromenos1 · · Score: 2, Informative

    Python with SDL (pygame) has been used to write Dungeon Siege (I think that was the game, correct me if I'm wrong) and I liked the result a lot.

    --
    Send email from the afterlife! Write your e-will at Dead Man's Switch.
    1. Re:Python has been used for this. by duncangough · · Score: 1

      Pygame is well worth a look, especially since the site got revamped and activity has picked up again.

      I wrote two games using Pygame, Slider and WordSlider which were pretty painless to do, going from a standing start of knowing nothing about Pygame to knowing enough to finish a game.

      Sure, SDL might not be fast enough for any kind of 3D FPS but if you wanted to write one of those you'd be learning C++ or picking up some middleware like the Torque engine. Honestly, though, everyone in here should stop whining about how scripting languages aren't 'fast enough' for games - they're easily fast enough for puzzle and adventure games, just not *every* game.

      The right tool for the job? Of course!

    2. Re:Python has been used for this. by Haeleth · · Score: 4, Informative

      Python with SDL (pygame) has been used to write Dungeon Siege (I think that was the game, correct me if I'm wrong) and I liked the result a lot.

      I don't know what game you're thinking of, but it certainly isn't Dungeon Siege, which was written very conventionally in C++ with DirectX. (It was originally developed with OpenGL, but the developers switched to Direct3D later on, possibly because the game was being published by Microsoft.)

      At any rate, certainly neither Python nor SDL was involved at any stage.

    3. Re:Python has been used for this. by Anonymous Coward · · Score: 0

      Also I would mention I just completed the exact same game from chapter 11 of "Python programming for the absolute beginner" with pygames and livewires modules in 116 lines of eminently more readable code involving three classes, not almost 400 of some brutally ugly code.

      I will have to sing the praises of perl's capacity to interface with an underlying linux system however, I have found python to be very weak and under-documented in the department of dealing with linux command line utilities.

    4. Re:Python has been used for this. by Anonymous Coward · · Score: 0

      Yep, I would like to second Python and pygame as the more appropriate combination. If you learn Python instead of Perl as your first language you will have a much easier time learn C++ later.

      Of course there are the philosophical issues. In Perl the philosophy is maximum expressiveness over readability, while in Python the philosophy is best summed up by following these simple instructions:

      > python
      import this

      Ok yeah I have turned into a Python fanbay.

      A CADD program I have been developing: http://www.dynamol.com/
      is getting a revamp with Python as the scripting language as opposed to Javascript. If I were starting from scratch I would certainly write a significant portion of the software in Python and use C++ for the computationally intensive portions.

      Since scientific software and games can both contain computationally expensive parts it makes sense to have a language like C++ or D as the backend. However for fast development and you should choose a langauge like Python which will speed up development of other parts by about 5-10X. Plus you can become proficient with Python in about 1 week.

      Yes. Python Rox!

    5. Re:Python has been used for this. by JackDW · · Score: 0, Flamebait
      Yes, pygame has been around for a while. It's a similar thing - an SDL wrapper for Python. But it is vastly superior because it is Python. Why would you want to write anything in Perl?

      Perl programmers are just Python programmers who haven't yet seen the light. Perl is the BASIC of the late 90s: unfortunately, like some kind of zombie, it keeps staggering about spreading poor programming practices and unreadable code, and no-one can destroy it. For God's sake, stop writing Perl and learn Python. It will take you two hours and you will never go back.

      --
      You're an immobile computer, remember?
    6. Re:Python has been used for this. by Anonymous Coward · · Score: 0

      It seems that Civilization 4 is using Python for modding too.

      I think Python will gain some more adepts soon... ;)

    7. Re:Python has been used for this. by jonathan_ingram · · Score: 1

      Pygame was also used to write one of my favourite 'play for 5 minutes' games: SolarWolf, a modern reimplementation of the Atari 2600 classic SolarFox. It even has a Windows executable download!

    8. Re:Python has been used for this. by impossiblerobot · · Score: 2, Funny

      Yes, but in the two hours I spent learning Python, I would have already finished writing the game in Perl (and would have been playing it for an hour and a half).

      --
      Impossible Robot
    9. Re:Python has been used for this. by Andreas(R) · · Score: 1

      Another game is OpenRTS, which is a realtime strategy game developed using Pygame.

    10. Re:Python has been used for this. by monopole · · Score: 3, Interesting

      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.

    11. Re:Python has been used for this. by Valdrax · · Score: 1

      I have found python to be very weak and under-documented in the department of dealing with linux command line utilities.

      Out of curiosity, what problems have you run into? I'd be glad to give some pointers since I've done a decent amount of work with Python in places where shell scripts would normally be used.

      --
      If it's for-profit but free, you're not the customer -- you're the product (e.g., the Slashdot Beta's "audience").
    12. Re:Python has been used for this. by ajs · · Score: 2, Insightful

      Yes, yes, python is not less perfect than perl. We get it. I think the point to TFA was that high-level languages + SDL make a nice game development combination, not that [insert high level language] is special.

    13. Re:Python has been used for this. by Anonymous Coward · · Score: 0

      At first it was mainly it's in the "greping" of output, which after abandoning os.system to run it I began to use os.popen after battling with documentation etc.

      But now it's more on the side of getting the output from continuous things, like top, watch and more specifically from comand line encoders. It looks like it's going to be difficult to make a GUI for a commandline encoder like ffmpeg2theora which can have a progressbar based on the console output without putting tons of effort into an area which seems to me to be very poorly documented in comparison to others.

      If you have any rad bookmarks for "python meets bash" or nicely commented code you've seen, maybe point them out to me, would be appreciated.

    14. Re:Python has been used for this. by gnuLNX · · Score: 0, Flamebait

      " think the point to TFA was that high-level languages + SDL make a nice game development combination, not that [insert high level language] is special."

      But this is not true. To write a game you need a language that will enable you to provide high level organization. Python is way superior to Perl in this case. Anybody who has ever learned both language would almost certainly agree on this point.

      --
      what?
    15. Re:Python has been used for this. by Anonymous Coward · · Score: 0

      mod parent up

    16. Re:Python has been used for this. by Anonymous Coward · · Score: 0

      Uhh, no. Dungeon Siege is programmed using C++ with DirectX. The only games I've seen that are written using Python are little hobbyist games. It's certainly not used by any large gaming companies producing games that compete at a commercial level. People can use whatever languages they want to write these little tiny games that no one plays or pays for, but if you want to compete with commercially available games it's going to be in C/C++ or you're just wasting time.

      Commercial game programmers use C/C++. If you're using something else, quite frankly, you're not a commercial game programmer and are probably not capable enough to be one.

    17. Re:Python has been used for this. by Anonymous Coward · · Score: 0

      This is a fine example of a local-maxima tuned greedy algorithm.
      Gah. Better post AC to avoid the lingering stench of theory-speak.

    18. Re:Python has been used for this. by gnuLNX · · Score: 1

      Try

      locate *.py

      on a redhat system. Not a lot but maybe enough to get you going.

      --
      what?
    19. Re:Python has been used for this. by clydemaxwell · · Score: 1

      Okay, I'm a perl programmer, back up your statements.

      --
      Browsing with classic discussion, noscript, at -1 and nested
      no hidden comments and I only mod UP
    20. Re:Python has been used for this. by Valdrax · · Score: 1

      But now it's more on the side of getting the output from continuous things, like top, watch and more specifically from comand line encoders.

      Ouch. That's actually a little more advanced than what I've done and would really depend on your ability to interpret terminal-type specific special characters. I'd actually be interested to know how you do this in Perl too. I'm guessing that there's a CPAN module for this sort of thing?

      I'll have to give this one some thought. Unfortunately, I don't have access to Python at work, and the python.org website seems to be timing out for me, so I'll have to think about this at home.

      --
      If it's for-profit but free, you're not the customer -- you're the product (e.g., the Slashdot Beta's "audience").
    21. Re:Python has been used for this. by ajs · · Score: 2, Insightful

      Anyone who has learned both languages does not agree, in my particular case. They're both powerful, highly flexible languages that have powerful constructs for managing high-level structures. Perl tends to have more varied facilities while Python tends to have fewer, but often more robust facilities (twisted comes to mind).

      They are both excellent languages, and if you're of the ill-informed opinion that one or the other does not serve well for large, highly strucutred projects, then I suppose our experiences simply differ.

    22. Re:Python has been used for this. by jrutley · · Score: 1

      I think it was Temple of Elemental Evil.

    23. Re:Python has been used for this. by Anonymous Coward · · Score: 0

      monsterbattle.org

    24. Re:Python has been used for this. by stupkid · · Score: 1

      Perhaps you are thinking of the Temple of Elemental Evil. Almost all the logic for the game is done in Python. Think of it as the "glue" between the compiled modules. It is for this reason that the mod community for ToEE is still making improvements and changes to the game like the Circle of Eight.

    25. Re:Python has been used for this. by LightningBolt! · · Score: 1

      I think the post may have been referring, vaguely, to Scott Bilas' talk at GDC a few years back about game object scripting. Indeed, it was not Python, but "Skrit", an in-house language. I found a link to the slides from the talk here...

      http://www.drizzle.com/~scottb/gdc/game-objects.pp t

      According to the talk, most of the "game" code (i.e. "non-engine" code) was written in Skrit.

      --
      Old people fall. Young people spring. Rich people summer and winter.
    26. Re:Python has been used for this. by JackDW · · Score: 1
      Yeah, I always found Perl was good for writing short programs. The problem is that it never seemed to scale to large ones. My programs would outgrow Perl, and then I'd have to rewrite them. There were two main problems - firstly it was difficult to use complex data structures (Perl's good at the simple ones, but when you want to use objects...), and secondly it was hard to read the code! That made it hard to make improvements and fix bugs later. These two problems don't exist in Python.

      Now, obviously, what language you use is a matter of taste, and no language suits everyone. But I've found that Python saves a lot of time. The real reason why you'd write a game in Perl or Python is nothing to do with portability - it's because it's easier to write in those languages! Of the two, Python is easier. Honestly. Time spent learning it will not be wasted.

      --
      You're an immobile computer, remember?
    27. Re:Python has been used for this. by JackDW · · Score: 1
      My statement seems to be "Perl encourages bad programming practice". I think that Perl encourages bad programming practice in the same way that C does - this is not surprising, as Perl has a C-like syntax. However, Perl is worse than C. Perl is a language of special cases, with seemingly thousands of built-in functions. Is it not true that the specification for Perl 5 is the Perl 5 interpreter?

      Perl reminds me of BASIC, because BASIC is another language of special cases. BASIC dialects from the 1980s involved hundreds of built-in functions: DIM, PRINT, and GOTO to name a few. That's a lot like Perl. You don't want that, because it's not orthogonal. You want to be able to define functions that behave in exactly the same way as built-in functions. You want the high-level features in your high-level language to be extensible.

      However, it's really just a matter of taste. Python works for me, Perl works for you. Have fun. But please don't encourage beginners to start with Perl.

      --
      You're an immobile computer, remember?
    28. Re:Python has been used for this. by qa'lth · · Score: 1

      Actually, Civilization 4 uses Python at its heart. The AI and the graphics code is written in C++, and everything else, all the game logic, in Python. Makes it really easy to dig in and modify the game on a very high level.

    29. Re:Python has been used for this. by tdelaney · · Score: 1

      You've obviously not been paying attention to any of the other posts. So I'll summarise for you:

      http://wiki.python.org/moin/OrganizationsUsingPyth on (Games section).

      You might want to read the rest of that page too.

    30. Re:Python has been used for this. by Blakey+Rat · · Score: 1

      I also don't really know how anybody could actually *like* Dungeon Seige as a game. The thing plays itself, the bosses are lame, and the inventory system was a total pain in the ass. Not to mention it took like 5 minutes to herd your entire party onto an elevator at the same time, if you could pull it off at all.

    31. Re:Python has been used for this. by Talchas · · Score: 1

      Actually, the game mechanics are not in the python, but there are lots of hooks where you can do stuff, most of the ingame UI screens (not the 3d stuff) is in the python, and most of the game mechanics and all of the AI will be in the C++ game mechanics they will release soon.

      --
      As the Americans learned so painfully in Earth's final century,free flow of information is the only safeguard against...
    32. Re:Python has been used for this. by a_ghostwheel · · Score: 1

      Not Dungeon Siege, but many of us like Ultima V: Lazarus remake of original Ultima V using Dungeon Siege engine.

  5. A 286 Emulator? by joevai · · Score: 2, Funny

    Ideal. I always wanted my 4ghz pc to simulate the clock speed of a 286!

  6. Wait a minute by eclectro · · Score: 4, Funny


    I thought perl was already a game.

    --
    Take the cheese to sickbay, the doctor should see it as soon as possible - B'Elanna Torres, "Learning Curve"
    1. Re:Wait a minute by Dirkpitt007 · · Score: 1

      wahahaha I like your train of thought..

  7. Well, duh! by GreatBunzinni · · Score: 3, Insightful
    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.

    Yet, it does need knowledge of Perl, another programming language, and access to a Perl interpreter. So, indeed, in the end it needs the exact same thing that is needed to write a game in C or C++. A person needs knowledge of a programming language, knowledge of an API and access to software which will make the program happen. So, having this in mind, wtf is that intended to mean? Sheesh....

    --
    Slashdot, fix your code or at least hire someone who is competent at it to do it for you.
    1. Re:Well, duh! by iGN97 · · Score: 1

      Well, duh. It makes perfect sense; of course a guy named Bakun would throw Perl at himself.

    2. Re:Well, duh! by Jedi+Alec · · Score: 2, Insightful


              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.

      Yet, it does need knowledge of Perl, another programming language, and access to a Perl interpreter. So, indeed, in the end it needs the exact same thing that is needed to write a game in C or C++. A person needs knowledge of a programming language, knowledge of an API and access to software which will make the program happen. So, having this in mind, wtf is that intended to mean? Sheesh....


      Because, well, C and Perl are the same level of complexity. All this superficial nonsense like garbage collection, not having to worry about memory allocation etc. won't save any time whatsoever.

      --

      People replying to my sig annoy me. That's why I change it all the time.
    3. Re:Well, duh! by Shaper_pmp · · Score: 1, Insightful

      Yeah, this means nothing at all, right? I mean, everyone knows Perl's just as hard to learn as C/C++, right? And it takes you exactly the same amount of time to jump through all the hoops coding something in strictly-typed, anally-retentive, compiled C/C++ than hacking it together quickly in a loosely-typed Perl script.

      Oh, and scripted languages' memory management saves exactly zero development and testing time over non-memory-managed languages, too, while simultaneously not helping you at all to avoid memory leaks and other nasty hard-to-debug errors. And CPAN stores phenomenally huge amounts of pre-written plug-in-and-go code for both Perl and C/C++, right? And...

      Either we haven't ever written a line of code in C/C++ or Perl, or we didn't think before we posted...

      Disclaimer: I first learned to code in C/C++, so I harbour it no ill-will at all. Nevertheless, anyone seriously suggesting that Perl won't save you time over C/C++ in the short-term is insane. Of course, a non-trivial project where C/C++'s strict typing and formal style produces big wins is another matter, but when the context's "getting something up on the screen and working" it's simply no contest.

      --
      Everything in moderation, including moderation itself
    4. Re:Well, duh! by Anonymous Coward · · Score: 1, Informative

      >> Perl's just as hard to learn as C/C++, right?

      Actually I find it much harder and even trying hard I never happened to learn it. Also code is almost unreadable. And anything loosely typed is inherently anal rententive.. and bug prone.
      On the memory management issues you have a point, but then C# or Java or Python are just plain better.

    5. Re:Well, duh! by Anonymous Coward · · Score: 0

      They key part there would be: "...get something up on the screen and working"

      The idea of high(er)-level programming languages allowing you to create working code faster by being easier to read, write, and maintain is pretty well known. There are reasons that people use C/C++ over assembly beyond the portability issues.

    6. Re:Well, duh! by KingNezII · · Score: 1

      Indeed, I completely agree with the GreatBunzinni. The original statement is misleading or unnessary as he pointed out. Perhaps perl is easier to learn for most people, the school system seems to think that Java is a great starting language. I tend to disagree, back in the day I tried teaching myself Java 1.1 and the farthest I got were animated applets. When I took up PASCAL, I had a much easier time, had more fun, and developed a bunch of silly games & apps (it all fit on a single floppy disk & anywhere with a PC I coded). The smallish games that I coded still had a plethora of functions and needed a certain amount of design. HelloWorld in a cool looking font isn't a game.

    7. Re:Well, duh! by phantomfive · · Score: 1

      I have to agree with you. I read through the article and examples, and it doesn't seem much easier than progamming using SDL in C.

      If anyone is interested in programming in SDL in C, here is a great online book about it:
      Programming Linux Games. (warning, it's a PDF!)

      --
      Qxe4
  8. example game by falkryn · · Score: 4, Informative

    http://www.frozen-bubble.org/ example of a nifty game written with sdl_perl

    1. Re:example game by falkryn · · Score: 1

      well, actually perl-sdl 1.19, not 2.x, but still, shows some of what can be done.

    2. Re:example game by lRem · · Score: 2, Informative

      Another nice one: SDL-Vexed

      --
      Always put off dealing with time-wasting morons. If you would like to know how... I'll get back to you
    3. Re:example game by wherrera · · Score: 1

      It's definitely a pretty addictive game. The only problem is that the high difficulty settings are pretty much too hard to be playable--it needs a middle difficulty setting.

      Don't see any delays in the game due to perl interpreter whatever. I suppose that is because the graphics is all in C calls to fast SDL library routines.

    4. Re:example game by Anonymous Coward · · Score: 0

      Gotta love the comment near the top of /usr/bin/frozen-bubble:

      # Yes it uses Perl, you non-believer :-).

    5. Re:example game by ajs · · Score: 1
      No, you almost certainly want to avoid that game. I'd be quite concerned about running code from someone who took programming quite that seriously. Some examples:
      If you only run a sucking proprietary OS like Windows, or if you use a lousy Gnu/Linux distribution for which there is no binary package available here
      Free software is a very interesting (and important) concept. It was brought to mankind by Richard M. Stallman, the founder of the Free Software Foundation. (no, actually, free software was a rather common case pre-Stallman, but he created the copyleft and coined the term)
      If you're interested in the reason why you should not port Frozen-Bubble to proprietary OS'es [...]
      Nuff said.
    6. Re:example game by Blakey+Rat · · Score: 1

      Not to mention it's just a ripoff of Bust-A-Move. Linux users talk about it as if it's the second coming of Mario III or something.

    7. Re:example game by CronoCloud · · Score: 1

      I've tried it....and wished it was written with Python and Pygame instead. It's too slow on this box, though maybe it's just this game and not a Perl/Perl_SDL problem in general.

  9. Hmm by darkmonkeh · · Score: 2, Insightful

    While this may give a backbone for new programmers to get out their first game, the complexity of game making cannot be "simplified" more than it already is. Perl itself is slow, and not directly suited for making games. One would have to think carefully about what they wish to achieve before committing to making a game using SDL_Perl.

    1. Re:Hmm by 91degrees · · Score: 1, Insightful

      Perl may be slow, but this doesn't always matter. If you use a fast high level API to deal with physics and graphics, and keep AI fairly simple, then the time spent executing perl code will be very small, and the effect on overall speed will be negligible.

    2. Re:Hmm by mysticgoat · · Score: 2, Insightful

      Perl itself is slow....

      I keep seeing statements like this, and I wonder what they mean.

      I have used Perl fairly extensively in data mining and format conversion work, sometimes using the Tk extension to provide a GUI front end, but I don't do real time applications or games. However I expect Perl would be adequate for many games, because I think that a lot of people are not recognizing the difference between a scripted language and an interpreted language.

      Perl is a script language that is compiled on the fly, before processing starts: there is no Perl interpreter. My understanding is that the resulting code runs at the same speed as an executable from a C compiler: that it is in fact an executable from a specialized C compiler. My experience is that large, complex Perl scripts will exhibit a noticeable delay on start-up (during the compilation phase), but are indistinguishable in performance from any other executable once data crunching begins.

      IME, any noticeably slow performance in Perl scripts can be traced to inefficient uses of regular expressions or string evals (both of which see heavy usage in the kind of work I've been doing). But these are program design issues, not inherent in the Perl implementation itself, and I doubt that either of these techniques would be used much in games. Obviously Perl isn't a good choice for 3D games with Shrek level animations, but I don't think you could do that kind of thing with any of the common C or C++ packages.

      So am I missing something here? Is Perl really too slow for game development, or are people thinking that since it is scripted, it must be implemented like a Basic interpreter? Or are people overly concerned about the start-up delay of the compilation phase (which can be gotten around for Windoze/Wine by using something like perl2exe to precompile an executable for distribution).

    3. Re:Hmm by pmancini · · Score: 1

      I have to agree with this. I have been doing a lot of data analysis with perl against large flat files (WordNet) and have been very impressed with the speed I got. Perl kicks mighty butt when it needs too.

      Frankly I am interested in trying out this new library. It would be pretty cool to get some graphic bang for my perl buck.

    4. Re:Hmm by truckaxle · · Score: 0, Redundant

      Perl itself is slow

      Slow in what way. I recently wrote a data parsing tools that demultiplex's a large binary sensor data file, changes then endian and combines some of the quantities, look for fault conditions and check checksums and finally writes out processed data into separate files. I first prototype in Perl and then rewrote in C. The performance difference was around 12%. The time in production and total lines of code was another story and of the order of 3 to 1.

    5. Re:Hmm by sleepingsquirrel · · Score: 1
      Perl itself is slow.... I keep seeing statements like this, and I wonder what they mean.
      That means for tasks that are computation intensive, Perl is something like 100 times slower than a natively compiled language like C. Now if your project is mostly I/O bound, then it might not really matter how fast your language is, since you spend most of the time waiting for disk or user input.
      Perl is a script language that is compiled on the fly, before processing starts: there is no Perl interpreter. My understanding is that the resulting code runs at the same speed as an executable from a C compiler: that it is in fact an executable from a specialized C compiler.
      Wrong. Perl compiles a script's source into a parse-tree to which optimizations are applied and finally an interpreter walks this parse tree. See chaper 18 of Programming Perl.
    6. Re:Hmm by phantomfive · · Score: 1

      One way I know that perl is slower is the arrays. An array access in C can take 2 or 3 CPU instructions, whereas an access in Perl may take 10 times longer because they expand automatically.

      I would also imagine that all variables being stored as strings would slow things down a bit. Then there is the issue of automatic memory management, which may or may not slow things down. I'm not saying perl is a bad language, but there are issues that would slow things down even if it were compiled before running.

      --
      Qxe4
    7. Re:Hmm by chromatic · · Score: 1
      I would also imagine that all variables being stored as strings would slow things down a bit.

      It might, if it were true. It's not.

    8. Re:Hmm by phantomfive · · Score: 1

      OK, but creating the illusion that all variables are stored as strings will slow things down, even if it is just an illusion.

      --
      Qxe4
    9. Re:Hmm by chromatic · · Score: 1

      What now? Perl adjusts its speed according to your perception of its internals?

    10. Re:Hmm by phantomfive · · Score: 1

      Well, instead of speculating wildly, we can always look it up. http://taubz.for.net/code/perlsharp/docs/Perl/Scal ar.html

      From the page, Scalars are stored by Perl as a string, integer, or double-precision floating point number. But, Perl will convert on the fly between its stored representation and the desired representation.

      Keeping track of how the variable is stored and converting it to the desired representation is going to take some extra processing. Probably not much in most cases, but it is still a bit slower.

      I'm not saying perl is a bad language, personally I think it's great and very useful. But it is slower than C.

      --
      Qxe4
    11. Re:Hmm by chromatic · · Score: 1
      Well, instead of speculating wildly...

      I've patched Perl a few times myself; it's not speculation.

      Perl stores scalars in a structure called an SV. There are different subtypes of SV to hold various combinations of integers, floating point numbers, and strings. When you use a scalar in one of those contexts, Perl checks a flag to see if the SV has a valid value for the particular context. If so, it uses the cached value. If not, it converts from the current, most accurate value that it has to the value most appropriate for the context, caches the converted value, and sets a flag to note that it now also has the converted value available.

      It's not the case that Perl stores everything as strings internally, nor is it the case that it always converts to and from the contextually appropriate representation. Yes, there is bookkeeping there, and in some cases that's slower than the corresponding C or assembly code, but I don't think the link you quoted gives the whole story. (In my opinion, this is also not the single biggest reason why Perl can be slower than C code -- there's scope overhead, reference counting, and opcode dispatch.)

    12. Re:Hmm by rsd · · Score: 1


      I'm not saying perl is a bad language, personally I think it's great and very useful. But it is slower than C.



      Well, I would say that anything but Assembly is slower than C.

      a good C compiler brings the compiled code as close as possible to an optimized assembly code. You just cant beat that unless you have a well optimized assembly or a poorely written C code.

    13. Re:Hmm by mysticgoat · · Score: 1

      Perl compiles a script's source into a parse-tree.... See chaper 18 of Programming Perl.

      Thanks for the reference! I now understand why Perl is slower than C: the text has answered my questions very well.

  10. Yes, but where is my Perl module to create by antifoidulus · · Score: 1, Funny

    Korean women?
    Do I win a prize?

  11. Silly question. by Anonymous Coward · · Score: 1, Informative

    It's in Korea, isn't that obvious?

    1. Re:Silly question. by maxwell+demon · · Score: 1

      In Korea, your module only creates old women.

      --
      The Tao of math: The numbers you can count are not the real numbers.
  12. No, thats what flas is for. by cheekyboy · · Score: 2, Informative

    Flash achieves this easily, especially with the dancing frog.

    --
    Liberty freedom are no1, not dicks in suits.
  13. Tetris puzzle games, or c64 style games. by cheekyboy · · Score: 2, Insightful

    Think C64 games, but with true 24bit graphics at 640.

    SDL+PERL can be thought of a 'flash killer' hack.... with enough specific libraries for sdl in perl, they
    could do extra tricky bits animated mpeg1 in a sprite with one command.

    --
    Liberty freedom are no1, not dicks in suits.
  14. Portable? by Nahooda · · Score: 1

    Yeah, maybe games are easily portably then, but actually, I don't want to see my games running on Windows...

    -DBS

    --
    Sigs suck!
    1. Re:Portable? by Anonymous Coward · · Score: 0

      >>but actually, I don't want to see my games running on Windows...

      God! What a petulant little prick you must be.

      Anyway. Probably not much chance of seeing you games running anywhere other than on your own box.

  15. Not anything new by MORB · · Score: 1

    There's been SDL bindings around for a lot of languages for a while.
    Personally, I think lua would be a much more interesting choice than perl for this.

    1. Re:Not anything new by peterpi · · Score: 1
      Anything would be better than perl :) C would be a particularly good... oh, wait.

      Lua would be a good one though. It's found quite a little niche for itself in games as it is so easily embedded into a parent program. Lua would be a more relevant skill than perl for somebody looking to get into working in games. (IMHO)

    2. Re:Not anything new by maxwell+demon · · Score: 1
      Anything would be better than perl

      Anything? Never heared of it. Where do I get a compiler or interpreter?
      --
      The Tao of math: The numbers you can count are not the real numbers.
    3. Re:Not anything new by JackDW · · Score: 1
      Python is an even better choice. Check out pygame. It's great.

      p.s. Don't write anything in Perl.

      --
      You're an immobile computer, remember?
    4. Re:Not anything new by MORB · · Score: 1

      Python is an even better choice.

      It's a matter of taste. The only advantage of python IMO is that it comes with an standardized and large set of libraries.
      This is not actually an advantage in every situation, though. And there's also plenty of libraries available for lua, only there is no standard package thereof.

    5. Re:Not anything new by Bazzalisk · · Score: 1
      Anything would be better than perl

      There speaks a programmer who has never used INTERCAL.

      --
      James P. Barrett
    6. Re:Not anything new by Anonymous Coward · · Score: 0

      anywhere

    7. Re:Not anything new by stevey · · Score: 1

      Lua is an interesting language, and it is already well known for its use in games.

      Personally I've written a couple of simple games using a framework of SDL + C, all the logic goes inside loadable Lua code.

      It is very simple to write, say, an SDL + C program to display a board for othello, and handle clicks, etc. Then you can write the AI in lua, and handle the toggling of the pieces, and scoring easily.

      Writing the game soley in Lua I think would be trickier. Although I've been out of the Lua world for a while I don't recal seeing a Lua + SDL binding. If there is though, great!

      (I still get a little annoyed with Lua at times because the default installation doesn't have code for doing simple things like reading the files in directories; handy for loading plugins, etc. Thankfully writing a simple filesystem extension is trivial. I even wrote a simple networking library for lua too :)

    8. Re:Not anything new by MORB · · Score: 1

      (I still get a little annoyed with Lua at times because the default installation doesn't have code for doing simple things like reading the files in directories; handy for loading plugins, etc. Thankfully writing a simple filesystem extension is trivial. I even wrote a simple networking library for lua too :)

      Yeah, that's the problem with lua. I think it will improve a lot from now on though, first because there's already a fair amount of useful libraries available for lua, and second because lua 5.1 has a standardized way to load modules, native or not.

      And yes, there are SDL bindings for lua.

    9. Re:Not anything new by stevey · · Score: 1

      Yeah I do remember lurking upon the lua-users mailing list and seeing the start of the standardisation for the 5.1 module loading API.

      That is definitely a good thing, and makes it a lot easier to distribute non-core extensions. (although my extensions for Lua 5.0 were simple enough to write).

      Neat to hear that there is an SDL binding though, thanks!

  16. obviously ... by Anonymous Coward · · Score: 0

    "While programming using SDL requires knowledge of C and access to a C compiler, using SDL_perl does not"

    yeah, seems logical when writing in perl .. which needs access to a perl interpreter and perl knowledge ...

  17. It'd be nice if there was just an OS C/C++ "base" by cyclomedia · · Score: 1

    i.e. something that compiles with gcc (though isnt particularly bothered about the version so long as it's newish) and even throw in project files for Visual Studio and Visual MingW and include a simple SDL powered "hello world", perhaps playing a sound and showing a couple of sprites and a 3d (opengl?) based ball bouncing about.

    then all you'd have to do to write a portable SDL app is delete those things (all very clearly declared and laid out) and begin writing, safe in the knowledge that any porting problems are because you-the-code made assumptions about the size of int.

    and if you can just "cd sdl_appbase" and "make" without having to run configure and install bash,python,gawk,cygwin and god knows what else then that'd be nice too.

    --
    If you don't risk failure you don't risk success.
  18. Games in Perl? by cablepokerface · · Score: 2, Funny

    What's up next?
     
      Enhancing gui user experience with Oracle Forms
      HowTo: Brute Force numbercrunching in Visual Basic
    or
      Windows 98 Security 101

    1. Re:Games in Perl? by GreggBz · · Score: 1

      For most amatures, the development environment is more important than speed and efficiency of the compiled code. What can I use to implement my really brain twisting algorithms with the most ease and elegance. What can I use to get closest to the API and the math, because that is more important to understand in game development land then the language. So, if you already know Perl, go for it. But for me, Perl does not immediately come to mind. I've been writing games in VB.NET and DirectX for a few years, and the brain dead IDE and robust object oriented features of managed .NET code make it a pleasure. And, to put away all those stubborn myths about VB, you can write a 3d game pretty close to commercial quality with a lot less effort. Besides, unless your writing DOOM, CPU cycles are cheap, really cheap. My time spent obfuscating code is not so cheap.

    2. Re:Games in Perl? by cablepokerface · · Score: 1

      Your are correct actually, in my little joke I should have added the 6.0 after 'Visual Basic'. I code .NET also (although c#) and indeed, both the languages are a pleasure. I can't wait for the whole managed directx 10 hive to start.

    3. Re:Games in Perl? by Anne+Thwacks · · Score: 2, Funny
      Please can I have a game written in Oracle Forms?

      Any game will do!

      In return, I will give you a number crunching program in Visule Basic. Unfortunately, the only number it crunches is '4' :-)

      --
      Sent from my ASR33 using ASCII
    4. Re:Games in Perl? by Darby · · Score: 1

      In return, I will give you a number crunching program in Visule Basic. Unfortunately, the only number it crunches is '4' :-)

      Do you have a copy in any linux compatible language?
      I had no idea how freaking many 4's I have. This could really get to be a problem soon....

      darby@gentoo_laptop ~ $ slocate 4 | wc -l
      74714

  19. Low level 2d game libraries are so 1990's ... by Lazy+Jones · · Score: 2, Interesting
    We had great game development libraries for stuff like that 10 years ago, e.g. Allegro. 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).

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

    --
    "I love my job, but I hate talking to people like you" (Freddie Mercury)
    1. Re:Low level 2d game libraries are so 1990's ... by dreemernj · · Score: 1

      I've used Allegro in the past but I am a n00b and was wondering how Allegro compares to things like SDL. I've had people tell me to try out SDL instead but can't really find a good reason to. Is it supposed to be more powerful or something? Or more compatible? Or do people just like it more?

      --
      1 (short ton / firkin) = 89.1432354 slugs / keg
    2. Re:Low level 2d game libraries are so 1990's ... by arevos · · Score: 1

      There are numerous cross-platform open source OpenGL 3D engines that have scriping hooks. OGRE, CrystalSpace and Panda3D spring to mind. I'd personally go with Panda3D and Python, if I wanted to create a modern-looking 3D game with minimal effort.

      Or invest in Torque3D.

    3. Re:Low level 2d game libraries are so 1990's ... by WWWWolf · · Score: 1, Interesting

      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.

    4. Re:Low level 2d game libraries are so 1990's ... by FenrirWolf · · Score: 1

      Really the purpose of the two libraries are similiar, but go about it in different manners. Allegro intends to be an "all in one" gaming library, while SDL is more concerned with just giving you a framebuffer and ways to manipulate it. So, Allegro deals with sprites and manipulating them, where SDL is more low-level. Allegro also includes a bunch of extra stuff, such as the integrated DAT file format and so on.

      Personally, I prefer Allegro, even though I have used SDL too. But maybe that's because I got used to doing it the "Allegro way" back in the days of DOS. :)

      OS/platform compatible wise, I think SDL and Allegro are about on par. However, SDL has more market penetration so to say, and might be faster to resolve bugs.

      --

      Where's the submit button??

    5. Re:Low level 2d game libraries are so 1990's ... by Abcd1234 · · Score: 1

      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.

      Okay:

      a) Not every game needs to be 3D. This attitude is why gameplay has languished in the name of pretty graphics.

      b) With the continued success of things like the GBA, it's clear that there's plenty of interest in 2D games.

      c) The general approach to making games is the same, whether 2D or 3D. Perl+SDL creates a low-barrier environment for beginners to try their hand at game creation.

      d) It takes a lot more work to create art for a 3D game (models, textures, etc), which is just a further barrier for hobbyists, especially beginners.

    6. Re:Low level 2d game libraries are so 1990's ... by Sloppy · · Score: 1
      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.
      What makes you think that? Many (perhaps even most?) game concepts just aren't 3D.
      --
      As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
    7. Re:Low level 2d game libraries are so 1990's ... by dreemernj · · Score: 1

      Thank you that was helpful.

      And to boot I just went through and converted the 2d fighting game I was making over so the AI runs in a different thread then the graphics (I use a neural network to analyze movements for a more reactive computer opponent) thanks to the built in threading tools of Allegro. I think I'll stick with this one.

      --
      1 (short ton / firkin) = 89.1432354 slugs / keg
  20. PyGame by hwaara · · Score: 2, Informative

    Pygame is a really nice wrapper around SDL (http://www.pygame.org./ There are plenty of guides and tutorials on the website.

    Why use Perl when you can use Python? :-P

    --
    -Håkan
    1. Re:PyGame by brpr · · Score: 1

      Because Python has broken lexical scoping!

      --
      Freedom is not increased by mere diminuation of government. Anarchy is freedom for the strong and slavery for the weak.
    2. Re:PyGame by Ekarderif · · Score: 1

      Because people are masochists?

    3. Re:PyGame by arevos · · Score: 1
      Because Python has broken lexical scoping!

      This is no longer true, and hasn't been for years.

    4. Re:PyGame by brpr · · Score: 1

      I'm afraid it is still true. Lexical scoping has never been properly fixed in Python in relation to closures. See this link for an excellent explanation. Perl does lexical scoping just fine, and I like explicit variable declarations, even in a scripting language.

      --
      Freedom is not increased by mere diminuation of government. Anarchy is freedom for the strong and slavery for the weak.
    5. Re:PyGame by arevos · · Score: 2, Informative

      That isn't a problem with lexical scoping; that's a problem with ambiguous assignments within closures. The lexical scoping problem was something else altogether. And whilst Python closures are read-only, this doesn't mean that they are broken; just incomplete.

      Whilst read-write access of closures would be nice, it's trivial to get around this. It's certainly not enough to get me to switch back to Perl - yuck! No thanks! I like my well-defined object model :)

      IIRC Ruby has read-write closures? Why not use that over Perl?

    6. Re:PyGame by brpr · · Score: 2, Informative

      How is it not a problem with lexical scoping? The assignment is ambiguous because of the way lexically scoped variable declarations (don't) work in Python. Whether this is a problem with lexical scoping itself or the syntax of variable assignment in Python is really a meaningless question, since it's a problem resulting from the combination of the two. Definitional questions aside, I don't want to work in a language with "incomplete" closures when there are better alternatives.

      Perl has a perfectly well-defined object model. Not sure what you mean by that. If you just mean that Python has a nicer object model, then I agree up to a point, but Perl's is at least as powerful. I don't much like OO anyway, I'm more of a functional programmer.

      Ruby's OK, but it's slower than Perl, and it can't get lexical scoping quite right either.

      The thing is that it's really more-or-less impossible to have satisfactorary scoping rules without explicit variable declarations. Even ignoring Python's problems with closures, you still have the problem that whenever you write "a = b", you can't be sure whether you're binding a new variable, or assigning a new value to an existing variable. (Same applies to Ruby).

      So overall, I prefer Perl. It might not be as buzzword-compliant as Python or Ruby, but it doesn't try to run before it can walk.

      --
      Freedom is not increased by mere diminuation of government. Anarchy is freedom for the strong and slavery for the weak.
    7. Re:PyGame by arevos · · Score: 2, Informative
      How is it not a problem with lexical scoping?

      Because the scoping itself works fine. The problem lies with variable assignment and declaration in Python being ambiguous when dealing with multiple scopes. This means that closure support in Python is incomplete, in that closures are essentially 'read-only', in that inner assignments won't work. This can be overcome with mutable types, but I agree that this isn't a ideal solution.

      This is why I say incomplete, and not broken. By the same standards, I say that Perl's object model is incomplete, rather than broken. If you claim that Python's closures are 'broken', then you must also accept that Perl's object model is 'broken'.

      Perl has a perfectly well-defined object model.

      When last I looked, Perl didn't treat scalars, hashes and arrays as objects. Perl's incomplete object model is, in my view, a far bigger problem than Python's read-only closures. And on the subject of things Perl doesn't have, as far as I know, it has no metaclass support, either.

      Even ignoring Python's problems with closures, you still have the problem that whenever you write "a = b", you can't be sure whether you're binding a new variable, or assigning a new value to an existing variable.

      Only in the scope of a single function, and realistically speaking, if your functions are so long that you don't know whether a local variable has been assigned or not, then perhaps your function is too long, anyway. Certainly when I'm programming in Python, functions tend to be under a dozen lines long.

    8. Re:PyGame by brpr · · Score: 1

      Because the scoping itself works fine. The problem lies with variable assignment and declaration in Python being ambiguous when dealing with multiple scopes.

      But if the syntax for assigning variables doesn't work nicely with lexical scoping, I think it's reasonable to say that something to do with lexical scoping isn't working properly. If Python would change it's lexical scoping rules slightly, the problem would be fixed without changing the assignment syntax. (Essentially, you could have the system work such that every line of a function introduced a new nested scope).

      This is why I say incomplete, and not broken. By the same standards, I say that Perl's object model is incomplete, rather than broken. If you claim that Python's closures are 'broken', then you must also accept that Perl's object model is 'broken'.

      I don't see why, given that there aren't any standard OO features missing from Perl (with the exception of enforced public/private access, but that's missing from Python too). Arguing over the definitions of "broken" and "incomplete" seems pointless to me. I've made it clear what I think is wrong with Python's closures, you can call it what you like.

      When last I looked, Perl didn't treat scalars, hashes and arrays as objects.

      No, but you can create your own classes which use the special syntax for built-in types (e.g. you can create your own hash class, see man perltie). IIRC, the class you create doesn't technically inherit from a standard hash class, but since Perl is a dynamic dispatch language this doesn't have any practical consequences (other people can use your custom hash object just as if it were a real Perl hash). Python's treatment of builtins has some quirks anyway, since it's only recently they've become true Python classes ("len" is not a method, etc.)

      . And on the subject of things Perl doesn't have, as far as I know, it has no metaclass support, either.

      Well, you can create classes programmatically, so in effect it does. See the Class::Struct module, for example, which generates structure-like classes. Perl has pretty much everything in terms of OO (including for example the ability to trap calls to non-existent methods). The syntax is a little clunky, but the actual functionality is easy enough to use.

      Only in the scope of a single function, and realistically speaking, if your functions are so long that you don't know whether a local variable has been assigned or not, then perhaps your function is too long, anyway. Certainly when I'm programming in Python, functions tend to be under a dozen lines long.

      True, but that basically amounts to saying "lexical scope isn't particularly useful". You have a point here I admit -- it's easy enough to get along in a language with little or no lexical scoping (e.g. C, prior to C99). But it's still anoying that closures are so limited in Python, if you like functional programming, as I do.

      --
      Freedom is not increased by mere diminuation of government. Anarchy is freedom for the strong and slavery for the weak.
    9. Re:PyGame by StandardDeviant · · Score: 1

      FWIW you can bless anything as an object. (Well, a reference to anything.) Scalar, hash, whatever. The key here is that it's optional rather than the default. (So, yes, perl isn't pure OO, but then again that's not really "broken" so much as "different design goal." ;))

    10. Re:PyGame by arevos · · Score: 1
      True, but that basically amounts to saying "lexical scope isn't particularly useful". You have a point here I admit -- it's easy enough to get along in a language with little or no lexical scoping (e.g. C, prior to C99). But it's still anoying that closures are so limited in Python, if you like functional programming, as I do.

      I think it might be a case of programming style. I used Perl for years before I discovered Python, and I find myself liking the latter a lot more. But then, I've always taken a very OO approach to programming, and it's only recently that I've started to adopt more functional programming techniques. Given this, Python's very clean OO approach appeals to me greatly.

      On the other hand, you seem to take a very functional approach, with a minimalistic only-when-needed approach to OO. So I can understand your frustration with Python's closures.

      That's not to say that there aren't things in Python that irritate me. The lack of anonymous closures. The __annoying__ naming scheme for internal class members. The decision to make base classes (str, int, etc.) unmodifiable. Python's far from my perfect language, but it's possibly the best that I've found, overall.

    11. Re:PyGame by Wavicle · · Score: 1
      Given this, Python's very clean OO approach appeals to me greatly.

      Python is my scripting language of choice but I would never claim that Python's OO approach is even remotely clean. Example:
      class Bad:
          a = "Who knows?!"
       
      class A:
          def __init__(self):
              self.a = "Bad"
              self = Bad()
              self.a = "No, Good"
       
      ob = A()
      print ob.a
      The result, of course, is that Python prints "Bad". Python has a problem with its use of a self referential object variable as an implicit parameter. There is no concept of something like Java's "this". That is not clean OO.
      --
      Education is a better safeguard of liberty than a standing army.
      Edward Everett (1794 - 1865)
    12. Re:PyGame by arevos · · Score: 1
      Whilst Python is not without it's problems, in this case the problem lies with you misunderstanding how both Java and Python handle objects and references.

      Let's take the following Python code:
      ob = A()
      The class 'A' is instantiated into a new object, which is placed on the heap. The constructor 'A()' returns a reference to this new object, which is stored in the variable 'ob'. Note that 'ob' stores not an object itself, but merely a reference to one. All variables in Python are references to objects, without exception.

      Java works in a similar way. Excepting primatives, all variables are references to objects. Java has a special variable called 'this' which is a reference to the current object. Python handles things differently; classes pass a reference to themselves through the first argument of a method. By convention, this is called 'self'.

      Both 'self' in Python, and 'this' in Java are references to the current object. The only difference is that Java forbids you from redefining it, whilst Python merely discourages the practise.

      The only reason you think that your example is "not clean OO", is because you don't fully understand the distinction between objects and references. Let's take another look at your code:
      self = Bad()
      This assignment is no different from any other in Python. You're assigning a reference returned by Bad() to the variable 'self'. This does not affect 'ob', because 'ob' is a unrelated reference. Most OO languages take this approach, including C++, C#, Java and Ruby.
    13. Re:PyGame by ajs · · Score: 1

      Sigh. We still have to have a language hate-fest every time a language-specific article shows up?

      "When last I looked, Perl didn't treat scalars, hashes and arrays as objects. Perl's incomplete object model is, in my view, a far bigger problem than Python's read-only closures. And on the subject of things Perl doesn't have, as far as I know, it has no metaclass support, either."

      All true (except for the opinion about severity which is simply an opinion and neither true nor false).

      While Perl 6 endevours to address much of this (I direct your attention to the pugs interpreter), Perl 6 is hardly production-ready at this stage, and Perl 5 as it stands has many drawbacks.

      Then again, so does Java, Python, Ruby and just about any other language out there. Why not just relax and accept that any turing complete language that gets the job done does just that. Perl is a very rapid development tool that has historically proven itself to generate fairly heavyweight code (usually as a result of coding conventions rather than language features). That's pretty much as far as you have to go into advantages and disadvantages beyond determining if the particular tools that you need for a particular project are present and well supported in the language that you are evaluationg.

      I think it's safe to say that, once you get to the stage of worrying about how core types are treated by the object system, you've gotten to a level of detail at which it is difficult to objectively balance all of the various tradeoffs in language selection.

      Personally, I'm starting to agree with a friend of mine: the ideal language is C++ because it is so horridly barroque that only programmers capable of understanding that level of complexity will program in it beyond simple wrappers to GUI libraries.

    14. Re:PyGame by arevos · · Score: 1
      Sigh. We still have to have a language hate-fest every time a language-specific article shows up?

      Because arguments, when intelligently debated, often offer previously insight to both sides. It's a competitive exchange of ideas. Whilst I can't comment on what brpr thinks, his arguments have made me think more carefully about Python closures and scoping, and has opened up some fascinating avenues of thought.

      True lexical scoping seems, to me, to blur the distinction between a function and an object. Such realisations aren't going to come about by blindly agreeing with people, but by engaging in good, old fashioned arguments.

    15. Re:PyGame by bill_mcgonigle · · Score: 1

      When last I looked, Perl didn't treat scalars, hashes and arrays as objects.

      They are if you bless them. Perl's object stuff is weird, for sure, but with some stupid boilerplate code you can ignore most of it.

      --
      My God, it's Full of Source!
      OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
    16. Re:PyGame by bill_mcgonigle · · Score: 0, Troll

      Why use Perl when you can use Python? :-P

      Because some people are tired of the fact that anytime Perl is mentioned in any way shape or form that can be considered positive, a bunch of groundhogs pop up to tell everybody that Python is better.

      The Perl users feel that if Python attracts such strange groundhogs, there's reason to be suspicious.

      Contrast with Ruby people who feel no such need. Debates about indequacy issues -> /dev/null.

      --
      My God, it's Full of Source!
      OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
    17. Re:PyGame by Wavicle · · Score: 1

      Your assumption that I don't understand the inner workings of either Python or Java is entirely incorrect. The code was written specifically to show how Python objects have a very sketchy grasp of object identity.

      Object methods have complete lack of contextual identity within their instance. The same closure rule that causes problems with variable scoping extends in a non-sensical way to Python objects, such that Python never checks to see if a variable is outside a method's scope but inside the object's scope. It goes local->global->builtin whether it's a function or object method. This can't be fixed easily because Python object methods are simply handled as name-mangled functions. That's why "self" is an explicit parameter that is mutable and all references to class variables and methods must be prefixed with "self." That is not clean OO.

      --
      Education is a better safeguard of liberty than a standing army.
      Edward Everett (1794 - 1865)
    18. Re:PyGame by arevos · · Score: 1
      The code was written specifically to show how Python objects have a very sketchy grasp of object identity.
      I have to disagree:
      class A:
          def foobar():
              print "Foobar"
      a = A()
      b = a.foobar
      assert a == b.im_self
      The 'foobar' method knows exactly which object it belongs to. That seems a very solid grasp of object identity to me.

      That's why "self" is an explicit parameter that is mutable and all references to class variables and methods must be prefixed with "self." That is not clean OO.
      I'm trying to see your point, but I'm afraid I can't see why you're so hung up on this. You're saying that Python OO is not clean because it allows you to redefine 'self', and languages like Ruby or Java are clean OO, because they will throw an error if you try to do that.

      This doesn't matter in practise, of course - methods don't commonly go around redefining 'self'. But if it's such a big deal to you in theory, then I'm curious; what language would you consider has clean OO? Obviously not Java... Perhaps Ruby?
    19. Re:PyGame by rsd · · Score: 1

      If you claim that Python's closures are 'broken', then you must also accept that Perl's object model is 'broken'.

              Perl has a perfectly well-defined object model.

      When last I looked, Perl didn't treat scalars, hashes and arrays as objects.



      zzzz.... Thats the poorest argument I have ever seem about perl's OO implementation.

      Why does an OO language needs to implement scalars, hashes and arrays as objects to be a trully OO language?!?

    20. Re:PyGame by arevos · · Score: 1
      Why does an OO language needs to implement scalars, hashes and arrays as objects to be a trully OO language?!?

      I didn't say this. I said Perl had an incomplete object model. Since scalars and such aren't naturally objects in Perl, not all data types in Perl are objects. Therefore, Perl's object model is incomplete. QED.

    21. Re:PyGame by Wavicle · · Score: 1

      The 'foobar' method knows exactly which object it belongs to.

      Really? I noticed that foobar didn't print any information about the object it belonged to. Without changing the method signature, why don't you add a variable to the class and have it print that out. If foobar *really* knows which object it belongs to, you'll have no trouble with this.

      --
      Education is a better safeguard of liberty than a standing army.
      Edward Everett (1794 - 1865)
    22. Re:PyGame by arevos · · Score: 1
      Really? I noticed that foobar didn't print any information about the object it belonged to. Without changing the method signature, why don't you add a variable to the class and have it print that out. If foobar *really* knows which object it belongs to, you'll have no trouble with this.
      I'm not entirely sure what you mean. Is this what you meant?
      A.new_variable = "Something"
      a = A()
      b = a.foobar
      print b.im_self.new_variable
      As you can see, the 'foobar' function clearly knows which object it belongs to.

      On the other hand, you might have picked up on my error, since I forgot to give foobar() any arguments:
      class A:
          def foobar(self):
              print "Foobar"
      But this is irrelevant, since my previous code shows that each function holds a reference to the containing object, which rather proves my point.

      In addition, I should also mention that Python's way of taking self reference from the first argument is not without its advantages:
      def another(self):
          print self.new_variable
       
      A.another = another
       
      c = A()
      c.another()
    23. Re:PyGame by Wavicle · · Score: 1
      I'm not clear on why I'm not clear, so I'll try and distill why I don't consider Python's OO implementation clean under the whole method(self) context:

      1) The syntactic declaration of a class method doesn't match the syntatic call of the method. The declaration must contain a self reference parameter.
      class A:
        foo(self,x,y): # 3 args
      ..
       
      a.foo(x,y) # 2 args
      2) Python gives no special treatment to the self parameter, thus it is mutable. Further it is renamable, there is nothing special about the variable "self". You could have just as easily called the variable "this" or "badParameterName".
      class A:
        def foo(y):
          print "foo %d" % y
        def foo(self,y):
          print "foo2 %d" % y
       
      a.foo(4)
      3) Worse still, you can create methods that are completely accidental that fail in odd ways because Python gives the first parameter of a method special treatment when calling, but at no other time.
      class A:
        def foo(flag=0,y=50):
          if flag != 0:
      ...
       
      a.foo(y=4) # hmmm, I could have sworn I didn't set that flag...
      4) Python does not have an object context so all references to class variables or methods must be prefixed by the first parameter.
      class A:
        bar(self):
          print "bar"
        foo(self):
          print "foo",
          bar() # this doesn't call my bar() method?!
      --
      Education is a better safeguard of liberty than a standing army.
      Edward Everett (1794 - 1865)
    24. Re:PyGame by rsd · · Score: 1


      I didn't say this. I said Perl had an incomplete object model. Since scalars and such aren't naturally objects in Perl, not all data
      types in Perl are objects. Therefore, Perl's object model is incomplete. QED.


      ok,
      but why does it have to be?

    25. Re:PyGame by arevos · · Score: 1
      Nor am I not sure why I am not clear:

      1. Functions know internally what object they belong to.

      2. The object that functions belong to is passed as the first argument, no matter how that function is referenced:
      a.foobar()
      b = a.foobar()
      b() # same as a.foobar()
      3. Thus, Python queries the function first - if it belongs to no object (object.im_self == None), it makes no change to the argument list, otherwise it passes object.im_self as the first argument to that function.

      4. As for making methods that fail in odd ways - sure, if you don't know Python, of course you can. If you don't know Java, I suspect that the pass-by-value nature of primatives would confuse people too. But once the programmer is familiar with the language, it's a mistake that's very rarely made, and easily spotted when it is.

      Thus, I'm not sure where you're coming from. Sure, you might not like the syntax - I'm not sure I do, either. But this bears no relation to Python's internal OO model. Functions know which object they are assigned to, and pass a reference to this object as the first argument, no matter how they are called. The difference between Java's "this" and Python's "self" is purely superficial.

      Whilst this may seem odd, it also has it's advantages, the main one being that you can attach a function to a previously created object or class.

      If you're arguing that you don't like the 'self' syntax, then that's perfectly fine. But saying that Python's OOness is somehow less clean as a result is nonsense, as there's no practical difference between 'this' and 'self'. As I said before, all differences are superficial.
    26. Re:PyGame by arevos · · Score: 1

      Why are you asking me? Why not ask Larry Wall?

    27. Re:PyGame by ajs · · Score: 1

      Has it occurred to you that neither approach is terribly efficient, and that simply exposing yourself to more of the state of the art would result in your learning more on your way to such insight?

      Incidentally, this is pretty much the summary of the Perl approach and has been for over a decade. Rather than argue, just learn, appreciate and apply. Perl is rarely the best at anything, but because it embraces so much, it is one of the best places to learn to use any technique. Dynamic scoping? Sure. Lexical scoping? Sure. Closures? Got that. Continuations? Took a bit more re-working, but it's there in Perl 6.

      I'm not advocating Perl, per se, here. I'm advocating the Perl approach no matter what language you choose to work with today.

      Arguments are for time wasting.

    28. Re:PyGame by arevos · · Score: 1
      Has it occurred to you that neither approach is terribly efficient, and that simply exposing yourself to more of the state of the art would result in your learning more on your way to such insight?

      Not at all. Whilst I've read up on language design and theory, and considered the relationship between types and inheritance, closures and functions, classes and objects; I had never before considered the connection between classes and read-write lexical scoping. Whilst I might be able to glean such insight by spending a few weeks reading code written by Haskall gurus, with an argument I gained such insight in an hour of posting. That's pretty efficient in my book.

      Arguments are for time wasting.

      No they aren't. Science itself is one big argument. Scientists propose new theories, and other scientists argue against them. Without Darwin arguing that maybe all creatures on Earth weren't created 6000 years ago, and Einstein arguing that maybe the ether was a stupid idea, and Galileo arguing the Earth went around the sun, and without Schrödinger arguing how silly quantum physics was, because that would mean a cat would be both alive and dead - where would we be now?

      Arguments are the best way of learning, assuming that they're not argued blindly without paying heed to the opposing side. Without argument, without debate, everyone would blindly agree and there'd be no technological progress. The very computers we use to communicate are a product, nay, a triumph of the human ability to argue.

      Frankly, the ability to argue and question and debate seems, to me, to be the single most important trait human beings have. If only it were exercised more.

      And if arguments are for time wasting - why are you involved in one now?

    29. Re:PyGame by ajs · · Score: 1

      Very well. Good luck with that approach. I have more reading to do ;)

      PS: If you want a good intro to advanced concepts, Haskell is, as you pointed out, a great source. I've been reading over the pugs code, and I'm still reeling from some of what I saw there. It's just not the way you've always forced yourself to program, and once you tear down those preconceptions that you've spent a career building, it's a fascinating point of view (though I'm actually not terribly fond of the language).

  21. Re:It'd be nice if there was just an OS C/C++ "bas by Anonymous Coward · · Score: 0

    generally, the sort of person who's going to be successful at developing a game wouldn't need some absurd visual boondoggle like that. the reason you don't see a hand-holding-sdl-base-for-the-brain-damaged is because the sort of people this would "help" would never be able to get an sdl game off the ground anyway. people who are capable of writing game software are more than capable of installing their own development environment.

  22. games companies should be all over this by Anonymous Coward · · Score: 0

    The obfuscation and unreadability of perl makes it a great way to keep competition from building upon your source.

  23. What about all the libraries SDL is missing? by master_p · · Score: 4, Insightful

    SDL is "a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer" (quote taken from the SDL web site). What about:

    1) drawing functions
    2) fonts
    3) openGL
    4) file formats
    5) game GUI
    6) sound formats
    7) networking
    8) configuration

    etc?

    there are various SDL-derived libraries that implement, more or less, the above, but they are C/C++ libraries, and the quality varies. Does Perl make it easy to use those libraries?

    1. Re:What about all the libraries SDL is missing? by TommyBear · · Score: 3, Informative

      There are other thirdparty libraries that offer this kind of support:

      http://www.libsdl.org/libraries.php

      There is even an SDL based opengl render target.

      Tommy.

    2. Re:What about all the libraries SDL is missing? by Cyno · · Score: 1

      Yes and no.

      Perl SDL::OpenGL is lacking some functions, such as primitives to draw spheres and other geometry from GLU and GLUT. Some of the functions are available. I was able to draw a nurb surface and use hardware OpenGL acceleration and get 60 fps from a perl script. But it was at most 50% the performance of C/C++ without all the functions, making it very difficult to make a game. Maybe one of perl's other OpenGL libraries would work better. If so I'd suggest just using SDL for keyboard, mouse and joystick input, if that isn't easy to do with other libraries.

      In its current state I will have to reconfigure my 3D game object over to using just OpenGL.pm once I get it installed. I'm only playing around with about 1000 polys, but I've already hit a wall with SDL unless I figure out a way to use nurbs for EVERYTHING and fix the memory leak that popped up when I use them with SDL. The performance is tolerable, if I could get more primatives. My primary motivation for choosing Perl at this stage is rapid developement and it would be paying off if it weren't for incomplete OpenGL support in Perl's SDL libraries. (NOTE: Its also possible I messed something up during install, but I've tried it on several different distros with the same results)

    3. Re:What about all the libraries SDL is missing? by chromatic · · Score: 1

      You're right about the OpenGL support in SDL_perl. The problem is that there are three variants of the code in three repositories at the moment and no one has really had the time to merge them.

    4. Re:What about all the libraries SDL is missing? by Cyno · · Score: 1

      So one of the variants might have these bug fixes? The code didn't look too complex, I might be able to do some merging.. if it would be less work than rewriting my object.

    5. Re:What about all the libraries SDL is missing? by chromatic · · Score: 1

      The most recent and up-to-date OpenGL code is in the sdlperl1 repository. I'd love help getting that merged into the repository on sdl.perl.org.

  24. Think about it this way. by Anonymous Coward · · Score: 0

    We had great game development libraries for stuff like that 10 years ago, e.g. Allegro. 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).

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

  25. Finally! by jalefkowit · · Score: 3, Insightful

    At last we can have Tetris with regular expressions.

  26. PyGame, different language same idea by rtos · · Score: 2, Informative
    If you are into Python rather than Perl, you might want to check out PyGame.

    It's basically a wrapper for SDL that makes it extremely easy to make games with Python. You could easily make a working 2D game with sound and decent physics in an evening if you are already familiar with the language. I'm a relative newb, and even I was able to make a basic pong/breakout type game in a few nights. :)

    Or use PyOpenGL and you can make some 3D games.

    --
    -- null
  27. Other languages by squoozer · · Score: 1

    [puts on flame suit] This is going to be controversial I know but has anyone tried developing a real game in Java? (by real I mean something that you don't play on a mobile phone) I realize that the GCing could be problematic but it is possible to minimize or even eliminate that problem. Other than that I think the language is probably fast enough now and I would have thought that the lower development time would encourage games houses. Perhaps it's simply that the tools aren't there for Java yet (maybe they never will be). Any thoughts?

    --
    I used to have a better sig but it broke.
    1. Re:Other languages by Anonymous Coward · · Score: 0
    2. Re:Other languages by Tusaki · · Score: 2, Interesting

      Several games.

      Jake2 (Quake 2 clone) as the AC already posted.
      Puzzle Pirates
      Tribal Trouble (good!)

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

      and tools? how about:

      LWJGL: http://www.lwjgl.org/
      JMonkeyEngine: http://www.jmonkeyengine.com/
      Xith3D: http://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.

  28. Quick Prototyping... by MaestroSartori · · Score: 1

    ...of 2D games can be done fairly easily and quickly in Flash. I'm really quite surprised there hasn't been more of an effort made for an Open Source alternative to Flash, maybe the reputation it has for being slow, evil and crap has too much of a foothold, but it's actually quite a nice environment to work in for testing some stuff.

    As for this, I suppose it's nice enough. I don't see what it brings to the table that hasn't been done many times before, in many different languages, but making games is fun enough that I do it for a living, so the more people who can have fun doing the same thing the better :)

    1. Re:Quick Prototyping... by Revellion · · Score: 1

      For one. i'm personally not a big fan of Flash. Secondly... there's quite an ambigious FOSS alternative being developed heavily to do about all the proprietary plug can do. and it's named "Gnash" a quick google should show it. and if you meant a whole alternative to Flash. i.e not using the same format and all.. then there's SVG through cairo for an example. and a lot of other things that could provide the same basic functionality

      --
      htop(top on stereoids): http://htop.sf.net
  29. Attack of the Mutant Camels by memoriesofgreen · · Score: 0
    --
    in the long run, we're all dead anyway.
  30. If you want to make money... do it with Java... by MosesJones · · Score: 1, Interesting

    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 that even comes with a standard (and pretty simple) 3D API. 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.

    --
    An Eye for an Eye will make the whole world blind - Gandhi
    1. Re:If you want to make money... do it with Java... by jetxee · · Score: 1

      If you want to write games just for fun, do it with SDL-anything-you-like :)

    2. Re:If you want to make money... do it with Java... by kronocide · · Score: 1

      Why is this modded Troll?? I thought it was pretty informative.

  31. Python & SDL = Pygame by Andreas(R) · · Score: 0, Redundant

    Actually, I think Python and SDL is a far better combination, see pygame. As example of such a project is , developed using Python and SDL.

  32. Here we go again by Anonymous Coward · · Score: 0

    Some "development" topic comes up and out come the Python Zealots...

  33. Easy by Andy+Dodd · · Score: 4, Insightful

    All that highly optimized C is part of a prewritten library (as is the case here).

    For the remaining non-performance-critical stuff, Perl is often MUCH easier to develop with.

    And in many cases, keep in mind the 80/20 rule of thumb. 80% of the time is spent in 20% of the code. This does vary, but in many cases the amount of highly optimized code needed for good performance is very little.

    Many years ago, I was writing a program in Perl. I knew that there was a good chance I'd have to rewrite some of it in C eventually for decent performance, and this turned out to be true. In the end, I obtained 20-40 times the performance (and most likely 95%+ of the performance I would have obtained using C only) by rewriting approximately five lines out of 100-200 lines of Perl in C. The time it took me to figure out how to interface C and Perl (doing so was not documented very well then, it took me 2 weeks to find SWIG) was still far less than the time it would've taken me to write the entire program in scratch using straight C.

    --
    retrorocket.o not found, launch anyway?
    1. Re:Easy by Junks+Jerzey · · Score: 4, Informative

      And in many cases, keep in mind the 80/20 rule of thumb. 80% of the time is spent in 20% of the code. This does vary, but in many cases the amount of highly optimized code needed for good performance is very little.

      That rule of thumb quite often doesn't apply to video games, at least high-end, complex video games. In such, you often see a flat profile, where the work is divided among a large number of functions, none of which stands out as a huge time sink.

      (That said, I still think writing games in languages like Perl is a good idea.)

    2. Re:Easy by sbrown123 · · Score: 2, Interesting

      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.

    3. Re:Easy by Fizzog · · Score: 2, Funny

      "keep in mind the 80/20 rule of thumb. 80% of the time is spent in 20% of the code."

      But you also need to remember that the remaining 80% of the code takes the other 80% of the time.

  34. Frozen Bubble by Anonymous Coward · · Score: 0

    Yeah Frozen Bubble is Da Perl-written Game!

  35. Screw SDL... How about Perl/Tk? by Washizu · · Score: 0, Offtopic

    I wrote a tetris variant in Tk that runs pretty well.

    Ok, it barely refreshes fast enough to be playable.

    But still, it's awesome. Try it and you'll find out why.

    Play Spew.

    --
    OddManIn: A Game of guns and game theory.
  36. Re:It'd be nice if there was just an OS C/C++ "bas by petermgreen · · Score: 3, Insightful

    what really gets me is when you wan't to make some changes to open source software (particularlly windows stuff) and sure you can download the source but you have to spend hours messing arround trying to get the build environment right.

    how the hell are users supposed to fix bugs that annoy them if they can't get the build environment right for the existing code?!

    --
    note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
  37. Don't forget ruby! by Anonymous Coward · · Score: 0

    "Rubygame has SDL as a backend, and is styled after the very nice pygame." It's in active developement but is very usable.

    http://rubygame.seul.org/

  38. Bravo! The author avoided the "Linux app" trap. by bout · · Score: 1

    Bravo to author Andy Bakun for writing this article about F/OSS (UNIX/Linux) technologies without implying that the article is targeted for any particular open-source OS. In other words, it's equally relevant on all of the open-source OS's -- the BSDs, the OpenSolaris based distros and the Linuxes.

    Eric Boutilier -- OpenSolaris

  39. Panda 3D by albrnick · · Score: 2, Informative
    Actually, Panda 3D makes it even easier to use python for developing games! It is a beautiful engine closer to the Torque engine than a graphics API. Check it out at:

    http://www.panda3d.org/

    And a little "Hello World" to show you the pwoer of it is at:

    http://www.panda3d.org/wiki/index.php/A_Panda_%22H ello_World%22

    Peace,
    -Nick

  40. Hex Games by Quill_28 · · Score: 0, Offtopic

    Are there any good development tools out there for developing hex-based games?

    Don't care about the platform or the language.

    1. Re:Hex Games by Anonymous Coward · · Score: 0

      Go to sourceforge and download "xconq"; it's a hex-based-wargame engine. You can hand it data files to do almost any style of wargame...

    2. Re:Hex Games by Samurai+Crow · · Score: 1

      http://www.imitationpickles.org/pgu/ is Phil's PyGame Utilities for Python and Pygame. It's still in the works but it includes example source for a standard tile game engine and has an editor for hex maps.

  41. Don't forget Common Lisp! by ari_j · · Score: 1
  42. Quake3 in perl by zombor · · Score: 1

    I remember reading quite a long time ago on planetquake.com about John Carmack doing an internal port of Quake3 to perl so he could lern the language. Not sure how far he got or if it even ran...

    1. Re:Quake3 in perl by Anonymous Coward · · Score: 0
    2. Re:Quake3 in perl by Anonymous Coward · · Score: 0

      I remember reading quite a long time ago on planetquake.com about John Carmack doing an internal port of Quake3 to perl so he could lern the language.

      Don't know about Quake3 graphics engine, but you can certainly rewrite most of the tools in Perl.

      I wrote my own BSP compiler (although a pretty simple one) in Perl to make this applet: FlightBox.

      The input is the text .map file.

  43. Nicely done tutorial! by Junks+Jerzey · · Score: 1

    The author does a good job of introducing SDL and the mechanics of a simple game. Nicely done!

  44. Paradroidz by frogstar_robot · · Score: 1

    You can try this right now:

    http://www.jpct.net/paradroidz/

    It can run standalone or in a browser.

  45. what platform? by kisrael · · Score: 1

    What platforms can the resulting games be run on?

    --
    SO YOU'RE GOING TO DIE: The Comic for Dealing with Death
  46. SDL/Icecast Proxy by Doc+Ruby · · Score: 1

    What if all I want is a bidirectional SDL proxy for Icecast? The proxy receives a URL requesting an SDL file, converts that to a URL requesting an M3U file from the Icecast server, passes it to the Icecast server, which sends down the M3U. The proxy converts that to SDL, then either sends the SDL to me, so I request the objects specified in the SDL from the proxy, which converts that to MP3/OGG URL requests to Icecast, which streams the objects to the proxy, which converts them to the format (probably MP4) specified in the SDL, then streams them (sending chunks as they're received) to me. Or maybe the proxy receives the M3U from Icecast, and itself immediately requests the MP3/OGG objects from Icecast, streaming them to me.

    It looks like I could use SDL_Perl to write that proxy. But hasn't someone written one already?

    --

    --
    make install -not war

    1. Re:SDL/Icecast Proxy by Anonymous Coward · · Score: 0

      I think you're thinking of a different SDL than http://www.libsdl.org/index.php

    2. Re:SDL/Icecast Proxy by Doc+Ruby · · Score: 1

      No I'm not. The SonyEricsson K750, for example, plays SDL streams. I need a proxy to wrap my Icecast MP3 server.

      --

      --
      make install -not war

  47. What's PERL stand for? by mr_mophead · · Score: 1, Insightful

    Oh yeah, "Practical Extraction and Report Language." Sounds like a real game friendly language choice. Come on, I know this is Slashdot, and most of us spend our free time installing Linux in our pillows and spoons, but this is just a bad idea.

    1. Re:What's PERL stand for? by sg7jimr · · Score: 1

      No, it's Pathologically Eclectic Rubbish Lister. Nice try, though.

      Given the current state of game development, a rubbish lister seems like just the ticket.

    2. Re:What's PERL stand for? by Vindaloo · · Score: 1
      "Practical Extraction and Report Language." Sounds like a real game friendly language choice.

      No, "Pathetically Eclectic Rubbish Lister". Sounds like a perfect language for games :-)

      Besides, Perl is a backronym and doesn't actually "stand" for either one of those things.

    3. Re:What's PERL stand for? by mr_mophead · · Score: 1

      As someone working in the game industry, I tend to agree with you.

  48. Nitpick by jmorris42 · · Score: 1

    Kaboom! ran on the Atari 2600. Kaboom! was written by Larry Kaplan and David Crane for Activision.

    --
    Democrat delenda est
  49. Ruby by Anonymous Coward · · Score: 0

    I saw the Python... but I didn't see anyone mention Ruby yet. Yes, there are also SDL bindings for Ruby http://www.kmc.gr.jp/~ohai/rubysdl.en.html or http://rudl.sourceforge.net/. And even a Rubygame library (styled after pygame) which is starting to incorporate OpenGL too.

  50. So a big difference... by sick_soul · · Score: 1

    > While programming using SDL requires knowledge of C and access to a C compiler, using
    > SDL_perl does not.

    Instead, using SDL_perl requires knowledge of Perl and access to a Perl interpreter.

  51. Perl easy? by kg4czo · · Score: 1

    Possibly to learn, but given the thousands of ways to do things, it may turn into a nightmare to maintain. Gives me chills just thinking about it....

  52. Who knows PERL but doesn't know C? by balloot · · Score: 1

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

    I would venture to guess that the number of people who know PERL, do not know C, and program games, is about...7.

    Plus the only game I know of that made very heavy use of scripting languages is Civ4. And that game is the most poorly programmed hunk of crap that I've ever played. The unbelievable slowdown takes quite a bit away from a great game.

    1. Re:Who knows PERL but doesn't know C? by Anonymous Coward · · Score: 0

      Here's a bunch of other games that made very heavy use of scripting languages: Quake FAKK2 Medal of Honor (all of them) Unreal (all of them - heard of Unreal Script?) Neverwinter Nights Crusader Ultima (at least all of them since about 6, I don't know about the earlier ones). and a whole ton of other games... All of the above mentioned games used proprietary scripting languages. Here's one that used Lisp for pretty much all of the AI: Abuse

    2. Re:Who knows PERL but doesn't know C? by kronocide · · Score: 1

      I've programmed Perl for a living for several years (mostly web applications), but my C skillz are highly limited. Only once have I ever come across a problem where memory needed to be precisely calculated in advance, so perl's autovivifying variables wouldn't do. Apart from that, C hasn't been a very useful tool for me. Obviously I haven't made any graphically intensive games, but I'm pretty good at shuffling text around. ;-)

  53. Take your pick by idonthack · · Score: 1

    Perl is totally cross-platform.

    --
    Why is it that when you believe something it's an opinion, but when I believe something it's a manifesto?
    1. Re:Take your pick by kisrael · · Score: 1

      well, yeah, but is the library something someone's ported to any console, or is this just Windows/Linux/OSX?

      Be sweet to see on, say, Dreamcast....

      --
      SO YOU'RE GOING TO DIE: The Comic for Dealing with Death
    2. Re:Take your pick by CronoCloud · · Score: 1

      Run Linux on a Dreamcast, then you can run Perl. :-)

      I don't think Perl has any native console ports. Python does though.

  54. Hear! Hear! by cr0sh · · Score: 1
    I strongly second this - not only is PyGame an "almost perfect" way of creating games using Python and SDL, and not only is PyOpenGL a great platform to play around with OpenGL (and 3D engines, etc) - but it is very easy to convert stuff written for OpenGL in other languages (like the various C demos) to use the wrapper.

    In fact, over at NeHe Productions there are a ton of OpenGL demo tutorials (and a CD available), mostly written in C/C++. Some of these (the "beginner" ones, mainly) have been converted over to Python (and, IIRC, PyOpenGL - that, or some other wrapper), and are very easy to read, well commented, well documented, etc.

    Once I had Python and PyOpenGL set up properly on my Linux box, I was able to get the demos working well, and modifying them was easy. Eventually, I took the "simple room walkthrough" demo, and had modded it to allow me to walk around while being able to look whereever I wanted (that is, I could look independently of movement). I eventually modded the code to use the mouse for "lookaround", and the arrow keys were for walking. Now, this isn't too special - what was interesting, though, was getting X to recognize and be able to use two different mice on my system (one was serial, the other PS/2) - I did this 1) to see if I could and if it was possible, and 2) because my "second" mouse was an "off-table" ring-mouse trackball device I had bought specifically for virtual environment navigation, and I didn't want to be constantly swapping the devices out. It was cool while I had it working - a great experiment, and it really showed the power of Python and OpenGL.

    I am pretty certain a full 3D engine could be built using Python and PyOpenGL (of course, OpenGL is doing all the "heavy" lifting - though who knows if Python would be up to task of doing everything else a real 3D engine needs - perhaps at that point you move to CrystalSpace or something)...

    --
    Reason is the Path to God - Anon
  55. [flame] Faster than Java, I'd bet by Anonymous Coward · · Score: 0

    Given the obscene bloat associated with Java, I wouldn't be entirely amazed to find that the Perl games run faster than Java ones do, and use LESS MEMORY. The only time I have ever hit an out of memory error in Windows is when I'm running Eclipse, Tomcat, and MyEclipse at the same time. 512Mb should be enough memory to develop software.

  56. Finally made it! by jnf · · Score: 1

    So you finally made it to level 99 and as you approach the last boss the perl program crashes with a message about a missing module! Surely you say, this is not possible perl detects the missing module during compilation.
    Quickly I retort, try chrooting a perl script some time, especially one that has a function in a module that has a use statement in it and watch your scripting language fall apart.
    Seriously folks, this is part of the perl dementia. perl is great as a general system glue/sh scripting replacement, its good for cgi's, but stop trying to do everything in scripting languages, in every single real world implementation ive seen its either failed misrebly or performed misrebly. Please grow up and use a real language when you have real tasks to accomplish.

    1. Re:Finally made it! by shotgunefx · · Score: 1

      Bullshit. Not sure about your specific chroot example (I've never encountered it), but what are all these other apps of which you speak?

      But on your other point of trying to do everything, as someone who started off programming (games) with Watcom C & assembler and recently spent a lot of time with Perl/SDL (digital dash for my car), I can tell you, Perl is not a bad fit.

      It's not a perfect fit for everything of course, but I think for many games it would be fine. I knocked out a good deal of my app (parsing images,files, skins, attributes,the renderer) in about 20hrs. It works. It's fast (even on a 466mhz), and flexible.

      What's the problem with that?

      Would writing it in C be better? No. It may be marginally faster, but it would have taken 10 times (at least) as long. So what's the benefit to using C/C++ in this application?

      --

      -William Shatner can be neither created nor destroyed.
  57. Re: The Correct Game by Poromenos1 · · Score: 1

    The game is actually Severance - Blade of Darkness. Totally missed that one :P

    --
    Send email from the afterlife! Write your e-will at Dead Man's Switch.