X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pages%2Fblog-0019.html-inc;h=06aca7502fd35aa8c157a1b354942766dceb4c24;hb=b2c46b060afb65aa63414ea0fabbe500e44917d7;hp=4ca8719867e8e33159d7abfdbf6f914e0aa23691;hpb=638b5b9759c7dcb4de4c0a88c766e9f9dd650348;p=sdlgit%2FSDL-Site.git diff --git a/pages/blog-0019.html-inc b/pages/blog-0019.html-inc index 4ca8719..06aca75 100644 --- a/pages/blog-0019.html-inc +++ b/pages/blog-0019.html-inc @@ -1,6 +1,40 @@

-More Games + Update +Design of SDL::Rect

-

idle digits,
play,
away,
idle digits.

So while I am hacking away on v2.4 and breaking a lot of things. Here is a link to some more games for SDL Perl. These only work in windows now but I will look into bringing them to CPAN (with Garry's permission).

--yapgh

These where reported by Garry Taylor. Here is the rest of the email:

Hi all,
I hadn't checked this newsgroup in a while and was happy to see
that it still alive and well. I saw that some people had been sharing
some SDL Perl games online, and I had a few to share as well. At
"http://home.comcast.net/~g.f.taylor/GarrysGames.html" you can find four
games I have written as well as a simple flip book program to let a
child play at making animation on the computer. The games are "Toad" (a
Frogger wanna be), "RabbitHat" (like Centipede), "BunnyHunt" (sort of
like Pac-Man) and "Bonk The Buggies". All (with the exception of Toad
which in its very first incarnation was a game I wrote in TRS-80 Basic
back in 1981) were written originally to run on my Windows 3.11 PC for
my little girl so that she could play games which were not quite so
violent as games were starting to become at the time.


A few years ago I got the idea of trying to get them to run again
by rewriting them in Perl. The downloads are Windows XP/Vista installs
which include a bare bones Perl environment for running the games (the
installs put the code into its own separate place, and shouldn't
interfere with your existing Perl setups). I did this so that I could
share the games with friends and family who either don't have SDL
installed, don't have Perl installed, or don't do any programming and
just needed something that will run. The code as it currently stands
was not written for general publication, so there are probably places
where the Perl code itself is not always the best looking it could be,
but the games themselves work pretty well. Also, it is worth noting
that I wound up being lazy and made a few additions to the Perl SDL code
that I was using to add an additional function or two for printing text
onto the screen that was centered or right aligned.


While I have not made any Unix installs for the code, I have
actually run the games on a few Linux machines that I have access to,
where I also had installed SDL. I have not updated my SDL installs in
several years now, so there may be complications that arise if running
it with a new version of SDL.


I hope you enjoy the games (or at least aren't too mean about it
if you don't).
Garry Taylor
\ No newline at end of file +

+you say things,
+I hear,
+but don't listen,
+
+you show things,
+I see,
+but don't understand,
+
+you write things,
+I read,
+but don't know.
+

+Lately we have been working on cleaning up the XS name spaces of SDL perl. After some bumps and falls we came up with a separated Rect module. Rect is one of the most simple C struct as shown below.
+
+
+
+Using the awesome perlobject.map as a reference I was able to create a blessed perl object in XS. So now SDL::Rect->new(...) gave us a blessed reference ready to go. And as an icing it would destroy itself properly no matter where it was used. But once I brought it into our existing code base, garu pointed out the extending it was a little bit of a mess. So far to extend Rect we have to something like below. Any comment or advice would be much appreciated.
+
+
+
+
+
+Have at it I am a big boy. You can grab the code like this.
+Only If you don't already have a local git repo:
+
+
mkdir SDL
+cd SDL
+git init .

+Then do this or skip to this if you already have a local git repo
+
git pull git://github.com/kthakore/SDL_perl.git experimental
+


+

\ No newline at end of file