2010Q3 Grant Proposal: Manual for Game Development with SDL Perl

Manual for Game Development with SDL Perl

Name:

Kartik Thakore

Email:

[hidden email]

Amount Requested:

$1500

Synopsis

This project will improve the Game Development tutorials for Perl using the SDL library. The primary goal is to introduce newcomers to Game Development in Perl. The secondary goal is to attract people to try Perl as a Game Scripting and Prototyping language.

2>The Background of SDL Perl

SDL stands for Simple DirectMedia Library, and provides cross-platform access to various multimedia devices. These include audio, keyboard, mouse, joystick, 2D video framebuffer and 3D hardware via OpenGL. The main application of SDL is to create games that are cross-platform.

SDL Perl was created by David J. Goehrig, prior 2004. Since then many people have worked on it, including chromatic. However, since 2004, the project's core team unfortunately disappeared. The reason for this had been mainly the overwhelming amount of work required for the slightest of change or bugfix, the way it was initially designed. Updating the module and making it work on different systems was becoming unfeasible, and eventually the maintainers decided to pursue other interests, leaving this amazing project in a stall.

In order to revitalize the project and eliminate such shortcomings, a complete overhaul was necessary. Standing on the shoulders of giants, I started to tackle minor bug fixes. Before long I contact David and worked with him to make the first release in 5 years[1]. Eventually I was made the new maintainer and was releasing regularly in the old API[2].

After much deliberation and discussions with chromatic, Leon Brocard (acme) and several others, it became evident that a complete overhaul was necessary to eliminate all shortcomings and fully revitalize the project. I decided to rewrite SDL Perl into a layered approach. The first layer which has been mostly completed is a 1:1 match with the C API. We have also added a better building system with the Alien::SDL pipeline. Additionally we have added more tests and cross platform support. Finally, we began work on a second layer of extensions - SDLx - that provides a much needed sugar coating over the raw API, removing any drudge and error-prone constructions and making game development a much easier and fun experience with Perl.

Most recently we have been working on make SDL more cross-platform and stable. In SDL 2.4.x we worked on getting the SDL dependencies install correctly and the MacOSX launcher working correctly. The classic game, Frozen-Bubble has also been ported to CPAN to act as a flagship game [3]. With the new cross-platform support SDL 2.5 and Frozen-Bubble will be packaged with Strawberry Pro. This will drive new interest in SDL Perl, and thus we will need a manual for new users.

Benefits to the Perl Community

Implications for Perl

SDL bindings to Perl allow for rapid game prototyping and game scripting. The rapid development speed of Perl and power of the CPAN becomes a large selling point for Game Developers. This renewed union between modern Perl and SDL will most definitely showcase Perl to a very enthusiastic audience and bring in more users, like the Pygame project did for the Python language. Moreover learning a language to make a game has a universal appeal that users can understand.

Need for Tutorials

The SDL Perl is at a stage of writing SDL extensions that will require a lot of review and insight into the module. For this pool to be generated we need to attract developers and users to the current low level API. From the generated feedback, new SDLx modules can be born. Perl has considerable amount of documentation, books, tutorials, and articles written for various topics. However, one area still lacking is game development. The last article writing for game development in Perl and SDL has been in 2006. Since then, lots of changes have happened in both the SDL library and in bringing game development to Perl. For one, the SDL bindings has been completely rewritten.

There is no other module providing Game Development from the Perl ecosystem as focused as SDL. With these new tutorials beginners to both Perl and Game Development will be able to get up to speed. Game Development should attract more users into the Perl ecosystem, providing an extra appeal to newcomers and making a potentially dramatic change on the stigma of Perl as a terminal-only, archaic language.

Deliverables

Getting started tutorials that comprise of the following:

Your first SDL Application in Perl

Drawing Primitives and Sprites

Handling Events

The Game Loop

Making the Pong Game

Making the Tetris Game using Object Oriented Perl

Handling Music and Sound

Using modules from CPAN to reuse code in Games ( JSON and Moose )

Profiling your Games with NYTProf to find trouble spots

Using XS to optimize Game effects

Interfacing raw data with other Modules ( PDL and OpenGL)

Moreover, each tutorial will be provided with working code scripts. Lastly the documentation will be released as SDL::Manual with SDL Perl on CPAN.

Project Details

The tutorials will cover

Your first SDL Application

Installing SDL, where to get help and showing a simple window on screen.

Completeness Criteria

The completeness of the project can be gauged with my regular blog posts and emails to [hidden email] . Also all code will be available on github.com for auditing. The project is complete when SDL::Manual is release with SDL perl on CPAN.

Project Schedule

The project should take 1 - 2 months. I will begin work on this project as soon as possible, regardless of the grant status. Without the grant it will take a lot longer to complete (or I may not even complete) this project as I will have to look for alternative sources of income.

Description

Most of the work for this grant will consist of creating new documentations. In some cases prior existing documentation will be cleaned up. The overall activities can be broken down into 4 tasks.

Writing simple and clean examples for the tutorials

This should take 1-2 weeks.

Writing the tutorials and keeping them available on github.com

This will be overlapping with the last week and 3rd week.

Posting information on regular Blog Posts and the mailing to get the content reviewed

I will start releasing alpha versions on the end of the 3rd week and ask for reviews until the end of the 4th week

Improving and cleaning up the documents based on the reviews

The last 2-3 weeks will be spent on updating any Code and Documentations.

I will be spending apporximately 20 hours a week on the project. The total will be around 100 hours.

Bio

