@@ -29,11 +29,11 @@ <h5>NOTE:</h5>
29
29
< p > Don't worry about understanding the code at this moment. Just compare
30
30
the two code listings for displaying the same blue rectangle below.</ p >
31
31
32
+ </ blockquote >
33
+
32
34
< p > Using the < code > SDL::*</ code > layer to draw a blue rectangle looks
33
35
something like this:</ p >
34
36
35
- </ blockquote >
36
-
37
37
< pre > < code > use SDL;
38
38
use SDL::Video;
39
39
use SDL::Surface;
@@ -138,7 +138,7 @@ <h4>Or Compiling Dependencies</h4>
138
138
< code > libogg</ code > , and < code > libpng</ code > headers will suffice for most
139
139
examples in this book.</ p >
140
140
141
- < h3 > Linux</ h3 >
141
+ < h3 > GNU/ Linux</ h3 >
142
142
143
143
< p > Most current GNU/Linux distributions include all the parts needed for
144
144
this tutorial in the default install and in their package management
@@ -189,7 +189,7 @@ <h2>Contact</h2>
189
189
190
190
< h3 > Internet</ h3 >
191
191
192
- < p > SDL Perl's homepage is at HTTP://SDL.Perl.Org/ .</ p >
192
+ < p > SDL Perl's homepage is at HTTP://SDL.Perl.Org.</ p >
193
193
194
194
< h3 > IRC</ h3 >
195
195
@@ -205,7 +205,7 @@ <h2>Examples</h2>
205
205
206
206
< p > The code examples in this book are provided at:</ p >
207
207
208
- < p > HTTP ://GitHub.Com/PerlGameDev/SDL_Manual/tree/master/code_listings/ </ p >
208
+ < p > HTTPS ://GitHub.Com/PerlGameDev/SDL_Manual/tree/master/code_listings</ p >
209
209
210
210
< h2 > Acknowledgements</ h2 >
211
211
@@ -334,7 +334,7 @@ <h2>Coordinates</h2>
334
334
the dimensions span to the right and downward. The API always lists
335
335
coordinates in x,y order. More discussion of these details can be found in
336
336
the SDL library documentation:
337
- http ://www.sdltutorials.com /sdl-coordinates-and-blitting/ </ p >
337
+ HTTP ://SDLTutorials.Com /sdl-coordinates-and-blitting</ p >
338
338
339
339
< h2 > Objective</ h2 >
340
340
@@ -1418,7 +1418,7 @@ <h2>Learn More</h2>
1418
1418
1419
1419
< p > To learn more about this topic please, see an excellent blog post by
1420
1420
< b > GafferOnGames.com</ b > :
1421
- http ://gafferongames.com /game-physics/fix-your-timestep/ .</ p >
1421
+ HTTP ://GafferOnGames.Com /game-physics/fix-your-timestep.</ p >
1422
1422
1423
1423
< h1 > Pong!</ h1 >
1424
1424
@@ -2195,7 +2195,7 @@ <h2>Eye Candy and Code</h2>
2195
2195
2196
2196
< p > In this chapter we work on creating the classic Tetris game using what
2197
2197
we have learned so far. Get the tetris code from
2198
- https ://github.com /PerlGameDev/SDL_Manual/raw/master/games/tetris.zip. To
2198
+ HTTPS ://GitHub.Com /PerlGameDev/SDL_Manual/raw/master/games/tetris.zip. To
2199
2199
run the game invoke in the extracted folder.</ p >
2200
2200
2201
2201
< pre > < code > perl tetris.pl</ code > </ pre >
@@ -3054,7 +3054,7 @@ <h3>Loading Samples</h3>
3054
3054
3055
3055
< pre > < code > +use SDL::Mixer::Samples;
3056
3056
3057
- +#Brillant Lazer Sound from http ://www.freesound.org /samplesViewSingle.php?id=30935
3057
+ +#Brillant Lazer Sound from HTTP ://FreeSound.Org /samplesViewSingle.php?id=30935
3058
3058
+my $sample = SDL::Mixer::Samples::load_WAV('data/sample.wav');
3059
3059
3060
3060
+unless($sample)
@@ -3097,7 +3097,7 @@ <h3>Streaming Music</h3>
3097
3097
< pre > < code > use SDL::Mixer::Channels;
3098
3098
+use SDL::Mixer::Music;
3099
3099
3100
- +#Load our awesome music from http ://8bitcollective.com
3100
+ +#Load our awesome music from HTTP ://8BitCollective.Com
3101
3101
+my $background_music =
3102
3102
+ SDL::Mixer::Music::load_MUS('data/music/01-PC-Speaker-Sorrow.ogg');
3103
3103
@@ -3164,7 +3164,7 @@ <h3>Code so far</h3>
3164
3164
3165
3165
my $playing_channel = SDL::Mixer::Channels::play_channel( -1, $sample, 0 );
3166
3166
3167
- #Load our awesome music from http ://8bitcollective.com
3167
+ #Load our awesome music from HTTP ://8BitCollective.Com
3168
3168
my $background_music = SDL::Mixer::Music::load_MUS('data/music/01-PC-Speaker-Sorrow.ogg');
3169
3169
3170
3170
unless( $background_music )
@@ -3820,7 +3820,7 @@ <h4>Controller</h4>
3820
3820
< h2 > Picking Modules</ h2 >
3821
3821
3822
3822
< p > So, you thought of a nice game, identified your needs, typed some
3823
- keywords in http ://seach.cpan.org , and got tons of results. What now? How
3823
+ keywords in HTTP ://Search.CPAN.Org , and got tons of results. What now? How
3824
3824
to avoid vaporware and find the perfect solution for your needs?</ p >
3825
3825
3826
3826
< h3 > Documentation</ h3 >
@@ -3839,27 +3839,27 @@ <h3>Documentation</h3>
3839
3839
< h3 > License</ h3 >
3840
3840
3841
3841
< p > It's useless to find a module you can't legally use. Most (if not all)
3842
- modules in CPAN are free and open source software, but even so each needs a
3843
- license telling developers what they can and cannot do with it. A lot of
3844
- CPAN modules are released < i > "under the same terms as Perl itself" </ i > , and
3845
- this means you can pick between the Artistic License or the GPL (version
3846
- 1).</ p >
3842
+ modules in HTTP://Search. CPAN.Org are free and open source software, but
3843
+ even so each needs a license telling developers what they can and cannot do
3844
+ with it. A lot of CPAN modules are released < i > "under the same terms as
3845
+ Perl itself" </ i > , and this means you can pick between the Artistic License
3846
+ or the GPL (version 1).</ p >
3847
3847
3848
3848
< p > Below is a short and incomplete list of some popular license choices by
3849
3849
CPAN developers:</ p >
3850
3850
3851
3851
< ul >
3852
3852
3853
- < li > Artistic License - http ://dev.perl.org /licenses/artistic.html</ li >
3853
+ < li > Artistic License - HTTP ://Dev.Perl.Org /licenses/artistic.html</ li >
3854
3854
3855
- < li > GPL (all versions and variations) - http ://www.gnu.org /licenses</ li >
3855
+ < li > GPL (all versions and variations) - HTTP ://GNU.Org /licenses</ li >
3856
3856
3857
- < li > MIT License - http ://www.opensource.org /licenses/mit-license.php</ li >
3857
+ < li > MIT License - HTTP ://OpenSource.Org /licenses/mit-license.php</ li >
3858
3858
3859
3859
</ ul >
3860
3860
3861
- < p > See http ://www.opensource.org /licenses/alphabetical for a comprehensive
3862
- list with each license's full documentation.</ p >
3861
+ < p > See HTTP ://OpenSource.Org /licenses/alphabetical for a comprehensive list
3862
+ with each license's full documentation.</ p >
3863
3863
3864
3864
< p > You should be able to find the module's license by going to a "LICENSE
3865
3865
AND COPYRIGHT" section, usually available at the bottom of the
@@ -3890,7 +3890,7 @@ <h3>Dependencies</h3>
3890
3890
3891
3891
< p > You may, however, be interested in < b > which</ b > modules it depends on,
3892
3892
or, more practically, in the likelihood of a clean installation by your
3893
- users. For that, you can browse to http ://deps.cpantesters.org and input
3893
+ users. For that, you can browse to HTTP ://Deps.CPANTesters.Org and input
3894
3894
the module's name on the search box.</ p >
3895
3895
3896
3896
< p > The CPAN Testers is a collaborative matrix designed to help developers
@@ -3917,14 +3917,14 @@ <h3>CPAN Testers Charts</h3>
3917
3917
How can you tell if that module will run in your target machine according
3918
3918
to architecture, operating system and perl version?</ p >
3919
3919
3920
- < p > The CPAN Testers website at http ://www.cpantesters.org offers a direct
3920
+ < p > The CPAN Testers website at HTTP ://CPANTesters.Org offers a direct
3921
3921
search for distributions by name or author. To see the results for the SDL
3922
3922
module, for instance, you can go to
3923
- http ://www.cpantesters.org /distro/S/SDL.html. You can also find a test
3924
- report summary directly on CPAN, by selecting the distribution and looking
3925
- at the < i > "CPAN Testers"</ i > line. If you click on the < i > "View
3926
- Reports" </ i > link, you'll be redirected to the proper CPAN Testers page,
3927
- like the one shown above.</ p >
3923
+ HTTP ://CPANTesters.Org /distro/S/SDL.html. You can also find a test report
3924
+ summary directly on CPAN, by selecting the distribution and looking at the
3925
+ < i > "CPAN Testers"</ i > line. If you click on the < i > "View Reports" </ i > link,
3926
+ you'll be redirected to the proper CPAN Testers page, like the one shown
3927
+ above.</ p >
3928
3928
3929
3929
< p > The first chart is a PASS summary, containing information about the most
3930
3930
recent version of that module with at least one < i > PASS</ i > report
@@ -4006,7 +4006,7 @@ <h1>Pixel Effects</h1>
4006
4006
< h2 > Sol's Ripple Effect</ h2 >
4007
4007
4008
4008
< p > For our first pixel effect we will be doing is a ripple effect from a
4009
- well known SDL resource, http ://sol.gfxile.net /gp/ch02.html. This effects
4009
+ well known SDL resource, HTTP ://Sol.Gfxile.Net /gp/ch02.html. This effects
4010
4010
uses < code > SDL::get_ticks</ code > to animate a ripple effect across the
4011
4011
surface as seen in the following figure.</ p >
4012
4012
@@ -4026,7 +4026,7 @@ <h3>Pure Perl</h3>
4026
4026
< code > SDL_Surface</ code > pixels array, and sets a value there for us. The
4027
4027
actual pixel effect is just a time dependent (using
4028
4028
< code > SDL::get_ticks</ code > for time) render of a function. See
4029
- http ://sol.gfxile.net /gp/ch02.html for a deeper explanation.</ p >
4029
+ HTTP ://Sol.Gfxile.Net /gp/ch02.html for a deeper explanation.</ p >
4030
4030
4031
4031
< pre > < code > use strict;
4032
4032
use warnings;
@@ -4521,93 +4521,93 @@ <h2>Art and Sprites</h2>
4521
4521
4522
4522
< ul >
4523
4523
4524
- < li > http ://www.cgtextures.com </ li >
4524
+ < li > HTTP ://CGTextures.Com </ li >
4525
4525
4526
- < li > http ://www.mayang.com /textures/ </ li >
4526
+ < li > HTTP ://Mayang.Com /textures</ li >
4527
4527
4528
- < li > http ://www.pixelpoke.com/ </ li >
4528
+ < li > HTTP ://GRSites.Com/archive/textures </ li >
4529
4529
4530
- < li > http ://www.flyingyogi.com/fun/spritelib.html </ li >
4530
+ < li > HTTP ://ImageAfter.Com </ li >
4531
4531
4532
- < li > http ://www.grsites.com/archive /textures/ </ li >
4532
+ < li > HTTP ://AbsoluteCross.Com/graphics /textures</ li >
4533
4533
4534
- < li > http ://www.imageafter.com/ </ li >
4534
+ < li > HTTP ://FreeFoto.Com </ li >
4535
4535
4536
- < li > http ://www.absolutecross.com/graphics/textures/ </ li >
4536
+ < li > HTTP ://Noctua-Graphics.De </ li >
4537
4537
4538
- < li > http ://www.freefoto.com/ </ li >
4538
+ < li > HTTP ://M3Corp.Com/a/download/3d_textures/pages </ li >
4539
4539
4540
- < li > http ://www.noctua-graphics.de </ li >
4540
+ < li > HTTP ://ReinersTileSet.4Players.De/englisch.html </ li >
4541
4541
4542
- < li > http ://www.m3corp.com/a/download/3d_textures/pages/index.htm </ li >
4542
+ < li > HTTP ://VirtualWorlds.Wikia.Com </ li >
4543
4543
4544
- < li > http ://reinerstileset.4players.de/englisch .html</ li >
4544
+ < li > HTTP ://Lunar.LostGarden.Com/labels/free%20game%20graphics .html</ li >
4545
4545
4546
- < li > http ://virtualworlds.wikia.com/ </ li >
4546
+ < li > HTTP ://PDGameResources.WordPress.Com </ li >
4547
4547
4548
- < li > http ://lunar.lostgarden.com/labels/free%20game%20graphics.html </ li >
4548
+ < li > HTTP ://GamingGroundZero.Com </ li >
4549
4549
4550
- < li > http ://pdgameresources.wordpress.com/ </ li >
4550
+ < li > HTTP ://FlyingYogi.Com/fun/spritelib.html </ li >
4551
4551
4552
- < li > http ://gaminggroundzero.com </ li >
4552
+ < li > HTTP ://PixelPoke.Com </ li >
4553
4553
4554
4554
</ ul >
4555
4555
4556
4556
< h2 > Music and Sound Effects</ h2 >
4557
4557
4558
4558
< ul >
4559
4559
4560
- < li > http ://www.freesound.org </ li >
4560
+ < li > HTTP ://FreeSound.Org </ li >
4561
4561
4562
- < li > http ://www.ccmixter.org </ li >
4562
+ < li > HTTP ://CCMixter.Org </ li >
4563
4563
4564
- < li > http ://www.jamendo.com </ li >
4564
+ < li > HTTP ://Jamendo.Com </ li >
4565
4565
4566
- < li > http ://8bc.org </ li >
4566
+ < li > HTTP ://8BC.Org </ li >
4567
4567
4568
- < li > http ://www.sakari-infinity.net </ li >
4568
+ < li > HTTP ://Sakari-Infinity.Net </ li >
4569
4569
4570
- < li > http ://www.findsounds.com </ li >
4570
+ < li > HTTP ://FindSounds.Com </ li >
4571
4571
4572
- < li > http ://www.grsites.com /archive/sounds/ </ li >
4572
+ < li > HTTP ://GRSites.Com /archive/sounds</ li >
4573
4573
4574
4574
</ ul >
4575
4575
4576
4576
< h2 > Fonts</ h2 >
4577
4577
4578
4578
< ul >
4579
4579
4580
- < li > http ://www.dafont.com/ </ li >
4580
+ < li > HTTP ://DAFont.Com </ li >
4581
4581
4582
- < li > http ://www.fontsquirrel.com/ </ li >
4582
+ < li > HTTP ://FontSquirrel.Com </ li >
4583
4583
4584
- < li > http ://www.theleagueofmoveabletype.com/ </ li >
4584
+ < li > HTTP ://TheLeagueOfMoveableType.Com </ li >
4585
4585
4586
- < li > http ://openfontlibrary.org/ </ li >
4586
+ < li > HTTP ://OpenFontLibrary.Org </ li >
4587
4587
4588
- < li > http ://www.acidfonts.com/ </ li >
4588
+ < li > HTTP ://AcidFonts.Com </ li >
4589
4589
4590
- < li > http ://www.grsites.com /archive/fonts/ </ li >
4590
+ < li > HTTP ://GRSites.Com /archive/fonts</ li >
4591
4591
4592
- < li > http ://www.urbanfonts.com/ </ li >
4592
+ < li > HTTP ://UrbanFonts.Com </ li >
4593
4593
4594
4594
</ ul >
4595
4595
4596
4596
< h2 > DIY</ h2 >
4597
4597
4598
- < p > http ://www.gamesounddesign.com/ has several tips on making game music,
4598
+ < p > HTTP ://GameSoundDesign.Com has several tips on making game music,
4599
4599
including several sources for inspiration.</ p >
4600
4600
4601
4601
< p > If you want to create 3D models, either for cutscenes or to integrate
4602
4602
into your game via OpenGL, there are several nice libraries out there for
4603
4603
you:</ p >
4604
4604
4605
4605
< p > < b > Blender</ b > - A free 3D graphics application for modeling, texturing,
4606
- water and smoke simulations, rendering, etc. http ://blender.org </ p >
4606
+ water and smoke simulations, rendering, etc. HTTP ://Blender.Org </ p >
4607
4607
4608
4608
< p > < b > OGRE</ b > - An open-source graphics rendering engine, used in a large
4609
4609
number of production projects. It can be easily integrated via Scott
4610
- Lanning's < i > Ogre</ i > Perl bindings, on CPAN. http ://www.ogre3d.org </ p >
4610
+ Lanning's < i > Ogre</ i > Perl bindings, on CPAN. HTTP ://Ogre3D.Org </ p >
4611
4611
4612
4612
< h2 > Author</ h2 >
4613
4613
0 commit comments