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."
... 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.
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.
http://www.frozen-bubble.org/ example of a nifty game written with sdl_perl
It's in Korea, isn't that obvious?
Flash achieves this easily, especially with the dancing frog.
Liberty freedom are no1, not dicks in suits.
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.
Pygame is a really nice wrapper around SDL (http://www.pygame.org./ There are plenty of guides and tutorials on the website.
:-P
Why use Perl when you can use Python?
-Håkan
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
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.
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
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.)
>> 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.