I am a Toronto based developer. I am the current maintainer of SDL Perl and have made several releases to [1] CPAN. Currently I have also helped with port Frozen-Bubble to the new SDL API and made it cross platform. I will be going into my 4th year of Software Engineering at University of Western Ontario. Besides SDL I have contributed in minor roles to Padre and Parrot. All my code is available from [2]Github.

Comments (17)

[ 823 ] |
Sun, 01-Aug-2010 by rjbs

Being able to use Perl to write SDL programs -- and especially, I think, games -- would be a great thing. SDL Perl seems to be making a significant comeback in terms of working and being actively maintained. One of the best ways it can stay working and maintained is for a user base to grow around it. Better documentation will help that happen.

I think this documentation could be a very useful project.

[ 824 ] |
Sun, 01-Aug-2010 by pdonelan_myopenid_com

kthakore has been demonstrating his ability to write fantastic articles on SDL Perl via his Yet Another Perl Game Hacker blog (http://yapgh.blogspot.com).

This grant sounds awesome.

[ 825 ] |
Sun, 01-Aug-2010 by jamesekeenan

I am neither a gamer nor a game developer. But the proposal's thrust is clear to me and I know that the author has been working persistently in this area for at least the last twelve months. So this merits consideration for funding.

[ 826 ] |
Sun, 01-Aug-2010 by gaborszabo

I think both this grant an in more general the SDL development should be funded as having a string game development framework in Perl can help introduce the language to a lot of people.

Kartik Thakore has been working on this for quite some time and showing nice progress. (and taking away some of the best developers from Padre).

[ 827 ] |
Sun, 01-Aug-2010 by mattfollett

Helping to improve the game development scene on Perl would help Perl appeal to a larger audience. This grant is a great idea.

[ 828 ] |
Mon, 02-Aug-2010 by brenog_deoliveira

Kartik's already done an amazing effort in fully revitalizing the SDL Perl project for the past year. That alone is worth way more than what he's asking for. Nevertheless, this grant looks like a natural next step to SDL Perl and I truly believe it is an awesome thing to have for the entire Perl community.

[ 829 ] |
Mon, 02-Aug-2010 by peterlavender

Having a "lighter" side of Perl shows that the language does cross many of the preconceived notions of perl as an administrators language.

Casual gaming is proving itself to be a huge area of interest given the iPhone, playstation network and xbox live downloads - why not a CPAN equivalent??.

The SDL tutorial - as with many cookbooks/tutorials will go a long way in getting people started in areas where they have no experience and struggle to know where to get started.

I think all the submissions have merit, but I like this one most, given I just installed the SDL modules and have no idea where to start. I also believe it will reach out to a new audience, always a good thing.

[ 830 ] |
Mon, 02-Aug-2010 by edencardim

The appeal of games to the younger audience that hasn't been fed the typical myths about perl is definitely beneficial for the language and the community as a whole. A project like this one needs to be sustained by a healthy body of contributors, and the first step towards that is to provide well-crafted introductory documentation.
Kartik has been very active and dedicated to this project and I believe both him and the project to be well-deserving of the grant.

[ 831 ] |
Mon, 02-Aug-2010 by jeremycarman

I think this is a great idea. I know of High School classes that teach other languages through game programming. This would be an opportunity to get Perl on that list.

I would also suggest tailoring and submitting a tutorial or two to a couple of magazines.

[ 832 ] |
Mon, 02-Aug-2010 by danielruoso

Being a contributor in the SDL perl project I should say that this grant is absolutely necessary. I presented a talk at a game conference last week and people were motly impressed by how easy it is to build games in Perl, more documentation is trully needed.

[ 833 ] |
Mon, 02-Aug-2010 by perlpilot_myopenid_com

Nice. I think the future of "perl marketing" will come less from "the perl community" and more from other communities that happen to use perl to accomplish something useful. Writing a manual that enables game developers to ramp up in perl can only help spread perl to more places.

Even though I'm not a game developer, I'd be happy to see this proposal funded. (Who knows ... maybe because of it being funded I might *become* a game developer :-)

[ 834 ] |
Mon, 02-Aug-2010 by kthakore

Peter Lavender If you are itching to get started have a look at examples/* and talk to us on the sdl-devel@perl.org or #sdl irc.perl.org.

[ 835 ] |
Mon, 02-Aug-2010 by adamkennedy

I have previously advised Kartik on his SDL rebooting project (specifically CPANification and the like).

While I would have prefered to see this grant being more ambitious and pushing more towards a full "PerlGame" project, I support this grant as a necesary step.

[ 836 ] |
Mon, 02-Aug-2010 by curtisjewell

I'm not a game developer, but I know that the documentation would be done, and done well.

[ 837 ] |
Fri, 06-Aug-2010 by jeromequelin

thumbs up for this grant. kartik worked hard on perl SDL revival, and i hope this grant will help raise awareness around this.

[ 838 ] |
Thu, 12-Aug-2010 by janecoder

I've been interested in game development and perl independently for a while, but the friends I work with have told me that it's too difficult for them to get started with the documentation already available. I think that creating accessible tutorials and documentation is a much-needed step here.

[ 839 ] |
Wed, 08-Sep-2010 by mikaell

Indeed.

I have previous experience with perl and with sdl, but not together. The SDL that I did was with C++ and there's a lots of workin tutorials for that, however with sdl-perl it is simply impossible to get started.

I would really like to develop a game with sdl-perl.

even the simple stuff (for total newbies) would be nice.
-this is how to load image
-this is how to load multiple images
-this is how to move the image(s)
-do's and don't's