Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 177 lines (88 sloc) 8.314 kB
18bc16f @kthakore Initial Commit
kthakore authored
1
2 =head1 Manual for Game Development with SDL Perl
3
4 =over 1
5
6 =item Name:
7
8 Kartik Thakore
9
10 =item Email:
11
12 thakore.kartik 'at' gmail.com
13
14 =item Amount Requested:
15
16 $1500
17
18 =back
19
20 =head2 Synopsis
21
22 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.
23
24 =head2 The Background of SDL Perl
25
26 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.
27
28 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.
29
30 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].
31
32 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.
33
34 [1] http://search.cpan.org/~dgoehrig/SDL_Perl-2.2.0/
35
36 [2] http://search.cpan.org/~kthakore/SDL_Perl-v2.2.6/
37
38 =head2 Benefits to the Perl Community
39
40 B<Implications for Perl>
41
42 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.
43
44 B<Need for Tutorials>
45
46 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.
47
48 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.
49
50 =head2 Deliverables
51
52 Getting started tutorials that comprise of the following:
53
54 =over
55
56 =item Your first SDL Application in Perl
57
58 =item Drawing Primitives and Sprites
59
60 =item Handling Events
61
62 =item The Game Loop
63
64 =item Making the Pong Game
65
66 =item Making the Tetris Game using Object Oriented Perl
67
68 =item Handling Music and Sound
69
70 =item Using modules from CPAN to reuse code in Games ( JSON and Moose )
71
72 =item Profiling your Games with NYTProf to find trouble spots
73
74 =item Using XS to optimize Game effects
75
76 =item Interfacing raw data with other Modules ( PDL and OpenGL)
77
78 =back
79
80 Moreover, each tutorial will be provided with working code scripts. Lastly the documentation will be released as SDL::Manual with SDL Perl on CPAN.
81
82 =head2 Project Details
83
84 The tutorials will cover
85
86 =over
87
88 =item Your first SDL Application
89
90 Installing SDL, where to get help and showing a simple window on screen.
91
92 =item Drawing Primitives and Sprites
93
94 Creating primitives (pixels, lines, rectangles, circles, triangles). Loading images into sprites. Then writing to the screen.
95
96 =item Handling Events
97
98 Showing how SDL can handle events from the keyboard, mouse and other input devices.
99
100 =item The Game Loop
101
102 How to put together the core loop of the game. This is the beginning of most games.
103
104 =item Making the Pong Game
105
106 Using what we have learned so to create a simple game.
107
108 =item Making the Tetris Game using Object Oriented Perl
109
110 Using Pure Perl object oriented code we will create a Tetris clone.
111
112 =item Handling Music and Sound
113
114 We will add background game music to Pong and Tetris. Also we will show how channels can be used for Sound Effects.
115
116 =item Using modules from CPAN to reuse code in Games ( JSON and Moose )
117
118 Using JSON to model Game Data. And improving OOP syntax with Moose.
119
120 =item Profiling your Games with NYTProf to find trouble spots
121
122 Games need to be fast and the NYTProf is unique profiling tool to Perl.
123
124 =item Using XS to optimize Game effects
125
126 Performing operations directly on Surface pixels using Perl to prototype and XS to optimize.
127
128 =item Interfacing raw data with other Modules
129
130 Interfacing SDL Surfaces to PDL (Perl Data Language) and the Perl OpenGL.
131
132 =back
133
134 =head2 Completeness Criteria
135
136 The completeness of the project can be gauged with my regular blog posts and emails to sdl-devel@perl.org . 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.
137
138 =head2 Project Schedule
139
140 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.
141
142 =head2 Description
143
144 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.
145
146 =over
147
148 =item Writing simple and clean examples for the tutorials
149
150 This should take 1-2 weeks.
151
152 =item Writing the tutorials and keeping them available on github.com
153
154 This will be overlapping with the last week and 3rd week.
155
156 =item Posting information on regular Blog Posts and the mailing to get the content reviewed
157
158 I will start releasing alpha versions on the end of the 3rd week and ask for reviews until the end of the 4th week
159
160 =item Improving and cleaning up the documents based on the reviews
161
162 The last 2-3 weeks will be spent on updating any Code and Documentations.
163
164 =back
165
166 I will be spending apporximately 20 hours a week on the project. The total will be around 100 hours.
167
168 =head2 Bio
169
170 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.
171
172 [1] http://search.cpan.org/~KTHAKORE
173
174 [2] http://github.com/kthakore
175
176 =cut
Something went wrong with that request. Please try again.