X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pages%2Fblog-0001.html-inc;h=bb61f7c52916ac80e3efe3e7fc40e2a62e200065;hb=e785862422f3e827a242fc244bd57b23443887ce;hp=fcd393b50330e87bf986d7e9b9e5557d505eaecd;hpb=350668cfb612b30b27493abedcd1464b764a9b02;p=sdlgit%2FSDL-Site.git diff --git a/pages/blog-0001.html-inc b/pages/blog-0001.html-inc index fcd393b..bb61f7c 100644 --- a/pages/blog-0001.html-inc +++ b/pages/blog-0001.html-inc @@ -1,6 +1,8 @@ -
-

-The beginnings of modular design for SDL Perl -

-
-
“Do or do not... there is no try.”
--yoda

The design before


The bindings before were all in one huge XS file. This was then exported into the SDL module. This means that the XS file has to handle with macros if any component (e.x SDL_Mixer) is not compiled. Moreover having ever binding in one XS file prevents use to treat C structs as object with only one point of free and malloc. This would be BEGIN and DESTROY in Perl. Also the monolithic design introduces a lot of bugs because we have to use free and malloc all over the place. Lastly SDL monolithic design has the constructor for all structs in both Perl and in XS.

The design we are aiming for

Simple one XS per Module. This would also simplify the Build code.

First Step


We have began with SDL Rect. It is in github master branch now. We are in the progress of making it back compatible. Originally SDL::Rect took named variables as parameters for new(). Now since the constructor is in XS we have only unnamed parameters.


Before


SDL::Rect->new( -x => 0, -y => 0, -width => 0, -height => 0);

After


SDL::Rect->new(0, 0, 0, 0);

Ideally we would like both ways of constructing Rect.
\ No newline at end of file +
+

+SDL Perl Game Contest - week 1 roundup +

+
+As you probably know, last week we started the SDL Perl Game Contest (more like a Game Challenge, as people pointed out), where you have to write one game per week throughout the entire month of March!

So far we had some awesome entries - people really stood up to the challenge! Check them out:


Solar Conflict, by JT Palmer (jtpalmer)



When JT came to #sdl in the middle of the week with some bugfixes for SDLx::Controller::Interface, we knew he was up to something. Solar Conflict is a brilliant clone of Spacewar!, one of the earliest known computer games, where two spaceships battle against each other while steering clear of a star's gravity well. This version of the game lets you play against the computer or another player, and all graphics were taken from Open Game Art. Funny fact: the initial version of the original Spacewar! game took approximately 200 hours to be created. Way to go, JT!


Asteroids, by Tobias Leich (FROGGS)



Speaking of spaceships and classic remakes, who doesn't remember Asteroids? This Atari masterpiece served as inspiration to FROGGS this week, and he provided a beautifully crafted clone, taking you back to the golden age of arcade games.


Polyzle, by Kartik Thakore (kthakore)



But enough of rethinking the past - Kartik pushed the limits of avant-garde this week and brought us Polyzle (or "Polygon Trouble"). The player is faced with several colored polygons swarming around the screen, and needs to click on them to score points - but only has 30 seconds to do it, and believe me, it's not as easy as it looks! While the game certainly doesn't fit the usual rationalities of a standard gameplay, Kartik replies that maybe his game is just too ahead of its time. What do you think? Could he be the Van Gogh of game design? Only time will tell ;-)


FingerTwister, by... me =P (garu)



Last but not least, my precioussssssss.... FingerTwister! In this game, the player needs to press the keys on the keyboard as they show up on screen, and keep them pressed as new keys appear. You can only let go the keys after they disappear from the screen, and the sooner you press a key (the green bar on the bottom) the more points you get. The game also features music and sound effects from talented artists at ccMixter and FreeSound, and a highscore table. Unfortunately, as any game that requires multiple keys pressed at the same time, it suffers from key-jamming issues on regular (plain) keyboards. I tried to provide a workaround for that, but the only real solution is getting a n-key rollover keyboard like razerzone's and logitech's G15/G19.

Overall, I'm really happy about this week's roundup of games, and we're still receiving submissions! Perl coder or not, if you always wanted to write a computer game, join us on the SDL Perl Game Contest, and we'll help you take it out of your TODO list and into the glory it deserves!

See you next week =) +


+

\ No newline at end of file