From: Kartik Thakore
Date: Thu, 26 Nov 2009 19:55:05 +0000 (-0500)
Subject: Updated Docs and pArticles
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=638b5b9759c7dcb4de4c0a88c766e9f9dd650348;p=sdlgit%2FSDL-Site.git
Updated Docs and pArticles
---
diff --git a/pages/SDL-Video.html-inc b/pages/SDL-Video.html-inc
index 9227060..a805401 100644
--- a/pages/SDL-Video.html-inc
+++ b/pages/SDL-Video.html-inc
@@ -4,7 +4,7 @@
- NAME
- CATEGORY
-- DESCRIPTION
+- SYNOPSIS
- METHODS
- get_video_surface
- get_video_info
@@ -70,12 +70,36 @@
Core, Video
-DESCRIPTION
Top
-
+
SYNOPSIS
Top
+
+
use SDL;
+ use SDL::Video;
+ use SDL::Surface;
+ use SDL::Rect;
+ # the size of the window box or the screen resolution if fullscreen
+ my $screen_width = 800;
+ my $screen_height = 600;
+ SDL::init(SDL_INIT_VIDEO);
+ # setting video mode
+ my $screen_surface = SDL::Video::set_video_mode($screen_width, $screen_height, 32, SDL_SWSURFACE);
+ # drawing something somewhere
+ my $mapped_color = SDL::Video::map_RGB($screen_surface->format(), 0, 0, 255); # blue
+ SDL::Video::fill_rect($screen_surface,
+ SDL::Rect->new($screen_width / 4, $screen_height / 4,
+ $screen_width / 2, $screen_height / 2), $mapped_color);
+
+ # update an area on the screen so its visible
+ SDL::Video::update_rect($screen_surface, 0, 0, $screen_width, $screen_height);
+
+ sleep(5); # just to have time to see it
+
+ SDL::quit();
+
+
METHODS
Top
@@ -84,26 +108,102 @@
get_video_surface
-
It return the current SDL::Surface on succés or undef on error.
-get_video_surface doesn't take any parameters.
+
my $surface = SDL::Video::get_video_surface();
+
+
+
This function returns the current display SDL::Surface. If SDL is doing format conversion on the display surface, this
+function returns the publicly visible surface, not the real video surface.
+
Example:
+
# somewhere after you set the video mode
+ my $surface = SDL::Video::get_video_surface();
+
+ printf( "our screen is %d pixels wide and %d pixels high\n", $surface->w, $surface->h );
+
+
get_video_info
-
Returns a SDL::VideoInfo about the video hardware.
-It doesn't take any parameters.
+
my $video_info = SDL::Video::get_video_info();
+
+
+
This function returns a read-only SDL::VideoInfo containing information about the video hardware. If it is called before
+SDL::Video::set_video_mode, the vfmt
member of the returned structure will contain the pixel
+format of the best video mode.
+
Example:
+
use SDL;
+ use SDL::Video;
+ use SDL::VideoInfo;
+ use SDL::PixelFormat;
+
+ SDL::init(SDL_INIT_VIDEO);
+
+ my $video_info = SDL::Video::get_video_info();
+
+ printf( "we can have %dbits per pixel\n", $video_info->vfmt->BitsPerPixel );
+
+ SDL::quit();
+
+
video_driver_name
-
Return the 1024 first char of name of the video driver.
-It doesn't take any parameters.
+
my $driver_name = SDL::Video::video_driver_name();
+
+
+
This function will return the name of the initialized video driver up to a maximum of 1024 characters. The driver name is a simple one
+word identifier like "x11"
, "windib"
or "directx"
.
+
Note: Some platforms allow selection of the video driver through the SDL_VIDEODRIVER
environment variable.
+
Example:
+
use SDL;
+ use SDL::Video;
+
+ SDL::init(SDL_INIT_VIDEO);
+
+ print SDL::Video::video_driver_name() . "\n";
+
+ SDL::quit();
+
+
+
my @modes = @{ SDL::Video::list_modes($video_info->vfmt, SDL_NOFRAME) };
+
+
Returns a pointer to an array of available screen dimensions for the given format and video flags,
or it return undef if no modes are avalaibles.
+
Example:
+
use SDL;
+ use SDL::Video;
+ use SDL::VideoInfo;
+ use SDL::PixelFormat;
+ use SDL::Rect;
+
+ SDL::init(SDL_INIT_VIDEO);
+
+ my $video_info = SDL::Video::get_video_info();
+
+ my @modes = @{ SDL::Video::list_modes($video_info->vfmt, SDL_NOFRAME) };
+
+ if($#modes > 0)
+ {
+ print("available modes:\n");
+ foreach my $index ( @modes )
+ {
+ printf("%03d: %d x %d\n", $index, $modes[$index]->w, $modes[$index]->h );
+ }
+ }
+ elsif($#modes == 0)
+ {
+ printf("%s video modes available\n", $modes[0]);
+ }
+
+ SDL::quit();
+
+
video_mode_ok(width,height,bpp,flags)
@@ -114,76 +214,88 @@ It returns 0 if the mode is not supported at all, or the suggested bpp.
set_video_mode(width,height,bpp,flags)
+
my $surface = SDL::Video::set_video_mode( 800, 600, 32, SDL_SWSURFACE|SDL_DOUBLEBUF|SDL_FULLSCREEN);
+
+
Sets up a video mode with the specified width, height, bits-per-pixel and flags.
-set_video_mode returns a SDL::Surface on succés or it returns undef on error, the error message is retrieved using SDL::get_error
.
+
set_video_mode
returns a
SDL::Surface on success or it returns undef on error, the error message is retrieved using
SDL::get_error
.
List of avalaibles flags
- - SDL_SWSURFACE
+ SDL_SWSURFACE
-
Create the video surface in system memory
- - SDL_HWSURFACE
+ SDL_HWSURFACE
-
Create the video surface in video memory
- - SDL_ASYNCBLIT
+ SDL_ASYNCBLIT
-
Enables the use of asynchronous updates of the display surface.
This will usually slow down blitting on single CPU machines, but may provide a speed increase on SMP systems.
- - SDL_ANYFORMAT
+ SDL_ANYFORMAT
-
Normally, if a video surface of the requested bits-per-pixel (bpp) is not available, SDL will emulate one with a shadow surface.
-Passing SDL_ANYFORMAT prevents this and causes SDL to use the video surface, regardless of its pixel depth.
+Passing SDL_ANYFORMAT
prevents this and causes SDL to use the video surface, regardless of its pixel depth.
- - SDL_HWPALETTE
+ SDL_HWPALETTE
-
Give SDL exclusive palette access. Without this flag you may not always get the colors you request with SDL::set_colors or SDL::set_palette.
- - SDL_DOUBLEBUF
+ SDL_DOUBLEBUF
-
-
Enable hardware double buffering; only valid with SDL_HWSURFACE. Calling SDL::flip will flip the buffers and update the screen.
+
Enable hardware double buffering; only valid with SDL_HWSURFACE
. Calling SDL::Video::flip will flip the buffers and update
+the screen.
All drawing will take place on the surface that is not displayed at the moment.
-If double buffering could not be enabled then SDL_Flip will just perform a SDL::update_rect on the entire screen.
+If double buffering could not be enabled then SDL::Video::flip will just perform a
+SDL::Video::update_rect on the entire screen.
- - SDL_FULLSCREEN
+ SDL_FULLSCREEN
-
SDL will attempt to use a fullscreen mode. If a hardware resolution change is not possible (for whatever reason),
the next higher resolution will be used and the display window centered on a black background.
- - SDL_OPENGL
+ SDL_OPENGL
-
-
Create an OpenGL rendering context. You should have previously set OpenGL video attributes with SDL::gl_setattribute.
+ Create an OpenGL rendering context. You should have previously set OpenGL video attributes with
+SDL::Video::GL_set_attribute.
- - SDL_OPENGLBLIT
+ SDL_OPENGLBLIT
-
Create an OpenGL rendering context, like above, but allow normal blitting operations.
The screen (2D) surface may have an alpha channel, and SDL::update_rects must be used for updating changes to the screen surface.
NOTE: This option is kept for compatibility only, and will be removed in next versions. Is not recommended for new code.
- - SDL_RESIZABLE
+ SDL_RESIZABLE
-
Create a resizable window.
-When the window is resized by the user a SDL_VIDEORESIZE event is generated and SDL::set_video_mode can be called again with the new size.
-
-
-
-
+When the window is resized by the user a SDL_VIDEORESIZE
event is generated and
+SDL::Video::set_video_mode can be called again with the new size.
- - SDL_NOFRAME
+ SDL_NOFRAME
-
If possible, SDL_NOFRAME causes SDL to create a window with no title bar or frame decoration.
Fullscreen modes automatically have this flag set.
-
Note 1: Use SDL_SWSURFACE if you plan on doing per-pixel manipulations, or blit surfaces with alpha channels, and require a high framerate. When you use hardware surfaces (by passing the flag SDL_HWSURFACE as parameter), SDL copies the surfaces from video memory to system memory when you lock them, and back when you unlock them. This can cause a major performance hit. Be aware that you may request a hardware surface, but receive a software surface because the video driver doesn't support hardware surface. Many platforms can only provide a hardware surface when using SDL_FULLSCREEN. The SDL_HWSURFACE flag is best used when the surfaces you'll be blitting can also be stored in video memory.
-
Note 2: If you want to control the position on the screen when creating a windowed surface, you may do so by setting the environment variables SDL_VIDEO_CENTERED=center or SDL_VIDEO_WINDOW_POS=x,y. You can also set them via SDL::putenv
.
+
Note 1: Use SDL_SWSURFACE if you plan on doing per-pixel manipulations, or blit surfaces with alpha channels, and require a high framerate.
+When you use hardware surfaces (by passing the flag SDL_HWSURFACE as parameter), SDL copies the surfaces from video memory to system memory
+when you lock them, and back when you unlock them. This can cause a major performance hit. Be aware that you may request a hardware surface,
+but receive a software surface because the video driver doesn't support hardware surface. Many platforms can only provide a hardware surface
+when using SDL_FULLSCREEN. The SDL_HWSURFACE flag is best used when the surfaces you'll be blitting can also be stored in video memory.
+
Note 2: If you want to control the position on the screen when creating a windowed surface, you may do so by setting the environment
+variables SDL_VIDEO_CENTERED=center or SDL_VIDEO_WINDOW_POS=x,y. You can also set them via SDL::putenv
.
Note 3: This function should be called in the main thread of your application.
-
User note 1: Some have found that enabling OpenGL attributes like SDL_GL_STENCIL_SIZE (the stencil buffer size) before the video mode has been set causes the application to simply ignore those attributes, while enabling attributes after the video mode has been set works fine.
-
User note 2: Also note that, in Windows, setting the video mode resets the current OpenGL context. You must execute again the OpenGL initialization code (set the clear color or the shade model, or reload textures, for example) after calling SDL::set_video_mode. In Linux, however, it works fine, and the initialization code only needs to be executed after the first call to SDL::set_video_mode (although there is no harm in executing the initialization code after each call to SDL::set_video_mode, for example for a multiplatform application).
+
User note 1: Some have found that enabling OpenGL attributes like SDL_GL_STENCIL_SIZE (the stencil buffer size) before the video mode has
+been set causes the application to simply ignore those attributes, while enabling attributes after the video mode has been set works fine.
+
User note 2: Also note that, in Windows, setting the video mode resets the current OpenGL context. You must execute again the OpenGL
+initialization code (set the clear color or the shade model, or reload textures, for example) after calling SDL::set_video_mode. In Linux,
+however, it works fine, and the initialization code only needs to be executed after the first call to SDL::set_video_mode (although there
+is no harm in executing the initialization code after each call to SDL::set_video_mode, for example for a multiplatform application).
@@ -218,9 +330,12 @@ update_rects doesn't returns any value.
On hardware that supports double-buffering, this function sets up a flip and returns.
The hardware will wait for vertical retrace, and then swap video buffers before the next video surface blit or lock will return.
On hardware that doesn't support double-buffering or if SDL_SWSURFACE was set, this is equivalent to calling SDL::update_rect(screen, 0, 0, 0, 0)
-
A software screen surface is also updated automatically when parts of a SDL window are redrawn, caused by overlapping windows or by restoring from an iconified state. As a result there is no proper double buffer behavior in windowed mode for a software screen, in contrast to a full screen software mode.
-
The SDL_DOUBLEBUF flag must have been passed to SDL::set_video_mode, when setting the video mode for this function to perform hardware flipping.
-flip returns 0 on succés or -1 on error.
+
A software screen surface is also updated automatically when parts of a SDL window are redrawn, caused by overlapping windows or by
+restoring from an iconified state. As a result there is no proper double buffer behavior in windowed mode for a software screen, in
+contrast to a full screen software mode.
+
The SDL_DOUBLEBUF flag must have been passed to SDL::set_video_mode, when setting the video mode for this function to perform hardware
+flipping.
+flip returns 0 on success or -1 on error.
Note : If you want to swap the buffers of an initialized OpenGL context, use the function SDL::gl_swap_buffers instead.
@@ -228,32 +343,43 @@ flip returns 0 on succés or -1 on error.
Sets a portion of the colormap for the given 8-bit surface.
When surface is the surface associated with the current display, the display colormap will be updated with the requested colors.
-If SDL_HWPALETTE was set in SDL::set_video_mode flags, SDL::set_colors will always return 1, and the palette is guaranteed to be set the way you desire, even if the window colormap has to be warped or run under emulation.
+If SDL_HWPALETTE was set in SDL::set_video_mode flags, SDL::set_colors will always return 1, and the palette is guaranteed to be set the
+way you desire, even if the window colormap has to be warped or run under emulation.
The color components of a SDL::Color structure are 8-bits in size, giving you a total of 2563 = 16777216 colors.
-Palettized (8-bit) screen surfaces with the SDL_HWPALETTE flag have two palettes, a logical palette that is used for mapping blits to/from the surface and a physical palette (that determines how the hardware will map the colors to the display).
-SDL::SetColors modifies both palettes (if present), and is equivalent to calling SDL::SetPalette with the flags set to (SDL_LOGPAL | SDL_PHYSPAL).
+Palettized (8-bit) screen surfaces with the SDL_HWPALETTE flag have two palettes, a logical palette that is used for mapping blits to/from
+the surface and a physical palette (that determines how the hardware will map the colors to the display).
+SDL::SetColors modifies both palettes (if present), and is equivalent to calling SDL::SetPalette with the flags set to
+(SDL_LOGPAL | SDL_PHYSPAL).
If surface is not a palettized surface, this function does nothing, returning 0.
If all of the colors were set as passed to SDL::set_colors, it will return 1.
-If not all the color entries were set exactly as given, it will return 0, and you should look at the surface palette to determine the actual color palette.
+If not all the color entries were set exactly as given, it will return 0, and you should look at the surface palette to determine the
+actual color palette.
set_palette(surface,flags,start,colors)
Sets a portion of the palette for the given 8-bit surface.
-
Palettized (8-bit) screen surfaces with the SDL_HWPALETTE flag have two palettes, a logical palette that is used for mapping blits to/from the surface and a physical palette (that determines how the hardware will map the colors to the display).
-Non screen surfaces have a logical palette only. SDL::blit_surface always uses the logical palette when blitting surfaces (if it has to convert between surface pixel formats). Because of this, it is often useful to modify only one or the other palette to achieve various special color effects (e.g., screen fading, color flashes, screen dimming).
+
Palettized (8-bit) screen surfaces with the SDL_HWPALETTE flag have two palettes, a logical palette that is used for mapping blits to/from
+the surface and a physical palette (that determines how the hardware will map the colors to the display).
+Non screen surfaces have a logical palette only. SDL::blit_surface always uses the logical palette when blitting surfaces (if it has to
+convert between surface pixel formats). Because of this, it is often useful to modify only one or the other palette to achieve various
+special color effects (e.g., screen fading, color flashes, screen dimming).
This function can modify either the logical or physical palette by specifying SDL_LOGPAL or SDL_PHYSPAL the in the flags parameter.
When surface is the surface associated with the current display, the display colormap will be updated with the requested colors.
-If SDL_HWPALETTE was set in SDL::set_video_mode flags, SDL::set_palette will always return 1, and the palette is guaranteed to be set the way you desire, even if the window colormap has to be warped or run under emulation.
+If SDL_HWPALETTE was set in SDL::set_video_mode flags, SDL::set_palette will always return 1, and the palette is guaranteed to be set the
+way you desire, even if the window colormap has to be warped or run under emulation.
The color components of a SDL::Color structure are 8-bits in size, giving you a total of 2563 = 16777216 colors.
-
If surface is not a palettized surface, this function does nothing, returning 0. If all of the colors were set as passed to SDL_SetPalette, it will return 1. If not all the color entries were set exactly as given, it will return 0, and you should look at the surface palette to determine the actual color palette.
+
If surface is not a palettized surface, this function does nothing, returning 0. If all of the colors were set as passed to SDL_SetPalette,
+it will return 1. If not all the color entries were set exactly as given, it will return 0, and you should look at the surface palette
+to determine the actual color palette.
set_gamma(r,g,b)
Sets the "gamma function" for the display of each color component. Gamma controls the brightness/contrast of colors displayed on the screen.
A gamma value of 1.0 is identity (i.e., no adjustment is made).
-
This function adjusts the gamma based on the "gamma function" parameter, you can directly specify lookup tables for gamma adjustment with SDL::set_gamma_ramp.
+
This function adjusts the gamma based on the "gamma function" parameter, you can directly specify lookup tables for gamma adjustment
+with SDL::set_gamma_ramp.
Not all display hardware is able to change gamma.
SDL::set_gamma returns -1 on error.
Warning: Under Linux (X.org Gnome and Xfce), gamma settings affects the entire display (including the desktop)!
@@ -267,10 +393,12 @@ SDL::get_gamma_ramp returns -1 on error.
set_gamma_ramp(rt,gt,bt)
-
Sets the gamma lookup tables for the display for each color component. Each table is an array of 256 Uint16 values, representing a mapping between the input and output for that channel.
+
Sets the gamma lookup tables for the display for each color component. Each table is an array of 256 Uint16 values, representing a
+mapping between the input and output for that channel.
The input is the index into the array, and the output is the 16-bit gamma value at that index, scaled to the output color precision.
You may pass NULL to any of the channels to leave them unchanged.
-
This function adjusts the gamma based on lookup tables, you can also have the gamma calculated based on a "gamma function" parameter with SDL::set_gamma.
+
This function adjusts the gamma based on lookup tables, you can also have the gamma calculated based on a "gamma function" parameter
+with SDL::set_gamma.
Not all display hardware is able to change gamma.
SDL::set_gamma_ramp returns -1 on error.
@@ -281,7 +409,8 @@ SDL::set_gamma_ramp returns -1 on error.
If the format has a palette (8-bit) the index of the closest matching color in the palette will be returned.
If the specified pixel format has an alpha component it will be returned as all 1 bits (fully opaque).
SDL::map_RGP returns a pixel value best approximating the given RGB color value for a given pixel format.
-If the SDL::pixel_format's bpp (color depth) is less than 32-bpp then the unused upper bits of the return value can safely be ignored (e.g., with a 16-bpp format the return value can be assigned to a Uint16, and similarly a Uint8 for an 8-bpp format).
+If the SDL::pixel_format's bpp (color depth) is less than 32-bpp then the unused upper bits of the return value can safely be ignored
+(e.g., with a 16-bpp format the return value can be assigned to a Uint16, and similarly a Uint8 for an 8-bpp format).
@@ -290,19 +419,22 @@ If the SDL::pixel_format's bpp (color depth) is less than 32-bpp then the unuse
If the format has a palette (8-bit) the index of the closest matching color in the palette will be returned.
If the specified pixel format has no alpha component the alpha value will be ignored (as it will be in formats with a palette).
A pixel value best approximating the given RGBA color value for a given pixel format.
-If the pixel format bpp (color depth) is less than 32-bpp then the unused upper bits of the return value can safely be ignored (e.g., with a 16-bpp format the return value can be assigned to a Uint16, and similarly a Uint8 for an 8-bpp format).
+If the pixel format bpp (color depth) is less than 32-bpp then the unused upper bits of the return value can safely be ignored (e.g.,
+with a 16-bpp format the return value can be assigned to a Uint16, and similarly a Uint8 for an 8-bpp format).
Returns RGB values from a pixel in the specified pixel format.
-This function uses the entire 8-bit [0..255] range when converting color components from pixel formats with less than 8-bits per RGB component (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff, 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).
+This function uses the entire 8-bit [0..255] range when converting color components from pixel formats with less than 8-bits per RGB
+component (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff, 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).
Gets RGBA values from a pixel in the specified pixel format.
-This function uses the entire 8-bit [0..255] range when converting color components from pixel formats with less than 8-bits per RGB component (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff, 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).
+This function uses the entire 8-bit [0..255] range when converting color components from pixel formats with less than 8-bits per RGB
+component (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff, 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).
If the surface has no alpha component, the alpha will be returned as 0xff (100% opaque).
@@ -310,7 +442,9 @@ This function uses the entire 8-bit [0..255] range when converting color compone
Creates an empty SDL::Surface from pixel data
Allocate an empty surface (must be called after SDL::set_video_mode)
-If bitsPerPixel is 8 an empty palette is allocated for the surface, otherwise a 'packed-pixel' SDL::pixel_format is created using the [RGBA]mask's provided (see SDL::pixel_format). The flags specifies the type of surface that should be created, it is an OR'd combination of the following possible values.
+If bitsPerPixel is 8 an empty palette is allocated for the surface, otherwise a 'packed-pixel' SDL::pixel_format is created using the
+[RGBA]mask's provided (see SDL::pixel_format). The flags specifies the type of surface that should be created, it is an OR'd combination
+of the following possible values.
- SDL_SWSURFACE
-
@@ -351,23 +485,28 @@ Notes: If an alpha-channel is specified (that is, if Amask is nonzero), then the
You may remove this flag by calling SDL::set_alpha after surface creation.
Also, if the SDL_HWSURFACE flag is set on the returned surface, its format might not match the requested format.
Notes: Sometimes specifying an Alpha mask value could cause strange results.
-This can be worked around by setting the Amask parameter to 0, but still including the SDL_SRCALPHA flag, and then using SDL::set_alpha, also with the SDL_SRCALPHA flag.
+This can be worked around by setting the Amask parameter to 0, but still including the SDL_SRCALPHA flag, and then using SDL::set_alpha,
+also with the SDL_SRCALPHA flag.
lock_surface(surface)
SDL::lock_surface sets up the given SDL::surface for directly accessing the pixels.
-Between calls to SDL::lock_surface and SDL::unlock_surface, you can write to and read from surface->pixels, using the pixel format stored in surface->format.
+Between calls to SDL::lock_surface and SDL::unlock_surface, you can write to and read from surface->pixels, using the pixel format stored
+in surface->format.
Once you are done accessing the surface, you should use SDL::unlock_surface to release the lock.
-
Not all surfaces require locking. If SDL::MUSTLOCK(surface) evaluates to 0, then reading and writing pixels to the surface can be performed at any time, and the pixel format of the surface will not change.
+
Not all surfaces require locking. If SDL::MUSTLOCK(surface) evaluates to 0, then reading and writing pixels to the surface can be performed
+at any time, and the pixel format of the surface will not change.
No operating system or library calls should be made between the lock/unlock pairs, as critical system locks may be held during this time.
-SDL::lock_surface returns 0 on succés or -1 on error.
-
Note : Since SDL 1.1.8, the surface locks are recursive. This means that you can lock a surface multiple times, but each lock must have a matching unlock.
+SDL::lock_surface returns 0 on success or -1 on error.
+
Note : Since SDL 1.1.8, the surface locks are recursive. This means that you can lock a surface multiple times, but each lock must have
+a matching unlock.
unlock_surface(surface)
-
Surfaces that were previously locked using SDL::lock_surface must be unlocked with SDL::unlock_surface. Surfaces should be unlocked as soon as possible.
+
Surfaces that were previously locked using SDL::lock_surface must be unlocked with SDL::unlock_surface. Surfaces should be unlocked as
+soon as possible.
SDL::unlock_surface doesn't return anything.
Note : Since 1.1.8, the surface locks are recursive. See SDL::lock_surface
for more information.
@@ -379,7 +518,7 @@ It is also useful for making a copy of a surface.
The flags parameter is passed to SDL::create_RGB_surface and has those semantics.
This function is used internally by SDL::display_format.
This function can only be called after SDL::init.
-
it returns a SDL::surface on succés or undef on error.
+
it returns a SDL::surface on success or undef on error.
@@ -395,7 +534,7 @@ This function can only be called after SDL::init.
load_BMP(filename)
Loads a SDL::surface from a named Windows BMP file.
-SDL::load_BMP returns a SDL::surface on succés or undef on error.
+SDL::load_BMP returns a SDL::surface on success or undef on error.
Note: When loading a 24-bit Windows BMP file, pixel data points are loaded as blue, green, red, and NOT red, green, blue (as one might expect).
@@ -409,19 +548,20 @@ SDL::load_BMP returns a SDL::surface on succés or undef on error.
save_BMP(surface,filename)
Saves the given SDL::Surface surface as a Windows BMP file named filename.
-it returns 0 on succés or -1 on error.
+it returns 0 on success or -1 on error.
set_color_key(surface,flag,key)
Sets the color key (transparent pixel) in a blittable surface and enables or disables RLE blit acceleration.
-
RLE acceleration can substantially speed up blitting of images with large horizontal runs of transparent pixels (i.e., pixels that match the key value).
+
RLE acceleration can substantially speed up blitting of images with large horizontal runs of transparent pixels (i.e., pixels that match
+the key value).
The key must be of the same pixel format as the surface, SDL::map_RGB is often useful for obtaining an acceptable value.
If flag is SDL_SRCCOLORKEY then key is the transparent pixel value in the source image of a blit.
If flag is OR'd with SDL_RLEACCEL then the surface will be drawn using RLE acceleration when drawn with SDL::Blit_surface.
The surface will actually be encoded for RLE acceleration the first time SDL::blit_surface or SDL::display_format is called on the surface.
If flag is 0, this function clears any current color key.
-
SDL::set_color_key returns 0 on succés or -1 on error.
+
SDL::set_color_key returns 0 on success or -1 on error.
@@ -432,10 +572,12 @@ If flag is 0, this function clears any current color key.
SDL::set_alpha is used for setting the per-surface alpha value and/or enabling and disabling alpha blending.
The surface parameter specifies which SDL::surface whose alpha attributes you wish to adjust.
-flags is used to specify whether alpha blending should be used (SDL_SRCALPHA) and whether the surface should use RLE acceleration for blitting (SDL_RLEACCEL).
+flags is used to specify whether alpha blending should be used (SDL_SRCALPHA) and whether the surface should use RLE acceleration for
+blitting (SDL_RLEACCEL).
flags can be an OR'd combination of these two options, one of these options or 0.
If SDL_SRCALPHA is not passed as a flag then all alpha information is ignored when blitting the surface.
-The alpha parameter is the per-surface alpha value; a surface need not have an alpha channel to use per-surface alpha and blitting can still be accelerated with SDL_RLEACCEL.
+The alpha parameter is the per-surface alpha value; a surface need not have an alpha channel to use per-surface alpha and blitting can
+still be accelerated with SDL_RLEACCEL.
Note: The per-surface alpha value of 128 is considered a special case and is optimised, so it's much faster than other per-surface values.
Alpha affects surface blitting in the following ways:
@@ -482,22 +624,26 @@ If SDL_SRCCOLORKEY is set, only the pixels not matching the colorkey value are c
Note: When blitting, the presence or absence of SDL_SRCALPHA is relevant only on the source surface, not the destination.
-Note: Note that RGBA->RGBA blits (with SDL_SRCALPHA set) keep the alpha of the destination surface. This means that you cannot compose two arbitrary RGBA surfaces this way and get the result you would expect from "overlaying" them; the destination alpha will work as a mask.
+Note: Note that RGBA->RGBA blits (with SDL_SRCALPHA set) keep the alpha of the destination surface. This means that you cannot compose
+two arbitrary RGBA surfaces this way and get the result you would expect from "overlaying" them; the destination alpha will work as a mask.
Note: Also note that per-pixel and per-surface alpha cannot be combined; the per-pixel alpha is always used if available.
-
SDL::set_alpha returns 0 on succés or -1 on error.
+
SDL::set_alpha returns 0 on success or -1 on error.
set_clip_rect(surface,rect)
-
Sets the clipping rectangle for the given SDL::surface. When this surface is the destination of a blit, only the area within the clip rectangle will be drawn into.
-The rectangle pointed to by rect will be clipped to the edges of the surface so that the clip rectangle for a surface can never fall outside the edges of the surface.
+
Sets the clipping rectangle for the given SDL::surface. When this surface is the destination of a blit, only the area within the clip
+rectangle will be drawn into.
+The rectangle pointed to by rect will be clipped to the edges of the surface so that the clip rectangle for a surface can never fall
+outside the edges of the surface.
If rect is NULL the clipping rectangle will be set to the full size of the surface.
SDL::set_clip_rect doesn't returns anything.
get_clip_rect(surface,rect)
-
Gets the clipping rectangle for the given SDL::surface. When this surface is the destination of a blit, only the area within the clip rectangle is drawn into.
+
Gets the clipping rectangle for the given SDL::surface. When this surface is the destination of a blit, only the area within the clip
+rectangle is drawn into.
The rectangle pointed to by rect will be filled with the clipping rectangle of the surface.
SDL::get_clip_rect doesn't returns anything;
@@ -509,51 +655,65 @@ SDL::get_clip_rect doesn't returns anything;
blit_surface(src,src_rect,dest,dest_rect)
This performs a fast blit from the given source SDL::surface to the given destination SDL::surface.
-The width and height in srcrect determine the size of the copied rectangle. Only the position is used in the dstrect (the width and height are ignored). Blits with negative dstrect coordinates will be clipped properly.
+The width and height in srcrect determine the size of the copied rectangle. Only the position is used in the dstrect (the width and height
+are ignored). Blits with negative dstrect coordinates will be clipped properly.
If srcrect is NULL, the entire surface is copied. If dstrect is NULL, then the destination position (upper left corner) is (0, 0).
The final blit rectangle is saved in dstrect after all clipping is performed (srcrect is not modified).
-The blit function should not be called on a locked surface. I.e. when you use your own drawing functions you may need to lock a surface, but this is not the case with SDL::blit_surface. Like most surface manipulation functions in SDL, it should not be used together with OpenGL.
-
The results of blitting operations vary greatly depending on whether SDL_SRCALPHA is set or not. See SDL::set_alpha for an explanation of how this affects your results. Colorkeying and alpha attributes also interact with surface blitting.
+The blit function should not be called on a locked surface. I.e. when you use your own drawing functions you may need to lock a surface,
+but this is not the case with SDL::blit_surface. Like most surface manipulation functions in SDL, it should not be used together with OpenGL.
+
The results of blitting operations vary greatly depending on whether SDL_SRCALPHA is set or not. See SDL::set_alpha for an explanation of
+how this affects your results. Colorkeying and alpha attributes also interact with surface blitting.
SDL::blit_surface doesn't returns anything.
fill_rect(dest,dest_rect,pixel)
-
This function performs a fast fill of the given SDL::rectangle with the given SDL::pixel_format. If dstrect is NULL, the whole surface will be filled with color.
+
This function performs a fast fill of the given SDL::rectangle with the given SDL::pixel_format. If dstrect is NULL, the whole surface
+will be filled with color.
The color should be a pixel of the format used by the surface, and can be generated by the SDL::MapRGB or SDL::map_RGBA functions.
If the color value contains an alpha value then the destination is simply "filled" with that alpha information, no blending takes place.
-
If there is a clip rectangle set on the destination (set via SDL::set_clip_rect), then this function will clip based on the intersection of the clip rectangle and the dstrect rectangle, and the dstrect rectangle will be modified to represent the area actually filled.
-
If you call this on the video surface (ie: the value of SDL::get_video_surface()) you may have to update the video surface to see the result. This can happen if you are using a shadowed surface that is not double buffered in Windows XP using build 1.2.9.
-
SDL::fill_rect returns 0 on succés or -1 on error.
+
If there is a clip rectangle set on the destination (set via SDL::set_clip_rect), then this function will clip based on the intersection
+of the clip rectangle and the dstrect rectangle, and the dstrect rectangle will be modified to represent the area actually filled.
+
If you call this on the video surface (ie: the value of SDL::get_video_surface()) you may have to update the video surface to see the
+result. This can happen if you are using a shadowed surface that is not double buffered in Windows XP using build 1.2.9.
+
SDL::fill_rect returns 0 on success or -1 on error.
GL_load_library(path)
If you wish, you may load the OpenGL library from the given path at runtime, this must be done before SDL::set_video_mode is called.
-The path of the GL library is passed to SDL::GL_load_library and it returns 0 on success, or -1 on an error. You must then use SDL::GL_get_proc_address to retrieve function pointers to GL functions.
-
SDL::GL_load_library returns 0 on succés or -1 or error.
+The path of the GL library is passed to SDL::GL_load_library and it returns 0 on success, or -1 on an error. You must then use
+SDL::GL_get_proc_address to retrieve function pointers to GL functions.
+
SDL::GL_load_library returns 0 on success or -1 or error.
GL_get_proc_address(proc)
-
Returns the address of the GL function proc, or NULL if the function is not found. If the GL library is loaded at runtime, with SDL::GL_load_library, then all GL functions must be retrieved this way. Usually this is used to retrieve function pointers to OpenGL extensions. Note that this function needs an OpenGL context to function properly, so it should be called after SDL::set_video_mode has been called (with the SDL_OPENGL flag).
-
OpenGL function pointers must be declared APIENTRY . This will ensure the proper calling convention is followed on platforms where this matters (Win32) thereby avoiding stack corruption. In a Win32 build environment, APIENTRY should be defined as __stdcall.
+
Returns the address of the GL function proc, or NULL if the function is not found. If the GL library is loaded at runtime, with
+SDL::GL_load_library, then all GL functions must be retrieved this way. Usually this is used to retrieve function pointers to OpenGL
+extensions. Note that this function needs an OpenGL context to function properly, so it should be called after SDL::set_video_mode
+has been called (with the SDL_OPENGL flag).
+
OpenGL function pointers must be declared APIENTRY . This will ensure the proper calling convention is followed on platforms where this
+matters (Win32) thereby avoiding stack corruption. In a Win32 build environment, APIENTRY should be defined as __stdcall.
it returns undef if the function is not found.
GL_get_attribute(attr)
-
It returns SDL/OpenGL attribute attr . This is useful after a call to SDL::set_video_mode to check whether your attributes have been set as you expected.
+
It returns SDL/OpenGL attribute attr . This is useful after a call to SDL::set_video_mode to check whether your attributes have been set
+as you expected.
SDL::GL_get_attribute returns undef if the attribute is not found.
GL_set_attribute(attr,value)
This function sets the given OpenGL attribute attr to value. The requested attributes will take effect after a call to SDL::set_video_mode.
-You should use SDL::GL_get_attribute to check the values after a SDL::set_video_mode call, since the values obtained can differ from the requested ones.
+You should use SDL::GL_get_attribute to check the values after a SDL::set_video_mode call, since the values obtained can differ from the
+requested ones.
See SDL_GLattr for the full list of available attributes.
-SDL::GL_set_attribute returns 0 on succés or -1 on error.
-
Note : The SDL_DOUBLEBUF flag is not required to enable double buffering when setting an OpenGL video mode. Double buffering is enabled or disabled using the SDL_GL_DOUBLEBUFFER attribute.
+SDL::GL_set_attribute returns 0 on success or -1 on error.
+
Note : The SDL_DOUBLEBUF flag is not required to enable double buffering when setting an OpenGL video mode. Double buffering is enabled
+or disabled using the SDL_GL_DOUBLEBUFFER attribute.
GL_swap_buffers
@@ -573,19 +733,21 @@ SDL::GL_swap_buffers doesn't returns any value.
lock_YUV_overlay(overlay)
Much the same as SDL::lock_surface
, SDL::lock_YUV_overlay locks the overlay for direct access to pixel data.
-It returns 0 on succés or -1 on error.
+It returns 0 on success or -1 on error.
unlock_YUV_overlay(overlay)
The opposite to SDL::lock_YUV_overlay
. Unlocks a previously locked overlay. An overlay must be unlocked before it can be displayed.
-It returns 0 on succés or -1 on error.
+It returns 0 on success or -1 on error.
display_YUV_overlay(overlay,dstrect)
-
Blit the overlay to the display surface specified when the overlay was created. The SDL::rect structure, dstrect, specifies a rectangle on the display where the overlay is drawn. The .x and .y fields of dstrect specify the upper left location in display coordinates. The overlay is scaled (independently in x and y dimensions) to the size specified by dstrect, and is optimized for 2x scaling
-
It returns 0 on succés or -1 on error.
+
Blit the overlay to the display surface specified when the overlay was created. The SDL::rect structure, dstrect, specifies a rectangle
+on the display where the overlay is drawn. The .x and .y fields of dstrect specify the upper left location in display coordinates.
+The overlay is scaled (independently in x and y dimensions) to the size specified by dstrect, and is optimized for 2x scaling
+
It returns 0 on success or -1 on error.
diff --git a/pages/SDL.html-inc b/pages/SDL.html-inc
index 533dad4..b74b8be 100644
--- a/pages/SDL.html-inc
+++ b/pages/SDL.html-inc
@@ -25,9 +25,9 @@
quit
was_init(flags)
get_error()
-
set_error(error) *need to be coded
+
set_error_real(error, @values)
error(code) * need to be coded
-
clear_error() * need to be coded
+
clear_error()
load_object()
load_function()
unload_object()
@@ -38,7 +38,7 @@
delay(ms)
-
STUFF TO BE DONE for the documentation
+AUTHORS
@@ -197,8 +197,8 @@ If 'flags' is 0 or SDL_INIT_EVERYTHING, it returns a mask of all initialized sub
SDL::get_error
, which returns a scalar containing the text of the message if any.
-
set_error(error) *need to be coded
-
+
set_error_real(error, @values)
+
SDL::get_error sets the SDL error to a printf style formatted string.
it doesn't returns any values.
@@ -255,8 +255,8 @@ which are equivalent to SDL_Error(SDL_ENOMEM) and SDL_Error(SDL_UNSUPPORTED) res
-
clear_error() * need to be coded
-
+
clear_error()
+
SDL::clear_error deletes all information about the last internal SDL error. Useful if the error has been handled by the program.
it doesn't returns any value.
@@ -308,24 +308,13 @@ than the specified depending on the underlying OS.
-
STUFF TO BE DONE for the documentation
Top
-
-
-
-
- SDL:: to improve
- SDL::Video add examples, need general improvement.
- Event.pod need to be checked against Events.pod
- SDL::Events need to be completed
- SDL::Cdrom need some examples.
- SDL::MultiThread to be created( once implemented ).
- SDL::Timer need examples.
- SDL::RW to be created.
- SDL::Mouse need to be created.
- SDL::Joystick need to be created.
- SDL::Audio need to be created.
+AUTHORS
Top
+
+
magnet, kthakore
+
+
+
-
\ No newline at end of file
diff --git a/pages/blog-0000.html-inc b/pages/blog-0000.html-inc
index db57701..09455c2 100644
--- a/pages/blog-0000.html-inc
+++ b/pages/blog-0000.html-inc
@@ -1,2 +1,2 @@
Articles
-
Migrating Sol's Tutorial of SDL to SDL_PerlSunday, 15 November 2009Tags: [Example] [Perl] [SDL] Sol's Tutorials
When I was struggling with SDL C a while ago, someone recommended Sol's Tutorial to me. It had not only help me understand video in SDL, but I believe my code has improved using Sol's code style. I would like to pass these along to fellow SDL_Perl users too. So here is the Ch 02 code of Sol's Tutorial in SDL_Perl. It will be getting more and more Perly as our team hacks on it. There is more to come!
[more]
Development UpdateMonday, 09 November 2009Tags: [Perl] [SDL] [Updates]Had an exam on the weekend so I am a bit late. Here is the progress so far.
SDL::Video at 97% SDL::Events at 25% ~1000 tests cases passing on Windows and Linux
[more]
Development UpdateMonday, 02 November 2009Tags: [Perl] [SDL] [Updates]In the past week the SDL Perl team has been busy! This is what we have accomplished
Commitment to Testing! In an effort to focus on continuing our focus on testing we have setup a Smolder site for the SDL redesign process. Currently we have two platforms (linux, windows32) regularly tested on here. If there are more people following the redesign process and would like to share their test results; contact us at sdl-devel@perl.org and we will provide access to you.
SDL::Video For the core development most of the focus has been on redesigning around the Video category of the SDL perl API. As of now we are 50% done . 19 functions out of 38 functions have been implemented and tested.
[more]
The Future and Beyond!Saturday, 24 October 2009Tags: [Design] [SDL] [Updates] [games] Updates Since the last post SDL Perl has seen an increase of interest to both use and contribute to SDL Perl. Before I dig into the updates, I would like to acknowledge them.
Core Development Acme ( Leon Brocard ): Has started to work on the Redesign Effort with me. The help is much appreciated! Enjoy your vacation.
Website and Windows Testing FROGGS (Tobias Leich): Came in as a new user to SDL Perl. And after breaking the redesigned SDL Perl in as many ways possible he has decided to help out on the new site.
[more]
The beginnings of modular design for SDL PerlSunday, 11 October 2009Tags: [Design] [SDL] [Updates] 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.
[more]
HackFest: ResultsMonday, 28 September 2009Tags: [HackFest] [Perl] [SDL] MacOSX build is working again. It's still rough but Tetris works on it now. dngor++ SDL::Tutorial::Tetris is on CPAN as v0.15. nferraz++ SDL Perl docs are a little better now. magnet++ Finally experimental Rect and Game::Rect are behaving. There is still more work needed in Game::Rect. Moreover there are more tests on the experimental release. garu++ Also POGL is working experimentally with SDL.
Hopefully I can get the first three results into the next release soon. The next release 2.2.3 will go up as a developmental release first. Also the experimental branch is going up as version 2_4.
Developers All developers please tell me what to put you guys want to be put down as on the
[more]
Updates, Falling Block Game, and Hack FestWednesday, 23 September 2009Tags: [Docs] [Perl] [SDL]You can grab the code . Note you will have to install deps yourself. Read the README file. It is not a tutorial yet, because it was hacked together in ~50 hours. But it playable now. During building this I found out that MacOSX (and Snow Leopard) has died again.
Hackfest So with dngor's help this sunday (27/09/09) we will have a hackfest to fix MacOSX support. Anyone with a MacOSX and wants to help is welcome on #sdl irc.perl.org . We will also try to fix up a lot of docs and the tutorial for a early next week release. Also if we can we will migrate to the new site.
[more]
Thanks nothingmuch, and updatesFriday, 18 September 2009Tags: [Design] [Perl] [SDL] [Tutorial] After a struggling with XS and opaque C structs in the experimental SDL::Rect for a long time. Nothingmuch comes along and solves my problem with this beautiful module XS::Object::Magic . So I will start moving my ugly XS to Magic Land.
SDL Perl Tutorials
This past week I have been working on the sorry state of SDL Perl tutorials. Currently I am working on a Tetris Clone . I am hoping to have it done by next Thrusday for TPM meeting. This tutorial is a mix of several tutorials I found online . Another Lunar Lander tutorial has been submitted by Nelson Ferraz.
[more]
Design of SDL::RectSaturday, 12 September 2009Tags: [Design] [Perl] [SDL]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.
[more]
Why I will be sticking to CPANSunday, 06 September 2009Tags: [CPAN] [Perl] [SDL]Recently there was really long discussion on sdl-devel@perl.org about providing packages for SDL perl rather than focusing on CPAN releases. The gists of the argument was that SDL perl should be making platform specific packages for end users. I agree with this idea but I do have to face the truth.
The truth is there are very few developers currently working on SDL Perl. The truth is CPAN provides several tools that which currently drives development for SDL Perl. There are people interested in packaging SDL Perl ( kmx , jean and Jerome Quelin). The truth is there are other very critical areas we can focus on.
If there are people looking to package SDL Perl for their platform please contact us at sdl-devel@perl.org.
[more]
Frozen Bubble coming to CPANFriday, 04 September 2009Tags: [CPAN] [Frozen Bubble] [Perl] [SDL] To do this the Makefile.PL will need to be rewritten a little bit. Moreover we will need to make test using code from Frozen Bubble so that it can be smoke tested on CPAN. If contributors need more information please contact me.
[more]
Newbie Friendly Perl ProjectsThursday, 03 September 2009Tags: [CPAN] [Perl] [SDL] [personal]This is a reply to szabgab's post on how to get newbies interested in Perl modules. Being a newbie in Perl myself I thought I should take a shot.
I was thinking you can make projects more accessible to newbies by having a step by step plan included with where they need to look. For example for docs of SDL_perl:
Look at SDL docs [ link ] See where SDL_perl is using the same functions [ link ] and the docs to this file [ link ] Use the pod format to add it to the source [ link to using pod ] {BONUS} Come up with tutorial or cookbook [ link to example ] Submit code to github [ link ] or email them to me [ link ]
[more]
More Games + UpdateTuesday, 01 September 2009Tags: [Perl] [SDL] [games]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:
[more]
Updates on Plan for v2.4Monday, 31 August 2009Tags: [Perl] [SDL] [Updates] After some hunting for memory leaks, it became obvious that some rewrite of XS will be necessary. Since this will be a big undertaking I asked for some help from chromatic and garu . We came up with the following plan for v2.4.
Currently all XS is mapped to the SDL_perl module. This does not reflect the modular nature of the sdl libs. So the plan is to gradually move SDL structs and their respective functions to their correct namespaces. We will start with SDL::Rect as garu has added many tests for it. This way the build system will be a lot easier to hack since Module::Build was made for one XS per module. Moreover we will move the Build utilities to Alien::SDL, making it even simpler. The main idea is to adhere to single responsibility principle and encapsulation.
Obviously this will take some time and effort, but it will pay off in the long run. Any help will be greatly appreciated.
[more]
Code is not the only thingSunday, 30 August 2009Tags: [Perl] [Questions] [SDL] After only several weeks of maintaining SDL perl, Today I have come to noticed how important it is to update README's, docs and so on. I will redouble my effort to do this .
However I am not sure where to start updating docs. Has anyone re-documented old modules before? Any advice? If anyone is interested in helping me to sort out documentation please contact me on sdl-devel@perl.org. For people wanting to learn the SDL base there is no better way.
[more]
SDL Perl v2.2.2 out and Plans for v2.4Saturday, 29 August 2009Tags: [Perl] [SDL] I have release v2.2.2 which includes several bug fixes:
Made App loop() faster RT Patched support for add support for gluquadric* sub RT Made App init slimer RT Added faster SDL::Color alternative RT Added better error reporting for TTFont errors Added experimental win32 support RT [Update: v2.2.2.5 is better for windows support]
You can grab this release off CPAN .
[more]
Catching memory leaks in XSFriday, 28 August 2009Tags: [Perl] [SDL]So I am trying to find and plug memory leaks in SDL perl. Most of the memory leaks occur because in XS a reference is still held. One very expensive mem leak was caught by TELS really early on here . The problem occurs where in XS there is
RETVAL = (cast *) safemalloc( ... ); and safefree(...) is never called.
Here is a in code example lines 1082 on.
[more]
Alien::SDL 0.01 released!!!Thursday, 27 August 2009Tags: [Alien] [Perl] [Releases] [SDL]With yesterday's frantic coding to get windows compatibility setup we were left with a very crude way of installing. After some late night hacking I finally came up with Alias's suggestion to have Alien::SDL. All thanks to Alias's generous access to his windows farm , I was able to make a easier module to install SDL deps on windows. Future plans are in place to get sources and compile them for other platform.Hopefully a SDL perl release will be out soon to use Alien::SDL now.
The above script is in test/testsprite.pl.
Until then you can do:
[more]
SDL perl is coming to Strawberry!!Wednesday, 26 August 2009Tags: [Perl] [Releases] [SDL]You can follow the history here .
It has been tested on winXP 32/64 bit strawberry so far. Here is how you can get it.
Go here to get the code Click download, choose .tar.gz Save the resultant kthakore....tar.gz somewhere Get this and extract it on C:/strawberry/ Last do pip kthakore......tar.gz (I find this so amazing!!) Play with C:/strawberry/cpan/build/SDL/test/*.pl or post a bug report
[more]
My milestones (itches) for gaming in PerlTuesday, 25 August 2009Tags: [Perl] [SDL] [personal]As a new Perl developer I am able to contribute with great enthusiasm due to the great community and the fancies of the language. However I know that these things will fade and I will need something else to take the place. Usually what has worked for me in the past was to set milestones. These will act as roots, keeping me interested in being involved. After all in words better than mines.
We all âscratch our own itchesâ. Itâs why I started Linux, itâs why I started git, and itâs why I am still involved. -- Linus
[more]
+
SDL Perl Documentation: Reviewers needThursday, 26 November 2009Tags: [Docs] [Perl] [SDL] Documentation In an effort to learn from past versions of SDL Perl and improve. We have been writing lots of documentation for our users. Of course since this is the first time we have been providing documentation we need your help. Please review our docs, at sdl.perl.org and give us some feed back. Send us the feeback at sdl-devel@mail.org or join us at #sdl irc.perl.org
--yapgh
[more]
Migrating Sol's Tutorial of SDL to SDL_PerlSunday, 15 November 2009Tags: [Example] [Perl] [SDL] Sol's Tutorials
When I was struggling with SDL C a while ago, someone recommended Sol's Tutorial to me. It had not only help me understand video in SDL, but I believe my code has improved using Sol's code style. I would like to pass these along to fellow SDL_Perl users too. So here is the Ch 02 code of Sol's Tutorial in SDL_Perl. It will be getting more and more Perly as our team hacks on it. There is more to come!
[more]
Development UpdateMonday, 09 November 2009Tags: [Perl] [SDL] [Updates]Had an exam on the weekend so I am a bit late. Here is the progress so far.
SDL::Video at 97% SDL::Events at 25% ~1000 tests cases passing on Windows and Linux
[more]
Development UpdateMonday, 02 November 2009Tags: [Perl] [SDL] [Updates]In the past week the SDL Perl team has been busy! This is what we have accomplished
Commitment to Testing! In an effort to focus on continuing our focus on testing we have setup a Smolder site for the SDL redesign process. Currently we have two platforms (linux, windows32) regularly tested on here. If there are more people following the redesign process and would like to share their test results; contact us at sdl-devel@perl.org and we will provide access to you.
SDL::Video For the core development most of the focus has been on redesigning around the Video category of the SDL perl API. As of now we are 50% done . 19 functions out of 38 functions have been implemented and tested.
[more]
The Future and Beyond!Saturday, 24 October 2009Tags: [Design] [SDL] [Updates] [games] Updates Since the last post SDL Perl has seen an increase of interest to both use and contribute to SDL Perl. Before I dig into the updates, I would like to acknowledge them.
Core Development Acme ( Leon Brocard ): Has started to work on the Redesign Effort with me. The help is much appreciated! Enjoy your vacation.
Website and Windows Testing FROGGS (Tobias Leich): Came in as a new user to SDL Perl. And after breaking the redesigned SDL Perl in as many ways possible he has decided to help out on the new site.
[more]
The beginnings of modular design for SDL PerlSunday, 11 October 2009Tags: [Design] [SDL] [Updates] 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.
[more]
HackFest: ResultsMonday, 28 September 2009Tags: [HackFest] [Perl] [SDL] MacOSX build is working again. It's still rough but Tetris works on it now. dngor++ SDL::Tutorial::Tetris is on CPAN as v0.15. nferraz++ SDL Perl docs are a little better now. magnet++ Finally experimental Rect and Game::Rect are behaving. There is still more work needed in Game::Rect. Moreover there are more tests on the experimental release. garu++ Also POGL is working experimentally with SDL.
Hopefully I can get the first three results into the next release soon. The next release 2.2.3 will go up as a developmental release first. Also the experimental branch is going up as version 2_4.
Developers All developers please tell me what to put you guys want to be put down as on the
[more]
Updates, Falling Block Game, and Hack FestWednesday, 23 September 2009Tags: [Docs] [Perl] [SDL]You can grab the code . Note you will have to install deps yourself. Read the README file. It is not a tutorial yet, because it was hacked together in ~50 hours. But it playable now. During building this I found out that MacOSX (and Snow Leopard) has died again.
Hackfest So with dngor's help this sunday (27/09/09) we will have a hackfest to fix MacOSX support. Anyone with a MacOSX and wants to help is welcome on #sdl irc.perl.org . We will also try to fix up a lot of docs and the tutorial for a early next week release. Also if we can we will migrate to the new site.
[more]
Thanks nothingmuch, and updatesFriday, 18 September 2009Tags: [Design] [Perl] [SDL] [Tutorial] After a struggling with XS and opaque C structs in the experimental SDL::Rect for a long time. Nothingmuch comes along and solves my problem with this beautiful module XS::Object::Magic . So I will start moving my ugly XS to Magic Land.
SDL Perl Tutorials
This past week I have been working on the sorry state of SDL Perl tutorials. Currently I am working on a Tetris Clone . I am hoping to have it done by next Thrusday for TPM meeting. This tutorial is a mix of several tutorials I found online . Another Lunar Lander tutorial has been submitted by Nelson Ferraz.
[more]
Design of SDL::RectSaturday, 12 September 2009Tags: [Design] [Perl] [SDL]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.
[more]
Why I will be sticking to CPANSunday, 06 September 2009Tags: [CPAN] [Perl] [SDL]Recently there was really long discussion on sdl-devel@perl.org about providing packages for SDL perl rather than focusing on CPAN releases. The gists of the argument was that SDL perl should be making platform specific packages for end users. I agree with this idea but I do have to face the truth.
The truth is there are very few developers currently working on SDL Perl. The truth is CPAN provides several tools that which currently drives development for SDL Perl. There are people interested in packaging SDL Perl ( kmx , jean and Jerome Quelin). The truth is there are other very critical areas we can focus on.
If there are people looking to package SDL Perl for their platform please contact us at sdl-devel@perl.org.
[more]
Frozen Bubble coming to CPANFriday, 04 September 2009Tags: [CPAN] [Frozen Bubble] [Perl] [SDL] To do this the Makefile.PL will need to be rewritten a little bit. Moreover we will need to make test using code from Frozen Bubble so that it can be smoke tested on CPAN. If contributors need more information please contact me.
[more]
Newbie Friendly Perl ProjectsThursday, 03 September 2009Tags: [CPAN] [Perl] [SDL] [personal]This is a reply to szabgab's post on how to get newbies interested in Perl modules. Being a newbie in Perl myself I thought I should take a shot.
I was thinking you can make projects more accessible to newbies by having a step by step plan included with where they need to look. For example for docs of SDL_perl:
Look at SDL docs [ link ] See where SDL_perl is using the same functions [ link ] and the docs to this file [ link ] Use the pod format to add it to the source [ link to using pod ] {BONUS} Come up with tutorial or cookbook [ link to example ] Submit code to github [ link ] or email them to me [ link ]
[more]
More Games + UpdateTuesday, 01 September 2009Tags: [Perl] [SDL] [games]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:
[more]
Updates on Plan for v2.4Monday, 31 August 2009Tags: [Perl] [SDL] [Updates] After some hunting for memory leaks, it became obvious that some rewrite of XS will be necessary. Since this will be a big undertaking I asked for some help from chromatic and garu . We came up with the following plan for v2.4.
Currently all XS is mapped to the SDL_perl module. This does not reflect the modular nature of the sdl libs. So the plan is to gradually move SDL structs and their respective functions to their correct namespaces. We will start with SDL::Rect as garu has added many tests for it. This way the build system will be a lot easier to hack since Module::Build was made for one XS per module. Moreover we will move the Build utilities to Alien::SDL, making it even simpler. The main idea is to adhere to single responsibility principle and encapsulation.
Obviously this will take some time and effort, but it will pay off in the long run. Any help will be greatly appreciated.
[more]
Code is not the only thingSunday, 30 August 2009Tags: [Perl] [Questions] [SDL] After only several weeks of maintaining SDL perl, Today I have come to noticed how important it is to update README's, docs and so on. I will redouble my effort to do this .
However I am not sure where to start updating docs. Has anyone re-documented old modules before? Any advice? If anyone is interested in helping me to sort out documentation please contact me on sdl-devel@perl.org. For people wanting to learn the SDL base there is no better way.
[more]
SDL Perl v2.2.2 out and Plans for v2.4Saturday, 29 August 2009Tags: [Perl] [SDL] I have release v2.2.2 which includes several bug fixes:
Made App loop() faster RT Patched support for add support for gluquadric* sub RT Made App init slimer RT Added faster SDL::Color alternative RT Added better error reporting for TTFont errors Added experimental win32 support RT [Update: v2.2.2.5 is better for windows support]
You can grab this release off CPAN .
[more]
Catching memory leaks in XSFriday, 28 August 2009Tags: [Perl] [SDL]So I am trying to find and plug memory leaks in SDL perl. Most of the memory leaks occur because in XS a reference is still held. One very expensive mem leak was caught by TELS really early on here . The problem occurs where in XS there is
RETVAL = (cast *) safemalloc( ... ); and safefree(...) is never called.
Here is a in code example lines 1082 on.
[more]
Alien::SDL 0.01 released!!!Thursday, 27 August 2009Tags: [Alien] [Perl] [Releases] [SDL]With yesterday's frantic coding to get windows compatibility setup we were left with a very crude way of installing. After some late night hacking I finally came up with Alias's suggestion to have Alien::SDL. All thanks to Alias's generous access to his windows farm , I was able to make a easier module to install SDL deps on windows. Future plans are in place to get sources and compile them for other platform.Hopefully a SDL perl release will be out soon to use Alien::SDL now.
The above script is in test/testsprite.pl.
Until then you can do:
[more]
SDL perl is coming to Strawberry!!Wednesday, 26 August 2009Tags: [Perl] [Releases] [SDL]You can follow the history here .
It has been tested on winXP 32/64 bit strawberry so far. Here is how you can get it.
Go here to get the code Click download, choose .tar.gz Save the resultant kthakore....tar.gz somewhere Get this and extract it on C:/strawberry/ Last do pip kthakore......tar.gz (I find this so amazing!!) Play with C:/strawberry/cpan/build/SDL/test/*.pl or post a bug report
[more]
diff --git a/pages/blog-0001.html-inc b/pages/blog-0001.html-inc
index bc1ede2..62c9b48 100644
--- a/pages/blog-0001.html-inc
+++ b/pages/blog-0001.html-inc
@@ -1,6 +1,6 @@
-Migrating Sol's Tutorial of SDL to SDL_Perl
+SDL Perl Documentation: Reviewers need
-
If I have seen further it is only by standing on the shoulders of giants. --Newton
When I was struggling with SDL C a while ago, someone recommended Sol's Tutorial to me. It had not only help me understand video in SDL, but I believe my code has improved using Sol's code style. I would like to pass these along to fellow SDL_Perl users too. So here is the Ch 02 code of Sol's Tutorial in SDL_Perl. It will be getting more and more Perly as our team hacks on it. There is more to come!
To use this code you need the new Redesigned SDL_Perl Library
Getting SDL Dependencies
Only If you are on Linux (debian/ubuntu) you need the following dependencies:
$ sudo apt-get install libsdl-net1.2-dev libsdl-mixer1.2-dev libsmpeg-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev
On Windows we recommend using
Strawberry Perl. It comes with SDL-1.2.13 header files and libs included.
Both Windows and Linux needs to install Alien::SDL
$ cpan Alien::SDL
** Add sudo to this for Linux
Getting Bleeding SDL
The bleeding SDL is on github. Click download on this
site .
Extract it and cd into the folder run
$ cpan .
** The dot is needed
** in Linux you may need to do sudo
Then you can run this script by doing
$ perl examples/sols/ch02.pl
\ No newline at end of file
+
The written word,
survives;
the tests of Time,
the fires of Hades,
and wrath of Pluto.
Documentation
In an effort to learn from past versions of SDL Perl and improve. We have been writing lots of documentation for our users. Of course since this is the first time we have been providing documentation we need your help. Please review our docs, at sdl.perl.org and give us some feed back. Send us the feeback at sdl-devel@mail.org or join us at #sdl irc.perl.org
--yapgh
\ No newline at end of file
diff --git a/pages/blog-0002.html-inc b/pages/blog-0002.html-inc
index 51a18a5..bc1ede2 100644
--- a/pages/blog-0002.html-inc
+++ b/pages/blog-0002.html-inc
@@ -1,6 +1,6 @@
-Once in a while .... (set_event_filter)
+Migrating Sol's Tutorial of SDL to SDL_Perl
-
Once in a while
Things just work!
So I have been hacking for a while on SDL::Events::set_event_filter. The code below is an example usage. The magic behind this is
here 1 #!/usr/bin/perl -w
2 use strict;
3 use warnings;
4 use SDL v2.3; #Require the redesign branch
5 use SDL::Video;
6 use SDL::Event;
7 use SDL::Events;
8
9 SDL::init(SDL_INIT_VIDEO);
10 my $display = SDL::Video::set_video_mode(640,480,32, SDL_SWSURFACE );
11 my $event = SDL::Event->new();
12
13 #This filters out all ActiveEvents
14 my $filter = sub {
15 my ($e, $type) = ($_[0], $_[0]->type);
16 if($type == SDL_ACTIVEEVENT){ return 0 }
17 elsif($type == SDL_MOUSEBUTTONDOWN && $e->button_button == 1){ return 0 }
18 else { return 1; }
19 };
20
21 SDL::Events::set_event_filter($filter);
22
23 while(1)
24 {
25
26 SDL::Events::pump_events();
27 if(SDL::Events::poll_event($event))
28 {
29
30 if( $event->type == SDL_ACTIVEEVENT)
31 {
32 print "Hello Mouse!!!\n" if ($event->active_gain && ($event->active_state == SDL_APPMOUSEFOCUS) );
33 print "Bye Mouse!!!\n" if (!$event->active_gain && ($event->active_state == SDL_APPMOUSEFOCUS) );
34 }
35 if( $event->type == SDL_MOUSEBUTTONDOWN)
36 {
37 my ($x, $y, $but ) = ($event->button_x, $event->button_y, $event->button_button);
38 warn "$but CLICK!!! at $x and $y \n";
39 }
40
41 last if($event->type == SDL_QUIT);
42 }
43 }
44 SDL::quit();
Tinker with $filter and look at perldoc lib/SDL/pods/Event.pod.
Have fun,
--yapgh
\ No newline at end of file
+
If I have seen further it is only by standing on the shoulders of giants. --Newton
When I was struggling with SDL C a while ago, someone recommended Sol's Tutorial to me. It had not only help me understand video in SDL, but I believe my code has improved using Sol's code style. I would like to pass these along to fellow SDL_Perl users too. So here is the Ch 02 code of Sol's Tutorial in SDL_Perl. It will be getting more and more Perly as our team hacks on it. There is more to come!
To use this code you need the new Redesigned SDL_Perl Library
Getting SDL Dependencies
Only If you are on Linux (debian/ubuntu) you need the following dependencies:
$ sudo apt-get install libsdl-net1.2-dev libsdl-mixer1.2-dev libsmpeg-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev
On Windows we recommend using
Strawberry Perl. It comes with SDL-1.2.13 header files and libs included.
Both Windows and Linux needs to install Alien::SDL
$ cpan Alien::SDL
** Add sudo to this for Linux
Getting Bleeding SDL
The bleeding SDL is on github. Click download on this
site .
Extract it and cd into the folder run
$ cpan .
** The dot is needed
** in Linux you may need to do sudo
Then you can run this script by doing
$ perl examples/sols/ch02.pl
\ No newline at end of file
diff --git a/pages/blog-0003.html-inc b/pages/blog-0003.html-inc
index 83a05ba..51a18a5 100644
--- a/pages/blog-0003.html-inc
+++ b/pages/blog-0003.html-inc
@@ -1,6 +1,6 @@
-Hello Mouse? An Example of the New Event Code
+Once in a while .... (set_event_filter)
-
Any code that is not marketed is dead code
--mst
You need the new code from the
redesign branch to use this .
#!/usr/bin/env perl
use SDL;
use SDL::Events;
use SDL::Event;
use SDL::Video;
SDL::init(SDL_INIT_VIDEO);
my $display = SDL::Video::set_video_mode(640,480,32, SDL_SWSURFACE );
my $event = SDL::Event->new();
while(1)
{
SDL::Events::pump_events();
if(SDL::Events::poll_event($event) && $event->type == SDL_ACTIVEEVENT)
{
print "Hello Mouse!!!\n" if ($event->active_gain && ($event->active_state == SDL_APPMOUSEFOCUS) );
print "Bye Mouse!!!\n" if (!$event->active_gain && ($event->active_state == SDL_APPMOUSEFOCUS) );
}
exit if($event->type == SDL_QUIT);
}
\ No newline at end of file
+
Once in a while
Things just work!
So I have been hacking for a while on SDL::Events::set_event_filter. The code below is an example usage. The magic behind this is here
1 #!/usr/bin/perl -w
2 use strict;
3 use warnings;
4 use SDL v2.3; #Require the redesign branch
5 use SDL::Video;
6 use SDL::Event;
7 use SDL::Events;
8
9 SDL::init(SDL_INIT_VIDEO);
10 my $display = SDL::Video::set_video_mode(640,480,32, SDL_SWSURFACE );
11 my $event = SDL::Event->new();
12
13 #This filters out all ActiveEvents
14 my $filter = sub {
15 my ($e, $type) = ($_[0], $_[0]->type);
16 if($type == SDL_ACTIVEEVENT){ return 0 }
17 elsif($type == SDL_MOUSEBUTTONDOWN && $e->button_button == 1){ return 0 }
18 else { return 1; }
19 };
20
21 SDL::Events::set_event_filter($filter);
22
23 while(1)
24 {
25
26 SDL::Events::pump_events();
27 if(SDL::Events::poll_event($event))
28 {
29
30 if( $event->type == SDL_ACTIVEEVENT)
31 {
32 print "Hello Mouse!!!\n" if ($event->active_gain && ($event->active_state == SDL_APPMOUSEFOCUS) );
33 print "Bye Mouse!!!\n" if (!$event->active_gain && ($event->active_state == SDL_APPMOUSEFOCUS) );
34 }
35 if( $event->type == SDL_MOUSEBUTTONDOWN)
36 {
37 my ($x, $y, $but ) = ($event->button_x, $event->button_y, $event->button_button);
38 warn "$but CLICK!!! at $x and $y \n";
39 }
40
41 last if($event->type == SDL_QUIT);
42 }
43 }
44 SDL::quit();
Tinker with $filter and look at perldoc lib/SDL/pods/Event.pod.
Have fun,
--yapgh
\ No newline at end of file
diff --git a/pages/blog-0004.html-inc b/pages/blog-0004.html-inc
index 2b974bc..83a05ba 100644
--- a/pages/blog-0004.html-inc
+++ b/pages/blog-0004.html-inc
@@ -1,6 +1,6 @@
-Development Update
+Hello Mouse? An Example of the New Event Code
-
Short and Sweet
Had an exam on the weekend so I am a bit late. Here is the progress so far.
- SDL::Video at 97%
- SDL::Events at 25%
- ~1000 tests cases passing on Windows and Linux
The major release maybe coming quicker than we thought. FROGGS++ for helping a lot out on this. However we need
more testers!! Please contact us on
#sdl and we will set you up with an account on
Smolder.
[Edit] Please read http://sdlperl.ath.cx/projects/SDLPerl/wiki/Testing on how to get started in test!
\ No newline at end of file
+Any code that is not marketed is dead code
--mst
You need the new code from the redesign branch to use this .
#!/usr/bin/env perl
use SDL;
use SDL::Events;
use SDL::Event;
use SDL::Video;
SDL::init(SDL_INIT_VIDEO);
my $display = SDL::Video::set_video_mode(640,480,32, SDL_SWSURFACE );
my $event = SDL::Event->new();
while(1)
{
SDL::Events::pump_events();
if(SDL::Events::poll_event($event) && $event->type == SDL_ACTIVEEVENT)
{
print "Hello Mouse!!!\n" if ($event->active_gain && ($event->active_state == SDL_APPMOUSEFOCUS) );
print "Bye Mouse!!!\n" if (!$event->active_gain && ($event->active_state == SDL_APPMOUSEFOCUS) );
}
exit if($event->type == SDL_QUIT);
}
\ No newline at end of file
diff --git a/pages/blog-0005.html-inc b/pages/blog-0005.html-inc
index 63b22df..2b974bc 100644
--- a/pages/blog-0005.html-inc
+++ b/pages/blog-0005.html-inc
@@ -3,4 +3,4 @@
Development Update
-
A stoic stone will sit idle,
but will some effort,
A rolling rock will run!
In the past week the SDL Perl team has been busy! This is what we have accomplished
Commitment to Testing!
In an effort to focus on continuing our focus on testing we have setup a
Smolder site for the SDL redesign process. Currently we have two platforms (linux, windows32) regularly tested on here. If there are more people following the redesign process and would like to share their test results; contact us at sdl-devel@perl.org and we will provide access to you.
SDL::Video
For the core development most of the focus has been on redesigning around the Video category of the SDL perl API. As of now we are
50% done. 19 functions out of 38 functions have been implemented and tested.
Site Redesign + Migration
On the end of the spectrum, Froggs has been hard at work on the
graphical design of the site. More over with mst's help we will soon be migrating to http://sdl.perl.org.
Documentation
Moreover this week we have seen an increase effort from magnet on the
SDL docs. Kudos!
SWIG Experimentation
Finally
Katrina has begun looking into SWIG as alternative for SDL in the future.
\ No newline at end of file
+Short and Sweet
Had an exam on the weekend so I am a bit late. Here is the progress so far.
- SDL::Video at 97%
- SDL::Events at 25%
- ~1000 tests cases passing on Windows and Linux
The major release maybe coming quicker than we thought. FROGGS++ for helping a lot out on this. However we need more testers!! Please contact us on #sdl and we will set you up with an account on Smolder.
[Edit] Please read http://sdlperl.ath.cx/projects/SDLPerl/wiki/Testing on how to get started in test!
\ No newline at end of file
diff --git a/pages/blog-0006.html-inc b/pages/blog-0006.html-inc
index 76d8474..63b22df 100644
--- a/pages/blog-0006.html-inc
+++ b/pages/blog-0006.html-inc
@@ -1,6 +1,6 @@
-The Future and Beyond!
+Development Update
-
I do not think about awesomeness...
I just am awesomeness
n.n
--KatrinaTheLamia Updates
Since the last post SDL Perl has seen an increase of interest to both use and contribute to SDL Perl. Before I dig into the updates, I would like to acknowledge them.
Core Development
Acme (Leon Brocard): Has started to work on the Redesign Effort with me. The help is much appreciated! Enjoy your vacation.
Website and Windows Testing
FROGGS (Tobias Leich): Came in as a new user to SDL Perl. And after breaking the redesigned SDL Perl in as many ways possible he has decided to help out on the new site.
Last Legacy Release
Ok! Now this weekend hopefully we will release our last legacy release, after this we move on! This release will focus on showing of SDL + Perl possibilities.
Pong + SDL::Game::Rect
garu has been working on making SDL object extensions that provide a more perly way to use and play with the SDL bindings. To demonstrate the benefits of this SDL::Tutorial::Pong is done and being polished up. SDL::Game::Rect is a peek in to the design and vision we have for SDL down the road.
Design
The design we have settled on for future release for SDL Perl can be broken in to two layers, SDL::* and SDL::Game::*. Previously the SDL Perl library tried to provide C bindings and provide Perl Idiomatic access. This was messy in regards to the single responsibility principle (do one thing and do it well).
We have decided to separate these two focuses into the two name spaces SDL::* and SDL::Game::*. SDL::* will provide straight access to SDL's C API, nothing less and nothing more. SDL::Game::* will extend and make pretty unicorns for Perl.
This design has already begin to pay of. One major benefit been in the XS
readability. Moreover since structs are treated as objects, Perl manages their destruction, and deliver less memory leaks.
\ No newline at end of file
+
A stoic stone will sit idle,
but will some effort,
A rolling rock will run!
In the past week the SDL Perl team has been busy! This is what we have accomplished
Commitment to Testing!
In an effort to focus on continuing our focus on testing we have setup a Smolder site for the SDL redesign process. Currently we have two platforms (linux, windows32) regularly tested on here. If there are more people following the redesign process and would like to share their test results; contact us at sdl-devel@perl.org and we will provide access to you.
SDL::Video
For the core development most of the focus has been on redesigning around the Video category of the SDL perl API. As of now we are 50% done. 19 functions out of 38 functions have been implemented and tested.
Site Redesign + Migration
On the end of the spectrum, Froggs has been hard at work on the graphical design of the site. More over with mst's help we will soon be migrating to http://sdl.perl.org.
Documentation
Moreover this week we have seen an increase effort from magnet on the SDL docs. Kudos!
SWIG Experimentation
Finally Katrina has begun looking into SWIG as alternative for SDL in the future.
\ No newline at end of file
diff --git a/pages/blog-0007.html-inc b/pages/blog-0007.html-inc
index fe4b8d4..76d8474 100644
--- a/pages/blog-0007.html-inc
+++ b/pages/blog-0007.html-inc
@@ -1,6 +1,6 @@
-The beginnings of modular design for SDL Perl
+The Future and Beyond!
-
â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
+I do not think about awesomeness...
I just am awesomeness
n.n
--KatrinaTheLamia
Updates
Since the last post SDL Perl has seen an increase of interest to both use and contribute to SDL Perl. Before I dig into the updates, I would like to acknowledge them.
Core Development
Acme (Leon Brocard): Has started to work on the Redesign Effort with me. The help is much appreciated! Enjoy your vacation.
Website and Windows Testing
FROGGS (Tobias Leich): Came in as a new user to SDL Perl. And after breaking the redesigned SDL Perl in as many ways possible he has decided to help out on the new site.
Last Legacy Release
Ok! Now this weekend hopefully we will release our last legacy release, after this we move on! This release will focus on showing of SDL + Perl possibilities.
Pong + SDL::Game::Rect
garu has been working on making SDL object extensions that provide a more perly way to use and play with the SDL bindings. To demonstrate the benefits of this SDL::Tutorial::Pong is done and being polished up. SDL::Game::Rect is a peek in to the design and vision we have for SDL down the road.
Design
The design we have settled on for future release for SDL Perl can be broken in to two layers, SDL::* and SDL::Game::*. Previously the SDL Perl library tried to provide C bindings and provide Perl Idiomatic access. This was messy in regards to the single responsibility principle (do one thing and do it well).
We have decided to separate these two focuses into the two name spaces SDL::* and SDL::Game::*. SDL::* will provide straight access to SDL's C API, nothing less and nothing more. SDL::Game::* will extend and make pretty unicorns for Perl.
This design has already begin to pay of. One major benefit been in the XS readability. Moreover since structs are treated as objects, Perl manages their destruction, and deliver less memory leaks.
\ No newline at end of file
diff --git a/pages/blog-0008.html-inc b/pages/blog-0008.html-inc
index 627ed29..fe4b8d4 100644
--- a/pages/blog-0008.html-inc
+++ b/pages/blog-0008.html-inc
@@ -1,6 +1,6 @@
-Why and How Frozen Bubble is going to CPAN
+The beginnings of modular design for SDL Perl
-
A single drop,
causes the ocean to swell
So 5 weeks ago, SDL Perl was broken. It had been for several years. After the last release SDL Perl works ... somewhat. The quick releases that you have seen have been work-arounds, fixes and refactoring. This is not bad for a few weeks of work but, there is a point where code smell and technical debt is too huge to fix with out redesigning. This is that point.
Since the redesigning will take time and effort it will be good to have a leg up. This leg up is Frozen Bubble 2.20. Frozen Bubble employs a lot of C and Perl hacks to cover up for SDL Perl's lacking. This will help in a sense fast forward the code status to 2008. Since Frozen Bubble is helping us out, we can go one step forward and help it out!
So Alias (Adam Kennedy) and I have started work on making Frozen Bubble CPAN accessible. Frozen Bubble is a well know game and making it cross-platform will bring lots of attention and hopefully contributions to SDL Perl.
In Alias's
earlier post about this he mentioned about making a splash and some other stuff. I will talk about how and where we will be accomplishing this task.
First we will be tracking Frozen Bubble on the new
SDL Perl Trac website. This site will be similar to Padre's Trac site. As a bonus for people looking to help out in SDL Perl I have separated tasks by
perceived difficulty. This will help to breakdown harder task too.
For example for Frozen Bubble the two major bumps we have run into so far are:
Migrating the SDL Perl workarounds:
Ticket #3
The first one will be difficult as it involves XS. So I will break it down into easier tasks with specific instruction which can then hopefully be picked up by interested contributers. The second one there is sort of a forte of Adam so I will leave it up to him. This is the process I am proposing make hard tickets, break them down.
This will generate a lot of easy tickets that will hopefully be synchronized. If you are interested in this please give me a shout on #sdl irc.perl.org or the mailing list at sdl-devel@perl.org and I will get you registered.
--yapgh
\ No newline at end of file
+â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
diff --git a/pages/blog-0009.html-inc b/pages/blog-0009.html-inc
index 4f7d7ba..627ed29 100644
--- a/pages/blog-0009.html-inc
+++ b/pages/blog-0009.html-inc
@@ -1,6 +1,6 @@
-HackFest: Results
+Why and How Frozen Bubble is going to CPAN
-
The beautiful sunset,
is no match for,
the ugly sunrise
Results
On Sunday we had a hackfest on #sdl irc.perl.org. This is what we got done.
- MacOSX build is working again. It's still rough but Tetris works on it now. dngor++
- SDL::Tutorial::Tetris is on CPAN as v0.15. nferraz++
- SDL Perl docs are a little better now. magnet++
- Finally experimental Rect and Game::Rect are behaving. There is still more work needed in Game::Rect. Moreover there are more tests on the experimental release. garu++
- Also POGL is working experimentally with SDL.
Hopefully I can get the first three results into the next release soon. The next release 2.2.3 will go up as a developmental release first. Also the experimental branch is going up as version 2_4.
Developers
All developers please tell me what to put you guys want to be put down as on the
in the Docs for the SDL Perl Team section.
--yapgh
\ No newline at end of file
+A single drop,
causes the ocean to swell
So 5 weeks ago, SDL Perl was broken. It had been for several years. After the last release SDL Perl works ... somewhat. The quick releases that you have seen have been work-arounds, fixes and refactoring. This is not bad for a few weeks of work but, there is a point where code smell and technical debt is too huge to fix with out redesigning. This is that point.
Since the redesigning will take time and effort it will be good to have a leg up. This leg up is Frozen Bubble 2.20. Frozen Bubble employs a lot of C and Perl hacks to cover up for SDL Perl's lacking. This will help in a sense fast forward the code status to 2008. Since Frozen Bubble is helping us out, we can go one step forward and help it out!
So Alias (Adam Kennedy) and I have started work on making Frozen Bubble CPAN accessible. Frozen Bubble is a well know game and making it cross-platform will bring lots of attention and hopefully contributions to SDL Perl.
In Alias's
earlier post about this he mentioned about making a splash and some other stuff. I will talk about how and where we will be accomplishing this task.
First we will be tracking Frozen Bubble on the new
SDL Perl Trac website. This site will be similar to Padre's Trac site. As a bonus for people looking to help out in SDL Perl I have separated tasks by
perceived difficulty. This will help to breakdown harder task too.
For example for Frozen Bubble the two major bumps we have run into so far are:
Migrating the SDL Perl workarounds:
Ticket #3
The first one will be difficult as it involves XS. So I will break it down into easier tasks with specific instruction which can then hopefully be picked up by interested contributers. The second one there is sort of a forte of Adam so I will leave it up to him. This is the process I am proposing make hard tickets, break them down.
This will generate a lot of easy tickets that will hopefully be synchronized. If you are interested in this please give me a shout on #sdl irc.perl.org or the mailing list at sdl-devel@perl.org and I will get you registered.
--yapgh
\ No newline at end of file
diff --git a/pages/blog-0010.html-inc b/pages/blog-0010.html-inc
index 40f22bb..4f7d7ba 100644
--- a/pages/blog-0010.html-inc
+++ b/pages/blog-0010.html-inc
@@ -1,6 +1,6 @@
-Updates, Falling Block Game, and Hack Fest
+HackFest: Results
-
Silent but active,
Small but deadly.
Updates
Ok so my blog posts have gone down a bit due to me using my fingers for coding. We have started to get some updates to SDL docs so that good. Also some of the tutorials are shaping up. This is what I have been hacking this past week.
You can grab the
code. Note you will have to install deps yourself. Read the README file. It is not a tutorial yet, because it was hacked together in ~50 hours. But it playable now. During building this I found out that MacOSX (and Snow Leopard) has died again.
Hackfest
So with dngor's help this sunday (27/09/09) we will have a hackfest to fix MacOSX support. Anyone with a MacOSX and wants to help is welcome on
#sdl irc.perl.org. We will also try to fix up a lot of docs and the tutorial for a early next week release. Also if we can we will migrate to the new site.
\ No newline at end of file
+The beautiful sunset,
is no match for,
the ugly sunrise
Results
On Sunday we had a hackfest on #sdl irc.perl.org. This is what we got done.
- MacOSX build is working again. It's still rough but Tetris works on it now. dngor++
- SDL::Tutorial::Tetris is on CPAN as v0.15. nferraz++
- SDL Perl docs are a little better now. magnet++
- Finally experimental Rect and Game::Rect are behaving. There is still more work needed in Game::Rect. Moreover there are more tests on the experimental release. garu++
- Also POGL is working experimentally with SDL.
Hopefully I can get the first three results into the next release soon. The next release 2.2.3 will go up as a developmental release first. Also the experimental branch is going up as version 2_4.
Developers
All developers please tell me what to put you guys want to be put down as on the
in the Docs for the SDL Perl Team section.
--yapgh
\ No newline at end of file
diff --git a/pages/blog-0011.html-inc b/pages/blog-0011.html-inc
index 8d5d729..40f22bb 100644
--- a/pages/blog-0011.html-inc
+++ b/pages/blog-0011.html-inc
@@ -1,6 +1,6 @@
-Thanks nothingmuch, and updates
+Updates, Falling Block Game, and Hack Fest
-
struggle,
live,
die
After a struggling with XS and opaque C structs in the experimental SDL::Rect for a long time.
Nothingmuch comes along and solves my problem with this beautiful module
XS::Object::Magic. So I will start moving my ugly XS to Magic Land.
SDL Perl TutorialsThis past week I have been working on the sorry state of SDL Perl tutorials. Currently I am working on a
Tetris Clone. I am hoping to have it done by next Thrusday for TPM meeting. This tutorial is a mix of several tutorials I
found online. Another
Lunar Lander tutorial has been submitted by Nelson Ferraz.
If anyone has any really good tutorials for game development (regardless of language) or even request of tutorials. Send it my way I will look into them.
New SDL Perl siteAlso we have begin work on a new site. It is still needs work.
New Site.
--yapgh
\ No newline at end of file
+Silent but active,
Small but deadly.
Updates
Ok so my blog posts have gone down a bit due to me using my fingers for coding. We have started to get some updates to SDL docs so that good. Also some of the tutorials are shaping up. This is what I have been hacking this past week.
You can grab the code. Note you will have to install deps yourself. Read the README file. It is not a tutorial yet, because it was hacked together in ~50 hours. But it playable now. During building this I found out that MacOSX (and Snow Leopard) has died again.
Hackfest
So with dngor's help this sunday (27/09/09) we will have a hackfest to fix MacOSX support. Anyone with a MacOSX and wants to help is welcome on #sdl irc.perl.org. We will also try to fix up a lot of docs and the tutorial for a early next week release. Also if we can we will migrate to the new site.
\ No newline at end of file
diff --git a/pages/blog-0012.html-inc b/pages/blog-0012.html-inc
index c9a5692..8d5d729 100644
--- a/pages/blog-0012.html-inc
+++ b/pages/blog-0012.html-inc
@@ -1,6 +1,6 @@
-Design of SDL::Rect
+Thanks nothingmuch, and updates
-
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
+struggle,
live,
die
After a struggling with XS and opaque C structs in the experimental SDL::Rect for a long time.
Nothingmuch comes along and solves my problem with this beautiful module
XS::Object::Magic. So I will start moving my ugly XS to Magic Land.
SDL Perl TutorialsThis past week I have been working on the sorry state of SDL Perl tutorials. Currently I am working on a
Tetris Clone. I am hoping to have it done by next Thrusday for TPM meeting. This tutorial is a mix of several tutorials I
found online. Another
Lunar Lander tutorial has been submitted by Nelson Ferraz.
If anyone has any really good tutorials for game development (regardless of language) or even request of tutorials. Send it my way I will look into them.
New SDL Perl siteAlso we have begin work on a new site. It is still needs work.
New Site.
--yapgh
\ No newline at end of file
diff --git a/pages/blog-0013.html-inc b/pages/blog-0013.html-inc
index f2da0d7..c9a5692 100644
--- a/pages/blog-0013.html-inc
+++ b/pages/blog-0013.html-inc
@@ -1,6 +1,6 @@
-Updates and Design Decisions
+Design of SDL::Rect
-
Storm clouds loom,
Thunder cracks,
Lightning blinds,
Farmers rejoice.
Some quick updates:After someone bugged me to update the Ohloh site for
SDL perl, I finally got around to doing it.
Some good news:v2.2.2.11 seems to be doing a good job considering it has been started to be picked up
Debian, Mandriva and other packager maintainers. The
stats are currently at
[PASS(11) FAIL(6) NA(1) UNKNOWN(35)].
Some OK news:As you can see we have some fails occurring in the smoke tests. This is occurring due to the
test on Mixer.pm. Mixer.pm depends on a
sound card being available to the user running the test. This can be fixed by adjusting the test to check for sound cards before it runs but I am at a lost on how to do that.
In regards to the unknowns occurring it is due to the *nixes and macs not having SDL libs installed. The will be fixed when Alien::SDL downloads and compiles sources.
Some not-so-great news:Currently the XS code simplification work requires redesign and there are several different ways of redesigning. This may break backwards compatibility, hopefully we can work around this. Soon we will present the two arguments for the designs in the
mailing list.
Until next time here is a hint of something coming soon (credits go to garu):
--yapgh
\ 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
diff --git a/pages/blog-0014.html-inc b/pages/blog-0014.html-inc
index 4f9d34c..f2da0d7 100644
--- a/pages/blog-0014.html-inc
+++ b/pages/blog-0014.html-inc
@@ -1,6 +1,6 @@
-Why I will be sticking to CPAN
+Updates and Design Decisions
-
sculpted in clay,
then fired to glass.
Recently there was really long
discussion on sdl-devel@perl.org about providing packages for SDL perl rather than focusing on CPAN releases. The gists of the argument was that SDL perl should be making platform specific packages for end users. I agree with this idea but I do have to face the truth.
The truth is there are very few developers currently working on SDL Perl. The truth is CPAN provides several tools that which currently drives development for SDL Perl. There are people interested in packaging SDL Perl (
kmx,
jean and Jerome Quelin). The truth is there are other very
critical areas we can focus on.
If there are people looking to package SDL Perl for their platform please contact us at sdl-devel@perl.org.
\ No newline at end of file
+
Storm clouds loom,
Thunder cracks,
Lightning blinds,
Farmers rejoice.
Some quick updates:
After someone bugged me to update the Ohloh site for SDL perl, I finally got around to doing it.
Some good news:
v2.2.2.11 seems to be doing a good job considering it has been started to be picked up Debian, Mandriva and other packager maintainers. The stats are currently at [PASS(11) FAIL(6) NA(1) UNKNOWN(35)].
Some OK news:
As you can see we have some fails occurring in the smoke tests. This is occurring due to the test on Mixer.pm. Mixer.pm depends on a sound card being available to the user running the test. This can be fixed by adjusting the test to check for sound cards before it runs but I am at a lost on how to do that.
In regards to the unknowns occurring it is due to the *nixes and macs not having SDL libs installed. The will be fixed when Alien::SDL downloads and compiles sources.
Some not-so-great news:
Currently the XS code simplification work requires redesign and there are several different ways of redesigning. This may break backwards compatibility, hopefully we can work around this. Soon we will present the two arguments for the designs in the mailing list.
Until next time here is a hint of something coming soon (credits go to garu):
--yapgh
\ No newline at end of file
diff --git a/pages/blog-0015.html-inc b/pages/blog-0015.html-inc
index 61e4d70..4f9d34c 100644
--- a/pages/blog-0015.html-inc
+++ b/pages/blog-0015.html-inc
@@ -1,6 +1,6 @@
-Frozen Bubble coming to CPAN
+Why I will be sticking to CPAN
-
The frozen wind,
made me shiver,
with excitement.
There has been some interest in making Frozen Bubble cross platform so I have forked Frozen Bubble v2.0 to my github
repo. Any contributors are welcome! I will eventually be removing hacks that were needed to make Frozen Bubble work with the old SDL perl. The plan is to make Frozen Bubble cross platform by removing platform specific hacks and dependencies. One of the major switch will be from BSD sockets to SDL_net through SDL perl or XS. The main goal would be to be able to do
cpan install FrozenBubble
To do this the Makefile.PL will need to be rewritten a little bit. Moreover we will need to make test using code from Frozen Bubble so that it can be smoke tested on CPAN. If contributors need more information please contact me.
\ No newline at end of file
+sculpted in clay,
then fired to glass.
Recently there was really long discussion on sdl-devel@perl.org about providing packages for SDL perl rather than focusing on CPAN releases. The gists of the argument was that SDL perl should be making platform specific packages for end users. I agree with this idea but I do have to face the truth.
The truth is there are very few developers currently working on SDL Perl. The truth is CPAN provides several tools that which currently drives development for SDL Perl. There are people interested in packaging SDL Perl (kmx, jean and Jerome Quelin). The truth is there are other very critical areas we can focus on.
If there are people looking to package SDL Perl for their platform please contact us at sdl-devel@perl.org.
\ No newline at end of file
diff --git a/pages/blog-0016.html-inc b/pages/blog-0016.html-inc
index a8a1632..61e4d70 100644
--- a/pages/blog-0016.html-inc
+++ b/pages/blog-0016.html-inc
@@ -1,6 +1,6 @@
-Newbie Friendly Perl Projects
+Frozen Bubble coming to CPAN
-
A seed needs soft soil and water to grow
This is a reply to
szabgab's post on how to get newbies interested in Perl modules. Being a newbie in Perl myself I thought I should take a shot.
I was thinking you can make projects more accessible to newbies by having a step by step plan included with where they need to look. For example for docs of SDL_perl:
- Look at SDL docs [link]
- See where SDL_perl is using the same functions [link] and the docs to this file [link]
- Use the pod format to add it to the source [link to using pod]
- {BONUS} Come up with tutorial or cookbook [link to example]
- Submit code to github [link] or email them to me [link]
Basically assume nothing is known. I know this may seem demeaning but I am a newbie to Perl and sometimes I hate looking for crust (docs). I call it crust because a crust is useful for me to eat a pizza slice, but it has no flavor .
--yapgh
\ No newline at end of file
+The frozen wind,
made me shiver,
with excitement.
There has been some interest in making Frozen Bubble cross platform so I have forked Frozen Bubble v2.0 to my github
repo. Any contributors are welcome! I will eventually be removing hacks that were needed to make Frozen Bubble work with the old SDL perl. The plan is to make Frozen Bubble cross platform by removing platform specific hacks and dependencies. One of the major switch will be from BSD sockets to SDL_net through SDL perl or XS. The main goal would be to be able to do
cpan install FrozenBubble
To do this the Makefile.PL will need to be rewritten a little bit. Moreover we will need to make test using code from Frozen Bubble so that it can be smoke tested on CPAN. If contributors need more information please contact me.
\ No newline at end of file
diff --git a/pages/blog-0017.html-inc b/pages/blog-0017.html-inc
index 464b658..a8a1632 100644
--- a/pages/blog-0017.html-inc
+++ b/pages/blog-0017.html-inc
@@ -1,6 +1,6 @@
-Can someone please point me to good XS documentation!
+Newbie Friendly Perl Projects
-
A poor man begs,
A troubled man prays,
who shall answer? This is the first time perldoc has disappointed me. The example on perlxs is wrong and fails. I do not wish to flame writers of perlxs but please check that your examples work! Ironically I know that broken tutorials is a problem with SDL perl too.
If anyone can point me to the simplest working exaple of XS with a c struct, it would be greatly appreciated.
\ No newline at end of file
+A seed needs soft soil and water to grow
This is a reply to szabgab's post on how to get newbies interested in Perl modules. Being a newbie in Perl myself I thought I should take a shot.
I was thinking you can make projects more accessible to newbies by having a step by step plan included with where they need to look. For example for docs of SDL_perl:
- Look at SDL docs [link]
- See where SDL_perl is using the same functions [link] and the docs to this file [link]
- Use the pod format to add it to the source [link to using pod]
- {BONUS} Come up with tutorial or cookbook [link to example]
- Submit code to github [link] or email them to me [link]
Basically assume nothing is known. I know this may seem demeaning but I am a newbie to Perl and sometimes I hate looking for crust (docs). I call it crust because a crust is useful for me to eat a pizza slice, but it has no flavor .
--yapgh
\ No newline at end of file
diff --git a/pages/blog-0018.html-inc b/pages/blog-0018.html-inc
index 4ca8719..464b658 100644
--- a/pages/blog-0018.html-inc
+++ b/pages/blog-0018.html-inc
@@ -1,6 +1,6 @@
-More Games + Update
+Can someone please point me to good XS documentation!
-
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).
--yapghThese 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
+A poor man begs,
A troubled man prays,
who shall answer?
This is the first time perldoc has disappointed me. The example on perlxs is wrong and fails. I do not wish to flame writers of perlxs but please check that your examples work! Ironically I know that broken tutorials is a problem with SDL perl too.
If anyone can point me to the simplest working exaple of XS with a c struct, it would be greatly appreciated.
\ No newline at end of file
diff --git a/pages/blog-0019.html-inc b/pages/blog-0019.html-inc
index 65ae515..4ca8719 100644
--- a/pages/blog-0019.html-inc
+++ b/pages/blog-0019.html-inc
@@ -1,6 +1,6 @@
-Updates on Plan for v2.4
+More Games + Update
-
A fierce storm came,
With a crash,
Old oaks went lame.
After some hunting for memory leaks, it became obvious that some rewrite of XS will be necessary. Since this will be a big undertaking I asked for some help from chromatic and garu. We came up with the following plan for v2.4.
Currently all XS is mapped to the SDL_perl module. This does not reflect the modular nature of the sdl libs. So the plan is to gradually move SDL structs and their respective functions to their correct namespaces. We will start with SDL::Rect as garu has added many tests for it. This way the build system will be a lot easier to hack since Module::Build was made for one XS per module. Moreover we will move the Build utilities to Alien::SDL, making it even simpler. The main idea is to adhere to single responsibility principle and encapsulation.
Obviously this will take some time and effort, but it will pay off in the long run. Any help will be greatly appreciated.
--yapgh
\ No newline at end of file
+
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
diff --git a/pages/blog-0020.html-inc b/pages/blog-0020.html-inc
index 93751a1..65ae515 100644
--- a/pages/blog-0020.html-inc
+++ b/pages/blog-0020.html-inc
@@ -1,6 +1,6 @@
-Code is not the only thing
+Updates on Plan for v2.4
-
I did,
no one cared,
I spoke,
no one heard,
I wrote,
someone read.
After only several weeks of maintaining SDL perl, Today I have come to noticed how important it is to update README's, docs and so on. I will redouble my effort to do this.
However I am not sure where to start updating docs. Has anyone re-documented old modules before? Any advice? If anyone is interested in helping me to sort out documentation please contact me on sdl-devel@perl.org. For people wanting to learn the SDL base there is no better way.
\ No newline at end of file
+A fierce storm came,
With a crash,
Old oaks went lame.
After some hunting for memory leaks, it became obvious that some rewrite of XS will be necessary. Since this will be a big undertaking I asked for some help from chromatic and garu. We came up with the following plan for v2.4.
Currently all XS is mapped to the SDL_perl module. This does not reflect the modular nature of the sdl libs. So the plan is to gradually move SDL structs and their respective functions to their correct namespaces. We will start with SDL::Rect as garu has added many tests for it. This way the build system will be a lot easier to hack since Module::Build was made for one XS per module. Moreover we will move the Build utilities to Alien::SDL, making it even simpler. The main idea is to adhere to single responsibility principle and encapsulation.
Obviously this will take some time and effort, but it will pay off in the long run. Any help will be greatly appreciated.
--yapgh
\ No newline at end of file
diff --git a/pages/blog-0021.html-inc b/pages/blog-0021.html-inc
index 0347ee9..93751a1 100644
--- a/pages/blog-0021.html-inc
+++ b/pages/blog-0021.html-inc
@@ -1,6 +1,6 @@
-SDL Perl v2.2.2 out and Plans for v2.4
+Code is not the only thing
-
The early bird may get the worm,
and the second mouse may get the cheese,
but I want neither the worm nor the cheese,
'cause I am not a mouse or a bird.
I have release v2.2.2 which includes several bug fixes:
- Made App loop() faster RT
- Patched support for add support for gluquadric* sub RT
- Made App init slimer RT
- Added faster SDL::Color alternative RT
- Added better error reporting for TTFont errors
- Added experimental win32 support RT [Update: v2.2.2.5 is better for windows support]
You can grab this release off
CPAN.
This is still a stopover to the major release v2.4. Which will hope fully solve the memory leaks problems.
--yapgh
\ No newline at end of file
+
I did,
no one cared,
I spoke,
no one heard,
I wrote,
someone read.
After only several weeks of maintaining SDL perl, Today I have come to noticed how important it is to update README's, docs and so on. I will redouble my effort to do this.
However I am not sure where to start updating docs. Has anyone re-documented old modules before? Any advice? If anyone is interested in helping me to sort out documentation please contact me on sdl-devel@perl.org. For people wanting to learn the SDL base there is no better way.
\ No newline at end of file
diff --git a/pages/blog-0022.html-inc b/pages/blog-0022.html-inc
index 07f9357..0347ee9 100644
--- a/pages/blog-0022.html-inc
+++ b/pages/blog-0022.html-inc
@@ -1,6 +1,6 @@
-Catching memory leaks in XS
+SDL Perl v2.2.2 out and Plans for v2.4
-
I slay dragons, yonder
So I am trying to find and plug memory leaks in SDL perl. Most of the
memory leaks occur because in XS a reference is still held. One very expensive mem leak was caught by TELS really early on
here. The problem occurs where in XS there is
RETVAL = (cast *) safemalloc( ... );
and safefree(...) is never called.
Here is a in
code example lines 1082 on.
My question is how I can mitigate these memory leaks? One idea I had was to store all malloc'd pointers to an array that is safefree'd on DESTROY or hooked into perl GC somehow .
Any guidance is helpful.
--yapgh
\ No newline at end of file
+The early bird may get the worm,
and the second mouse may get the cheese,
but I want neither the worm nor the cheese,
'cause I am not a mouse or a bird.
I have release v2.2.2 which includes several bug fixes:
- Made App loop() faster RT
- Patched support for add support for gluquadric* sub RT
- Made App init slimer RT
- Added faster SDL::Color alternative RT
- Added better error reporting for TTFont errors
- Added experimental win32 support RT [Update: v2.2.2.5 is better for windows support]
You can grab this release off CPAN.
This is still a stopover to the major release v2.4. Which will hope fully solve the memory leaks problems.
--yapgh
\ No newline at end of file
diff --git a/pages/blog-0023.html-inc b/pages/blog-0023.html-inc
index 24852d4..07f9357 100644
--- a/pages/blog-0023.html-inc
+++ b/pages/blog-0023.html-inc
@@ -1,6 +1,6 @@
-Alien::SDL 0.01 released!!!
+Catching memory leaks in XS
-
I just codedon't know where it leadsor
how I will get thereI just code With yesterday's frantic coding to get windows compatibility setup we were left with a very crude way of installing. After some late night hacking I finally came up with Alias's
suggestion to have Alien::SDL. All thanks to Alias's generous access to his
windows farm, I was able to make a easier module to install SDL deps on windows. Future plans are in place to get sources and compile them for other platform.Hopefully a SDL perl release will be out soon to use Alien::SDL now.
The above script is in test/testsprite.pl.
Until then you can do:
in cpan
cpan> install File::Fetch
cpan> install Archive::Extract
cpan> install Alien::SDL
and in cmd
pip http://cloud.github.com/downloads/kthakore/SDL_perl/SDL_Perl-v2.2.2.tar.gz
Please post any feedback here.
Enjoy,
yapgh
\ No newline at end of file
+ I slay dragons, yonder
So I am trying to find and plug memory leaks in SDL perl. Most of the memory leaks occur because in XS a reference is still held. One very expensive mem leak was caught by TELS really early on here. The problem occurs where in XS there is
RETVAL = (cast *) safemalloc( ... );
and safefree(...) is never called.
Here is a in code example lines 1082 on.
My question is how I can mitigate these memory leaks? One idea I had was to store all malloc'd pointers to an array that is safefree'd on DESTROY or hooked into perl GC somehow .
Any guidance is helpful.
--yapgh
\ No newline at end of file
diff --git a/pages/blog-0024.html-inc b/pages/blog-0024.html-inc
index 2ab0c8f..24852d4 100644
--- a/pages/blog-0024.html-inc
+++ b/pages/blog-0024.html-inc
@@ -1,6 +1,6 @@
-SDL perl is coming to Strawberry!!
+Alien::SDL 0.01 released!!!
-
I am a part of all that I have met. --Alfred Tennyson
I hope I am not jumping the gun but it looks good. This is all thanks to kmx!!
Here is an obligatory pic since my last post on this matter. (That is one of the test script you can run for test/ in the distrobution).
You can follow the history
here.
It has been tested on winXP 32/64 bit strawberry so far. Here is how you can get it.
- Go here to get the code
- Click download, choose .tar.gz
- Save the resultant kthakore....tar.gz somewhere
- Get this and extract it on C:/strawberry/
- Last do pip kthakore......tar.gz (I find this so amazing!!)
- Play with C:/strawberry/cpan/build/SDL/test/*.pl
Enjoy
--yapgh
\ No newline at end of file
+I just codedon't know where it leadsor
how I will get thereI just code
With yesterday's frantic coding to get windows compatibility setup we were left with a very crude way of installing. After some late night hacking I finally came up with Alias's suggestion to have Alien::SDL. All thanks to Alias's generous access to his windows farm, I was able to make a easier module to install SDL deps on windows. Future plans are in place to get sources and compile them for other platform.Hopefully a SDL perl release will be out soon to use Alien::SDL now.
The above script is in test/testsprite.pl.
Until then you can do:
in cpan
cpan> install File::Fetch
cpan> install Archive::Extract
cpan> install Alien::SDL
and in cmd
pip http://cloud.github.com/downloads/kthakore/SDL_perl/SDL_Perl-v2.2.2.tar.gz
Please post any feedback here.
Enjoy,
yapgh
\ No newline at end of file
diff --git a/pages/blog-0025.html-inc b/pages/blog-0025.html-inc
index 9145c2c..2ab0c8f 100644
--- a/pages/blog-0025.html-inc
+++ b/pages/blog-0025.html-inc
@@ -1,6 +1,6 @@
-My milestones (itches) for gaming in Perl
+SDL perl is coming to Strawberry!!
-
As a young sprout in spring,
the soil is moist,
and the sun bright.
But as fall comes,
with fading leaves,
my roots keep me standing.
As a new Perl developer I am able to contribute with
great enthusiasm due to the
great community and the fancies of the language. However I know that these things will fade and I will need something else to take the place. Usually what has worked for me in the past was to set milestones. These will act as roots, keeping me interested in being involved. After all in words better than mines.
We all âscratch our own itchesâ. Itâs why I started Linux, itâs why I started git, and itâs why I am still involved. --Linus
So here are my evolving milestones for Gaming in Perl:
- Make Tetris,Pong, so on [soon-ish]
- Hack it until its Perly (shows the power Perl can provide for games)
- Do game-a-thon [Starting January 2010]
- Simply
- Get two random words (Warp + hole = portal)
- Make a small game
- Every week for 52 weeks
- Use the results from this to make some Perl specific tools [Parallel to game-a-thon]
--signed YAPGH
\ No newline at end of file
+I am a part of all that I have met. --Alfred Tennyson
I hope I am not jumping the gun but it looks good. This is all thanks to kmx!!
Here is an obligatory pic since my last post on this matter. (That is one of the test script you can run for test/ in the distrobution).
You can follow the history here.
It has been tested on winXP 32/64 bit strawberry so far. Here is how you can get it.
- Go here to get the code
- Click download, choose .tar.gz
- Save the resultant kthakore....tar.gz somewhere
- Get this and extract it on C:/strawberry/
- Last do pip kthakore......tar.gz (I find this so amazing!!)
- Play with C:/strawberry/cpan/build/SDL/test/*.pl
Enjoy
--yapgh
\ No newline at end of file
diff --git a/pages/documentation.html-inc b/pages/documentation.html-inc
index 819d05e..4d15dc7 100644
--- a/pages/documentation.html-inc
+++ b/pages/documentation.html-inc
@@ -1,2 +1,2 @@
-
Documentation (latest development branch)
Core |
| SDL | - Simple DirectMedia Layer for Perl |
CDROM |
| SDL::CDROM | - SDL Bindings for the CDROM device |
Structure |
| SDL::CD | - SDL Bindings for structure SDL_CD |
| SDL::CDTrack | - SDL Bindings for structure SDL_CDTrack |
Events |
| SDL::Events | - Bindings to the Events Category in SDL API |
Mouse |
| SDL::Mouse | - SDL Bindings for the Mouse device |
Structure |
| SDL::Version | - SDL Bindings for structure SDL_Version |
Video |
| SDL::Video | - Bindings to the video category in SDL API |
Mixer |
| SDL::Mixer | - a SDL perl extension |
TODO |
+Documentation (latest development branch)
Core |
| SDL | - Simple DirectMedia Layer for Perl |
CDROM |
| SDL::CDROM | - SDL Bindings for the CDROM device |
Structure |
| SDL::CD | - SDL Bindings for structure SDL_CD |
| SDL::CDTrack | - SDL Bindings for structure SDL_CDTrack |
Events |
| SDL::Events | - Bindings to the Events Category in SDL API |
Mouse |
| SDL::Mouse | - SDL Bindings for the Mouse device |
Structure |
| SDL::Version | - SDL Bindings for structure SDL_Version |
Video |
| SDL::Video | - Bindings to the video category in SDL API |
Mixer |
| SDL::Mixer | - a SDL perl extension |
TODO |
diff --git a/pages/tags-Alien.html-inc b/pages/tags-Alien.html-inc
index fcf33b7..a424a55 100644
--- a/pages/tags-Alien.html-inc
+++ b/pages/tags-Alien.html-inc
@@ -1 +1 @@
-Results for tag: Alien
Alien::SDL 0.01 released!!!Thursday, 27 August 2009Tags: [Alien] [Perl] [Releases] [SDL]With yesterday's frantic coding to get windows compatibility setup we were left with a very crude way of installing. After some late night hacking I finally came up with Alias's suggestion to have Alien::SDL. All thanks to Alias's generous access to his windows farm , I was able to make a easier module to install SDL deps on windows. Future plans are in place to get sources and compile them for other platform.Hopefully a SDL perl release will be out soon to use Alien::SDL now.
The above script is in test/testsprite.pl.
Until then you can do:
[more]
\ No newline at end of file
+Results for tag: Alien
Alien::SDL 0.01 released!!!Thursday, 27 August 2009Tags: [Alien] [Perl] [Releases] [SDL]With yesterday's frantic coding to get windows compatibility setup we were left with a very crude way of installing. After some late night hacking I finally came up with Alias's suggestion to have Alien::SDL. All thanks to Alias's generous access to his windows farm , I was able to make a easier module to install SDL deps on windows. Future plans are in place to get sources and compile them for other platform.Hopefully a SDL perl release will be out soon to use Alien::SDL now.
The above script is in test/testsprite.pl.
Until then you can do:
[more]
\ No newline at end of file
diff --git a/pages/tags-CPAN.html-inc b/pages/tags-CPAN.html-inc
index 1067e5b..fb35df6 100644
--- a/pages/tags-CPAN.html-inc
+++ b/pages/tags-CPAN.html-inc
@@ -1 +1 @@
-Results for tag: CPAN
Why I will be sticking to CPANSunday, 06 September 2009Tags: [CPAN] [Perl] [SDL]Recently there was really long discussion on sdl-devel@perl.org about providing packages for SDL perl rather than focusing on CPAN releases. The gists of the argument was that SDL perl should be making platform specific packages for end users. I agree with this idea but I do have to face the truth.
The truth is there are very few developers currently working on SDL Perl. The truth is CPAN provides several tools that which currently drives development for SDL Perl. There are people interested in packaging SDL Perl ( kmx , jean and Jerome Quelin). The truth is there are other very critical areas we can focus on.
If there are people looking to package SDL Perl for their platform please contact us at sdl-devel@perl.org.
[more]
Frozen Bubble coming to CPANFriday, 04 September 2009Tags: [CPAN] [Frozen Bubble] [Perl] [SDL] To do this the Makefile.PL will need to be rewritten a little bit. Moreover we will need to make test using code from Frozen Bubble so that it can be smoke tested on CPAN. If contributors need more information please contact me.
[more]
Newbie Friendly Perl ProjectsThursday, 03 September 2009Tags: [CPAN] [Perl] [SDL] [personal]This is a reply to szabgab's post on how to get newbies interested in Perl modules. Being a newbie in Perl myself I thought I should take a shot.
I was thinking you can make projects more accessible to newbies by having a step by step plan included with where they need to look. For example for docs of SDL_perl:
Look at SDL docs [ link ] See where SDL_perl is using the same functions [ link ] and the docs to this file [ link ] Use the pod format to add it to the source [ link to using pod ] {BONUS} Come up with tutorial or cookbook [ link to example ] Submit code to github [ link ] or email them to me [ link ]
[more]
\ No newline at end of file
+Results for tag: CPAN
Why I will be sticking to CPANSunday, 06 September 2009Tags: [CPAN] [Perl] [SDL]Recently there was really long discussion on sdl-devel@perl.org about providing packages for SDL perl rather than focusing on CPAN releases. The gists of the argument was that SDL perl should be making platform specific packages for end users. I agree with this idea but I do have to face the truth.
The truth is there are very few developers currently working on SDL Perl. The truth is CPAN provides several tools that which currently drives development for SDL Perl. There are people interested in packaging SDL Perl ( kmx , jean and Jerome Quelin). The truth is there are other very critical areas we can focus on.
If there are people looking to package SDL Perl for their platform please contact us at sdl-devel@perl.org.
[more]
Frozen Bubble coming to CPANFriday, 04 September 2009Tags: [CPAN] [Frozen Bubble] [Perl] [SDL] To do this the Makefile.PL will need to be rewritten a little bit. Moreover we will need to make test using code from Frozen Bubble so that it can be smoke tested on CPAN. If contributors need more information please contact me.
[more]
Newbie Friendly Perl ProjectsThursday, 03 September 2009Tags: [CPAN] [Perl] [SDL] [personal]This is a reply to szabgab's post on how to get newbies interested in Perl modules. Being a newbie in Perl myself I thought I should take a shot.
I was thinking you can make projects more accessible to newbies by having a step by step plan included with where they need to look. For example for docs of SDL_perl:
Look at SDL docs [ link ] See where SDL_perl is using the same functions [ link ] and the docs to this file [ link ] Use the pod format to add it to the source [ link to using pod ] {BONUS} Come up with tutorial or cookbook [ link to example ] Submit code to github [ link ] or email them to me [ link ]
[more]
\ No newline at end of file
diff --git a/pages/tags-Design.html-inc b/pages/tags-Design.html-inc
index 076c923..e9dd29b 100644
--- a/pages/tags-Design.html-inc
+++ b/pages/tags-Design.html-inc
@@ -1 +1 @@
-Results for tag: Design
The Future and Beyond!Saturday, 24 October 2009Tags: [Design] [SDL] [Updates] [games] Updates Since the last post SDL Perl has seen an increase of interest to both use and contribute to SDL Perl. Before I dig into the updates, I would like to acknowledge them.
Core Development Acme ( Leon Brocard ): Has started to work on the Redesign Effort with me. The help is much appreciated! Enjoy your vacation.
Website and Windows Testing FROGGS (Tobias Leich): Came in as a new user to SDL Perl. And after breaking the redesigned SDL Perl in as many ways possible he has decided to help out on the new site.
[more]
The beginnings of modular design for SDL PerlSunday, 11 October 2009Tags: [Design] [SDL] [Updates] 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.
[more]
Thanks nothingmuch, and updatesFriday, 18 September 2009Tags: [Design] [Perl] [SDL] [Tutorial] After a struggling with XS and opaque C structs in the experimental SDL::Rect for a long time. Nothingmuch comes along and solves my problem with this beautiful module XS::Object::Magic . So I will start moving my ugly XS to Magic Land.
SDL Perl Tutorials
This past week I have been working on the sorry state of SDL Perl tutorials. Currently I am working on a Tetris Clone . I am hoping to have it done by next Thrusday for TPM meeting. This tutorial is a mix of several tutorials I found online . Another Lunar Lander tutorial has been submitted by Nelson Ferraz.
[more]
Design of SDL::RectSaturday, 12 September 2009Tags: [Design] [Perl] [SDL]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.
[more]
\ No newline at end of file
+Results for tag: Design
The Future and Beyond!Saturday, 24 October 2009Tags: [Design] [SDL] [Updates] [games] Updates Since the last post SDL Perl has seen an increase of interest to both use and contribute to SDL Perl. Before I dig into the updates, I would like to acknowledge them.
Core Development Acme ( Leon Brocard ): Has started to work on the Redesign Effort with me. The help is much appreciated! Enjoy your vacation.
Website and Windows Testing FROGGS (Tobias Leich): Came in as a new user to SDL Perl. And after breaking the redesigned SDL Perl in as many ways possible he has decided to help out on the new site.
[more]
The beginnings of modular design for SDL PerlSunday, 11 October 2009Tags: [Design] [SDL] [Updates] 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.
[more]
Thanks nothingmuch, and updatesFriday, 18 September 2009Tags: [Design] [Perl] [SDL] [Tutorial] After a struggling with XS and opaque C structs in the experimental SDL::Rect for a long time. Nothingmuch comes along and solves my problem with this beautiful module XS::Object::Magic . So I will start moving my ugly XS to Magic Land.
SDL Perl Tutorials
This past week I have been working on the sorry state of SDL Perl tutorials. Currently I am working on a Tetris Clone . I am hoping to have it done by next Thrusday for TPM meeting. This tutorial is a mix of several tutorials I found online . Another Lunar Lander tutorial has been submitted by Nelson Ferraz.
[more]
Design of SDL::RectSaturday, 12 September 2009Tags: [Design] [Perl] [SDL]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.
[more]
\ No newline at end of file
diff --git a/pages/tags-Docs.html-inc b/pages/tags-Docs.html-inc
index f0d2d13..e1fe071 100644
--- a/pages/tags-Docs.html-inc
+++ b/pages/tags-Docs.html-inc
@@ -1 +1 @@
-Results for tag: Docs
Updates, Falling Block Game, and Hack FestWednesday, 23 September 2009Tags: [Docs] [Perl] [SDL]You can grab the code . Note you will have to install deps yourself. Read the README file. It is not a tutorial yet, because it was hacked together in ~50 hours. But it playable now. During building this I found out that MacOSX (and Snow Leopard) has died again.
Hackfest So with dngor's help this sunday (27/09/09) we will have a hackfest to fix MacOSX support. Anyone with a MacOSX and wants to help is welcome on #sdl irc.perl.org . We will also try to fix up a lot of docs and the tutorial for a early next week release. Also if we can we will migrate to the new site.
[more]
\ No newline at end of file
+Results for tag: Docs
SDL Perl Documentation: Reviewers needThursday, 26 November 2009Tags: [Docs] [Perl] [SDL] Documentation In an effort to learn from past versions of SDL Perl and improve. We have been writing lots of documentation for our users. Of course since this is the first time we have been providing documentation we need your help. Please review our docs, at sdl.perl.org and give us some feed back. Send us the feeback at sdl-devel@mail.org or join us at #sdl irc.perl.org
--yapgh
[more]
Updates, Falling Block Game, and Hack FestWednesday, 23 September 2009Tags: [Docs] [Perl] [SDL]You can grab the code . Note you will have to install deps yourself. Read the README file. It is not a tutorial yet, because it was hacked together in ~50 hours. But it playable now. During building this I found out that MacOSX (and Snow Leopard) has died again.
Hackfest So with dngor's help this sunday (27/09/09) we will have a hackfest to fix MacOSX support. Anyone with a MacOSX and wants to help is welcome on #sdl irc.perl.org . We will also try to fix up a lot of docs and the tutorial for a early next week release. Also if we can we will migrate to the new site.
[more]
\ No newline at end of file
diff --git a/pages/tags-Example.html-inc b/pages/tags-Example.html-inc
index da69811..2ed35bd 100644
--- a/pages/tags-Example.html-inc
+++ b/pages/tags-Example.html-inc
@@ -1 +1 @@
-Results for tag: Example
Migrating Sol's Tutorial of SDL to SDL_PerlSunday, 15 November 2009Tags: [Example] [Perl] [SDL] Sol's Tutorials
When I was struggling with SDL C a while ago, someone recommended Sol's Tutorial to me. It had not only help me understand video in SDL, but I believe my code has improved using Sol's code style. I would like to pass these along to fellow SDL_Perl users too. So here is the Ch 02 code of Sol's Tutorial in SDL_Perl. It will be getting more and more Perly as our team hacks on it. There is more to come!
[more]
\ No newline at end of file
+Results for tag: Example
Migrating Sol's Tutorial of SDL to SDL_PerlSunday, 15 November 2009Tags: [Example] [Perl] [SDL] Sol's Tutorials
When I was struggling with SDL C a while ago, someone recommended Sol's Tutorial to me. It had not only help me understand video in SDL, but I believe my code has improved using Sol's code style. I would like to pass these along to fellow SDL_Perl users too. So here is the Ch 02 code of Sol's Tutorial in SDL_Perl. It will be getting more and more Perly as our team hacks on it. There is more to come!
[more]
\ No newline at end of file
diff --git a/pages/tags-Frozen-Bubble.html-inc b/pages/tags-Frozen-Bubble.html-inc
index 3e8cf0d..8ed0ae1 100644
--- a/pages/tags-Frozen-Bubble.html-inc
+++ b/pages/tags-Frozen-Bubble.html-inc
@@ -1 +1 @@
-Results for tag: Frozen Bubble
Frozen Bubble coming to CPANFriday, 04 September 2009Tags: [CPAN] [Frozen Bubble] [Perl] [SDL] To do this the Makefile.PL will need to be rewritten a little bit. Moreover we will need to make test using code from Frozen Bubble so that it can be smoke tested on CPAN. If contributors need more information please contact me.
[more]
\ No newline at end of file
+Results for tag: Frozen Bubble
Frozen Bubble coming to CPANFriday, 04 September 2009Tags: [CPAN] [Frozen Bubble] [Perl] [SDL] To do this the Makefile.PL will need to be rewritten a little bit. Moreover we will need to make test using code from Frozen Bubble so that it can be smoke tested on CPAN. If contributors need more information please contact me.
[more]
\ No newline at end of file
diff --git a/pages/tags-HackFest.html-inc b/pages/tags-HackFest.html-inc
index 0faebe5..31d7c34 100644
--- a/pages/tags-HackFest.html-inc
+++ b/pages/tags-HackFest.html-inc
@@ -1 +1 @@
-Results for tag: HackFest
HackFest: ResultsMonday, 28 September 2009Tags: [HackFest] [Perl] [SDL] MacOSX build is working again. It's still rough but Tetris works on it now. dngor++ SDL::Tutorial::Tetris is on CPAN as v0.15. nferraz++ SDL Perl docs are a little better now. magnet++ Finally experimental Rect and Game::Rect are behaving. There is still more work needed in Game::Rect. Moreover there are more tests on the experimental release. garu++ Also POGL is working experimentally with SDL.
Hopefully I can get the first three results into the next release soon. The next release 2.2.3 will go up as a developmental release first. Also the experimental branch is going up as version 2_4.
Developers All developers please tell me what to put you guys want to be put down as on the
[more]
\ No newline at end of file
+Results for tag: HackFest
HackFest: ResultsMonday, 28 September 2009Tags: [HackFest] [Perl] [SDL] MacOSX build is working again. It's still rough but Tetris works on it now. dngor++ SDL::Tutorial::Tetris is on CPAN as v0.15. nferraz++ SDL Perl docs are a little better now. magnet++ Finally experimental Rect and Game::Rect are behaving. There is still more work needed in Game::Rect. Moreover there are more tests on the experimental release. garu++ Also POGL is working experimentally with SDL.
Hopefully I can get the first three results into the next release soon. The next release 2.2.3 will go up as a developmental release first. Also the experimental branch is going up as version 2_4.
Developers All developers please tell me what to put you guys want to be put down as on the
[more]
\ No newline at end of file
diff --git a/pages/tags-Perl.html-inc b/pages/tags-Perl.html-inc
index 2db04ee..d2b0210 100644
--- a/pages/tags-Perl.html-inc
+++ b/pages/tags-Perl.html-inc
@@ -1 +1 @@
-Results for tag: Perl
Migrating Sol's Tutorial of SDL to SDL_PerlSunday, 15 November 2009Tags: [Example] [Perl] [SDL] Sol's Tutorials
When I was struggling with SDL C a while ago, someone recommended Sol's Tutorial to me. It had not only help me understand video in SDL, but I believe my code has improved using Sol's code style. I would like to pass these along to fellow SDL_Perl users too. So here is the Ch 02 code of Sol's Tutorial in SDL_Perl. It will be getting more and more Perly as our team hacks on it. There is more to come!
[more]
Development UpdateMonday, 09 November 2009Tags: [Perl] [SDL] [Updates]Had an exam on the weekend so I am a bit late. Here is the progress so far.
SDL::Video at 97% SDL::Events at 25% ~1000 tests cases passing on Windows and Linux
[more]
Development UpdateMonday, 02 November 2009Tags: [Perl] [SDL] [Updates]In the past week the SDL Perl team has been busy! This is what we have accomplished
Commitment to Testing! In an effort to focus on continuing our focus on testing we have setup a Smolder site for the SDL redesign process. Currently we have two platforms (linux, windows32) regularly tested on here. If there are more people following the redesign process and would like to share their test results; contact us at sdl-devel@perl.org and we will provide access to you.
SDL::Video For the core development most of the focus has been on redesigning around the Video category of the SDL perl API. As of now we are 50% done . 19 functions out of 38 functions have been implemented and tested.
[more]
HackFest: ResultsMonday, 28 September 2009Tags: [HackFest] [Perl] [SDL] MacOSX build is working again. It's still rough but Tetris works on it now. dngor++ SDL::Tutorial::Tetris is on CPAN as v0.15. nferraz++ SDL Perl docs are a little better now. magnet++ Finally experimental Rect and Game::Rect are behaving. There is still more work needed in Game::Rect. Moreover there are more tests on the experimental release. garu++ Also POGL is working experimentally with SDL.
Hopefully I can get the first three results into the next release soon. The next release 2.2.3 will go up as a developmental release first. Also the experimental branch is going up as version 2_4.
Developers All developers please tell me what to put you guys want to be put down as on the
[more]
Updates, Falling Block Game, and Hack FestWednesday, 23 September 2009Tags: [Docs] [Perl] [SDL]You can grab the code . Note you will have to install deps yourself. Read the README file. It is not a tutorial yet, because it was hacked together in ~50 hours. But it playable now. During building this I found out that MacOSX (and Snow Leopard) has died again.
Hackfest So with dngor's help this sunday (27/09/09) we will have a hackfest to fix MacOSX support. Anyone with a MacOSX and wants to help is welcome on #sdl irc.perl.org . We will also try to fix up a lot of docs and the tutorial for a early next week release. Also if we can we will migrate to the new site.
[more]
Thanks nothingmuch, and updatesFriday, 18 September 2009Tags: [Design] [Perl] [SDL] [Tutorial] After a struggling with XS and opaque C structs in the experimental SDL::Rect for a long time. Nothingmuch comes along and solves my problem with this beautiful module XS::Object::Magic . So I will start moving my ugly XS to Magic Land.
SDL Perl Tutorials
This past week I have been working on the sorry state of SDL Perl tutorials. Currently I am working on a Tetris Clone . I am hoping to have it done by next Thrusday for TPM meeting. This tutorial is a mix of several tutorials I found online . Another Lunar Lander tutorial has been submitted by Nelson Ferraz.
[more]
Design of SDL::RectSaturday, 12 September 2009Tags: [Design] [Perl] [SDL]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.
[more]
Why I will be sticking to CPANSunday, 06 September 2009Tags: [CPAN] [Perl] [SDL]Recently there was really long discussion on sdl-devel@perl.org about providing packages for SDL perl rather than focusing on CPAN releases. The gists of the argument was that SDL perl should be making platform specific packages for end users. I agree with this idea but I do have to face the truth.
The truth is there are very few developers currently working on SDL Perl. The truth is CPAN provides several tools that which currently drives development for SDL Perl. There are people interested in packaging SDL Perl ( kmx , jean and Jerome Quelin). The truth is there are other very critical areas we can focus on.
If there are people looking to package SDL Perl for their platform please contact us at sdl-devel@perl.org.
[more]
Frozen Bubble coming to CPANFriday, 04 September 2009Tags: [CPAN] [Frozen Bubble] [Perl] [SDL] To do this the Makefile.PL will need to be rewritten a little bit. Moreover we will need to make test using code from Frozen Bubble so that it can be smoke tested on CPAN. If contributors need more information please contact me.
[more]
Newbie Friendly Perl ProjectsThursday, 03 September 2009Tags: [CPAN] [Perl] [SDL] [personal]This is a reply to szabgab's post on how to get newbies interested in Perl modules. Being a newbie in Perl myself I thought I should take a shot.
I was thinking you can make projects more accessible to newbies by having a step by step plan included with where they need to look. For example for docs of SDL_perl:
Look at SDL docs [ link ] See where SDL_perl is using the same functions [ link ] and the docs to this file [ link ] Use the pod format to add it to the source [ link to using pod ] {BONUS} Come up with tutorial or cookbook [ link to example ] Submit code to github [ link ] or email them to me [ link ]
[more]
More Games + UpdateTuesday, 01 September 2009Tags: [Perl] [SDL] [games]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:
[more]
Updates on Plan for v2.4Monday, 31 August 2009Tags: [Perl] [SDL] [Updates] After some hunting for memory leaks, it became obvious that some rewrite of XS will be necessary. Since this will be a big undertaking I asked for some help from chromatic and garu . We came up with the following plan for v2.4.
Currently all XS is mapped to the SDL_perl module. This does not reflect the modular nature of the sdl libs. So the plan is to gradually move SDL structs and their respective functions to their correct namespaces. We will start with SDL::Rect as garu has added many tests for it. This way the build system will be a lot easier to hack since Module::Build was made for one XS per module. Moreover we will move the Build utilities to Alien::SDL, making it even simpler. The main idea is to adhere to single responsibility principle and encapsulation.
Obviously this will take some time and effort, but it will pay off in the long run. Any help will be greatly appreciated.
[more]
Code is not the only thingSunday, 30 August 2009Tags: [Perl] [Questions] [SDL] After only several weeks of maintaining SDL perl, Today I have come to noticed how important it is to update README's, docs and so on. I will redouble my effort to do this .
However I am not sure where to start updating docs. Has anyone re-documented old modules before? Any advice? If anyone is interested in helping me to sort out documentation please contact me on sdl-devel@perl.org. For people wanting to learn the SDL base there is no better way.
[more]
SDL Perl v2.2.2 out and Plans for v2.4Saturday, 29 August 2009Tags: [Perl] [SDL] I have release v2.2.2 which includes several bug fixes:
Made App loop() faster RT Patched support for add support for gluquadric* sub RT Made App init slimer RT Added faster SDL::Color alternative RT Added better error reporting for TTFont errors Added experimental win32 support RT [Update: v2.2.2.5 is better for windows support]
You can grab this release off CPAN .
[more]
Catching memory leaks in XSFriday, 28 August 2009Tags: [Perl] [SDL]So I am trying to find and plug memory leaks in SDL perl. Most of the memory leaks occur because in XS a reference is still held. One very expensive mem leak was caught by TELS really early on here . The problem occurs where in XS there is
RETVAL = (cast *) safemalloc( ... ); and safefree(...) is never called.
Here is a in code example lines 1082 on.
[more]
Alien::SDL 0.01 released!!!Thursday, 27 August 2009Tags: [Alien] [Perl] [Releases] [SDL]With yesterday's frantic coding to get windows compatibility setup we were left with a very crude way of installing. After some late night hacking I finally came up with Alias's suggestion to have Alien::SDL. All thanks to Alias's generous access to his windows farm , I was able to make a easier module to install SDL deps on windows. Future plans are in place to get sources and compile them for other platform.Hopefully a SDL perl release will be out soon to use Alien::SDL now.
The above script is in test/testsprite.pl.
Until then you can do:
[more]
SDL perl is coming to Strawberry!!Wednesday, 26 August 2009Tags: [Perl] [Releases] [SDL]You can follow the history here .
It has been tested on winXP 32/64 bit strawberry so far. Here is how you can get it.
Go here to get the code Click download, choose .tar.gz Save the resultant kthakore....tar.gz somewhere Get this and extract it on C:/strawberry/ Last do pip kthakore......tar.gz (I find this so amazing!!) Play with C:/strawberry/cpan/build/SDL/test/*.pl or post a bug report
[more]
My milestones (itches) for gaming in PerlTuesday, 25 August 2009Tags: [Perl] [SDL] [personal]As a new Perl developer I am able to contribute with great enthusiasm due to the great community and the fancies of the language. However I know that these things will fade and I will need something else to take the place. Usually what has worked for me in the past was to set milestones. These will act as roots, keeping me interested in being involved. After all in words better than mines.
We all âscratch our own itchesâ. Itâs why I started Linux, itâs why I started git, and itâs why I am still involved. -- Linus
[more]
\ No newline at end of file
+Results for tag: Perl
SDL Perl Documentation: Reviewers needThursday, 26 November 2009Tags: [Docs] [Perl] [SDL] Documentation In an effort to learn from past versions of SDL Perl and improve. We have been writing lots of documentation for our users. Of course since this is the first time we have been providing documentation we need your help. Please review our docs, at sdl.perl.org and give us some feed back. Send us the feeback at sdl-devel@mail.org or join us at #sdl irc.perl.org
--yapgh
[more]
Migrating Sol's Tutorial of SDL to SDL_PerlSunday, 15 November 2009Tags: [Example] [Perl] [SDL] Sol's Tutorials
When I was struggling with SDL C a while ago, someone recommended Sol's Tutorial to me. It had not only help me understand video in SDL, but I believe my code has improved using Sol's code style. I would like to pass these along to fellow SDL_Perl users too. So here is the Ch 02 code of Sol's Tutorial in SDL_Perl. It will be getting more and more Perly as our team hacks on it. There is more to come!
[more]
Development UpdateMonday, 09 November 2009Tags: [Perl] [SDL] [Updates]Had an exam on the weekend so I am a bit late. Here is the progress so far.
SDL::Video at 97% SDL::Events at 25% ~1000 tests cases passing on Windows and Linux
[more]
Development UpdateMonday, 02 November 2009Tags: [Perl] [SDL] [Updates]In the past week the SDL Perl team has been busy! This is what we have accomplished
Commitment to Testing! In an effort to focus on continuing our focus on testing we have setup a Smolder site for the SDL redesign process. Currently we have two platforms (linux, windows32) regularly tested on here. If there are more people following the redesign process and would like to share their test results; contact us at sdl-devel@perl.org and we will provide access to you.
SDL::Video For the core development most of the focus has been on redesigning around the Video category of the SDL perl API. As of now we are 50% done . 19 functions out of 38 functions have been implemented and tested.
[more]
HackFest: ResultsMonday, 28 September 2009Tags: [HackFest] [Perl] [SDL] MacOSX build is working again. It's still rough but Tetris works on it now. dngor++ SDL::Tutorial::Tetris is on CPAN as v0.15. nferraz++ SDL Perl docs are a little better now. magnet++ Finally experimental Rect and Game::Rect are behaving. There is still more work needed in Game::Rect. Moreover there are more tests on the experimental release. garu++ Also POGL is working experimentally with SDL.
Hopefully I can get the first three results into the next release soon. The next release 2.2.3 will go up as a developmental release first. Also the experimental branch is going up as version 2_4.
Developers All developers please tell me what to put you guys want to be put down as on the
[more]
Updates, Falling Block Game, and Hack FestWednesday, 23 September 2009Tags: [Docs] [Perl] [SDL]You can grab the code . Note you will have to install deps yourself. Read the README file. It is not a tutorial yet, because it was hacked together in ~50 hours. But it playable now. During building this I found out that MacOSX (and Snow Leopard) has died again.
Hackfest So with dngor's help this sunday (27/09/09) we will have a hackfest to fix MacOSX support. Anyone with a MacOSX and wants to help is welcome on #sdl irc.perl.org . We will also try to fix up a lot of docs and the tutorial for a early next week release. Also if we can we will migrate to the new site.
[more]
Thanks nothingmuch, and updatesFriday, 18 September 2009Tags: [Design] [Perl] [SDL] [Tutorial] After a struggling with XS and opaque C structs in the experimental SDL::Rect for a long time. Nothingmuch comes along and solves my problem with this beautiful module XS::Object::Magic . So I will start moving my ugly XS to Magic Land.
SDL Perl Tutorials
This past week I have been working on the sorry state of SDL Perl tutorials. Currently I am working on a Tetris Clone . I am hoping to have it done by next Thrusday for TPM meeting. This tutorial is a mix of several tutorials I found online . Another Lunar Lander tutorial has been submitted by Nelson Ferraz.
[more]
Design of SDL::RectSaturday, 12 September 2009Tags: [Design] [Perl] [SDL]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.
[more]
Why I will be sticking to CPANSunday, 06 September 2009Tags: [CPAN] [Perl] [SDL]Recently there was really long discussion on sdl-devel@perl.org about providing packages for SDL perl rather than focusing on CPAN releases. The gists of the argument was that SDL perl should be making platform specific packages for end users. I agree with this idea but I do have to face the truth.
The truth is there are very few developers currently working on SDL Perl. The truth is CPAN provides several tools that which currently drives development for SDL Perl. There are people interested in packaging SDL Perl ( kmx , jean and Jerome Quelin). The truth is there are other very critical areas we can focus on.
If there are people looking to package SDL Perl for their platform please contact us at sdl-devel@perl.org.
[more]
Frozen Bubble coming to CPANFriday, 04 September 2009Tags: [CPAN] [Frozen Bubble] [Perl] [SDL] To do this the Makefile.PL will need to be rewritten a little bit. Moreover we will need to make test using code from Frozen Bubble so that it can be smoke tested on CPAN. If contributors need more information please contact me.
[more]
Newbie Friendly Perl ProjectsThursday, 03 September 2009Tags: [CPAN] [Perl] [SDL] [personal]This is a reply to szabgab's post on how to get newbies interested in Perl modules. Being a newbie in Perl myself I thought I should take a shot.
I was thinking you can make projects more accessible to newbies by having a step by step plan included with where they need to look. For example for docs of SDL_perl:
Look at SDL docs [ link ] See where SDL_perl is using the same functions [ link ] and the docs to this file [ link ] Use the pod format to add it to the source [ link to using pod ] {BONUS} Come up with tutorial or cookbook [ link to example ] Submit code to github [ link ] or email them to me [ link ]
[more]
More Games + UpdateTuesday, 01 September 2009Tags: [Perl] [SDL] [games]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:
[more]
Updates on Plan for v2.4Monday, 31 August 2009Tags: [Perl] [SDL] [Updates] After some hunting for memory leaks, it became obvious that some rewrite of XS will be necessary. Since this will be a big undertaking I asked for some help from chromatic and garu . We came up with the following plan for v2.4.
Currently all XS is mapped to the SDL_perl module. This does not reflect the modular nature of the sdl libs. So the plan is to gradually move SDL structs and their respective functions to their correct namespaces. We will start with SDL::Rect as garu has added many tests for it. This way the build system will be a lot easier to hack since Module::Build was made for one XS per module. Moreover we will move the Build utilities to Alien::SDL, making it even simpler. The main idea is to adhere to single responsibility principle and encapsulation.
Obviously this will take some time and effort, but it will pay off in the long run. Any help will be greatly appreciated.
[more]
Code is not the only thingSunday, 30 August 2009Tags: [Perl] [Questions] [SDL] After only several weeks of maintaining SDL perl, Today I have come to noticed how important it is to update README's, docs and so on. I will redouble my effort to do this .
However I am not sure where to start updating docs. Has anyone re-documented old modules before? Any advice? If anyone is interested in helping me to sort out documentation please contact me on sdl-devel@perl.org. For people wanting to learn the SDL base there is no better way.
[more]
SDL Perl v2.2.2 out and Plans for v2.4Saturday, 29 August 2009Tags: [Perl] [SDL] I have release v2.2.2 which includes several bug fixes:
Made App loop() faster RT Patched support for add support for gluquadric* sub RT Made App init slimer RT Added faster SDL::Color alternative RT Added better error reporting for TTFont errors Added experimental win32 support RT [Update: v2.2.2.5 is better for windows support]
You can grab this release off CPAN .
[more]
Catching memory leaks in XSFriday, 28 August 2009Tags: [Perl] [SDL]So I am trying to find and plug memory leaks in SDL perl. Most of the memory leaks occur because in XS a reference is still held. One very expensive mem leak was caught by TELS really early on here . The problem occurs where in XS there is
RETVAL = (cast *) safemalloc( ... ); and safefree(...) is never called.
Here is a in code example lines 1082 on.
[more]
Alien::SDL 0.01 released!!!Thursday, 27 August 2009Tags: [Alien] [Perl] [Releases] [SDL]With yesterday's frantic coding to get windows compatibility setup we were left with a very crude way of installing. After some late night hacking I finally came up with Alias's suggestion to have Alien::SDL. All thanks to Alias's generous access to his windows farm , I was able to make a easier module to install SDL deps on windows. Future plans are in place to get sources and compile them for other platform.Hopefully a SDL perl release will be out soon to use Alien::SDL now.
The above script is in test/testsprite.pl.
Until then you can do:
[more]
SDL perl is coming to Strawberry!!Wednesday, 26 August 2009Tags: [Perl] [Releases] [SDL]You can follow the history here .
It has been tested on winXP 32/64 bit strawberry so far. Here is how you can get it.
Go here to get the code Click download, choose .tar.gz Save the resultant kthakore....tar.gz somewhere Get this and extract it on C:/strawberry/ Last do pip kthakore......tar.gz (I find this so amazing!!) Play with C:/strawberry/cpan/build/SDL/test/*.pl or post a bug report
[more]
\ No newline at end of file
diff --git a/pages/tags-Questions.html-inc b/pages/tags-Questions.html-inc
index 0d33ac8..6992c22 100644
--- a/pages/tags-Questions.html-inc
+++ b/pages/tags-Questions.html-inc
@@ -1 +1 @@
-Results for tag: Questions
Code is not the only thingSunday, 30 August 2009Tags: [Perl] [Questions] [SDL] After only several weeks of maintaining SDL perl, Today I have come to noticed how important it is to update README's, docs and so on. I will redouble my effort to do this .
However I am not sure where to start updating docs. Has anyone re-documented old modules before? Any advice? If anyone is interested in helping me to sort out documentation please contact me on sdl-devel@perl.org. For people wanting to learn the SDL base there is no better way.
[more]
\ No newline at end of file
+Results for tag: Questions
Code is not the only thingSunday, 30 August 2009Tags: [Perl] [Questions] [SDL] After only several weeks of maintaining SDL perl, Today I have come to noticed how important it is to update README's, docs and so on. I will redouble my effort to do this .
However I am not sure where to start updating docs. Has anyone re-documented old modules before? Any advice? If anyone is interested in helping me to sort out documentation please contact me on sdl-devel@perl.org. For people wanting to learn the SDL base there is no better way.
[more]
\ No newline at end of file
diff --git a/pages/tags-Releases.html-inc b/pages/tags-Releases.html-inc
index f8d0319..a97426a 100644
--- a/pages/tags-Releases.html-inc
+++ b/pages/tags-Releases.html-inc
@@ -1 +1 @@
-Results for tag: Releases
Alien::SDL 0.01 released!!!Thursday, 27 August 2009Tags: [Alien] [Perl] [Releases] [SDL]With yesterday's frantic coding to get windows compatibility setup we were left with a very crude way of installing. After some late night hacking I finally came up with Alias's suggestion to have Alien::SDL. All thanks to Alias's generous access to his windows farm , I was able to make a easier module to install SDL deps on windows. Future plans are in place to get sources and compile them for other platform.Hopefully a SDL perl release will be out soon to use Alien::SDL now.
The above script is in test/testsprite.pl.
Until then you can do:
[more]
SDL perl is coming to Strawberry!!Wednesday, 26 August 2009Tags: [Perl] [Releases] [SDL]You can follow the history here .
It has been tested on winXP 32/64 bit strawberry so far. Here is how you can get it.
Go here to get the code Click download, choose .tar.gz Save the resultant kthakore....tar.gz somewhere Get this and extract it on C:/strawberry/ Last do pip kthakore......tar.gz (I find this so amazing!!) Play with C:/strawberry/cpan/build/SDL/test/*.pl or post a bug report
[more]
\ No newline at end of file
+Results for tag: Releases
Alien::SDL 0.01 released!!!Thursday, 27 August 2009Tags: [Alien] [Perl] [Releases] [SDL]With yesterday's frantic coding to get windows compatibility setup we were left with a very crude way of installing. After some late night hacking I finally came up with Alias's suggestion to have Alien::SDL. All thanks to Alias's generous access to his windows farm , I was able to make a easier module to install SDL deps on windows. Future plans are in place to get sources and compile them for other platform.Hopefully a SDL perl release will be out soon to use Alien::SDL now.
The above script is in test/testsprite.pl.
Until then you can do:
[more]
SDL perl is coming to Strawberry!!Wednesday, 26 August 2009Tags: [Perl] [Releases] [SDL]You can follow the history here .
It has been tested on winXP 32/64 bit strawberry so far. Here is how you can get it.
Go here to get the code Click download, choose .tar.gz Save the resultant kthakore....tar.gz somewhere Get this and extract it on C:/strawberry/ Last do pip kthakore......tar.gz (I find this so amazing!!) Play with C:/strawberry/cpan/build/SDL/test/*.pl or post a bug report
[more]
\ No newline at end of file
diff --git a/pages/tags-SDL.html-inc b/pages/tags-SDL.html-inc
index 8e44a16..55b618e 100644
--- a/pages/tags-SDL.html-inc
+++ b/pages/tags-SDL.html-inc
@@ -1 +1 @@
-Results for tag: SDL
Migrating Sol's Tutorial of SDL to SDL_PerlSunday, 15 November 2009Tags: [Example] [Perl] [SDL] Sol's Tutorials
When I was struggling with SDL C a while ago, someone recommended Sol's Tutorial to me. It had not only help me understand video in SDL, but I believe my code has improved using Sol's code style. I would like to pass these along to fellow SDL_Perl users too. So here is the Ch 02 code of Sol's Tutorial in SDL_Perl. It will be getting more and more Perly as our team hacks on it. There is more to come!
[more]
Development UpdateMonday, 09 November 2009Tags: [Perl] [SDL] [Updates]Had an exam on the weekend so I am a bit late. Here is the progress so far.
SDL::Video at 97% SDL::Events at 25% ~1000 tests cases passing on Windows and Linux
[more]
Development UpdateMonday, 02 November 2009Tags: [Perl] [SDL] [Updates]In the past week the SDL Perl team has been busy! This is what we have accomplished
Commitment to Testing! In an effort to focus on continuing our focus on testing we have setup a Smolder site for the SDL redesign process. Currently we have two platforms (linux, windows32) regularly tested on here. If there are more people following the redesign process and would like to share their test results; contact us at sdl-devel@perl.org and we will provide access to you.
SDL::Video For the core development most of the focus has been on redesigning around the Video category of the SDL perl API. As of now we are 50% done . 19 functions out of 38 functions have been implemented and tested.
[more]
The Future and Beyond!Saturday, 24 October 2009Tags: [Design] [SDL] [Updates] [games] Updates Since the last post SDL Perl has seen an increase of interest to both use and contribute to SDL Perl. Before I dig into the updates, I would like to acknowledge them.
Core Development Acme ( Leon Brocard ): Has started to work on the Redesign Effort with me. The help is much appreciated! Enjoy your vacation.
Website and Windows Testing FROGGS (Tobias Leich): Came in as a new user to SDL Perl. And after breaking the redesigned SDL Perl in as many ways possible he has decided to help out on the new site.
[more]
The beginnings of modular design for SDL PerlSunday, 11 October 2009Tags: [Design] [SDL] [Updates] 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.
[more]
HackFest: ResultsMonday, 28 September 2009Tags: [HackFest] [Perl] [SDL] MacOSX build is working again. It's still rough but Tetris works on it now. dngor++ SDL::Tutorial::Tetris is on CPAN as v0.15. nferraz++ SDL Perl docs are a little better now. magnet++ Finally experimental Rect and Game::Rect are behaving. There is still more work needed in Game::Rect. Moreover there are more tests on the experimental release. garu++ Also POGL is working experimentally with SDL.
Hopefully I can get the first three results into the next release soon. The next release 2.2.3 will go up as a developmental release first. Also the experimental branch is going up as version 2_4.
Developers All developers please tell me what to put you guys want to be put down as on the
[more]
Updates, Falling Block Game, and Hack FestWednesday, 23 September 2009Tags: [Docs] [Perl] [SDL]You can grab the code . Note you will have to install deps yourself. Read the README file. It is not a tutorial yet, because it was hacked together in ~50 hours. But it playable now. During building this I found out that MacOSX (and Snow Leopard) has died again.
Hackfest So with dngor's help this sunday (27/09/09) we will have a hackfest to fix MacOSX support. Anyone with a MacOSX and wants to help is welcome on #sdl irc.perl.org . We will also try to fix up a lot of docs and the tutorial for a early next week release. Also if we can we will migrate to the new site.
[more]
Thanks nothingmuch, and updatesFriday, 18 September 2009Tags: [Design] [Perl] [SDL] [Tutorial] After a struggling with XS and opaque C structs in the experimental SDL::Rect for a long time. Nothingmuch comes along and solves my problem with this beautiful module XS::Object::Magic . So I will start moving my ugly XS to Magic Land.
SDL Perl Tutorials
This past week I have been working on the sorry state of SDL Perl tutorials. Currently I am working on a Tetris Clone . I am hoping to have it done by next Thrusday for TPM meeting. This tutorial is a mix of several tutorials I found online . Another Lunar Lander tutorial has been submitted by Nelson Ferraz.
[more]
Design of SDL::RectSaturday, 12 September 2009Tags: [Design] [Perl] [SDL]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.
[more]
Why I will be sticking to CPANSunday, 06 September 2009Tags: [CPAN] [Perl] [SDL]Recently there was really long discussion on sdl-devel@perl.org about providing packages for SDL perl rather than focusing on CPAN releases. The gists of the argument was that SDL perl should be making platform specific packages for end users. I agree with this idea but I do have to face the truth.
The truth is there are very few developers currently working on SDL Perl. The truth is CPAN provides several tools that which currently drives development for SDL Perl. There are people interested in packaging SDL Perl ( kmx , jean and Jerome Quelin). The truth is there are other very critical areas we can focus on.
If there are people looking to package SDL Perl for their platform please contact us at sdl-devel@perl.org.
[more]
Frozen Bubble coming to CPANFriday, 04 September 2009Tags: [CPAN] [Frozen Bubble] [Perl] [SDL] To do this the Makefile.PL will need to be rewritten a little bit. Moreover we will need to make test using code from Frozen Bubble so that it can be smoke tested on CPAN. If contributors need more information please contact me.
[more]
Newbie Friendly Perl ProjectsThursday, 03 September 2009Tags: [CPAN] [Perl] [SDL] [personal]This is a reply to szabgab's post on how to get newbies interested in Perl modules. Being a newbie in Perl myself I thought I should take a shot.
I was thinking you can make projects more accessible to newbies by having a step by step plan included with where they need to look. For example for docs of SDL_perl:
Look at SDL docs [ link ] See where SDL_perl is using the same functions [ link ] and the docs to this file [ link ] Use the pod format to add it to the source [ link to using pod ] {BONUS} Come up with tutorial or cookbook [ link to example ] Submit code to github [ link ] or email them to me [ link ]
[more]
More Games + UpdateTuesday, 01 September 2009Tags: [Perl] [SDL] [games]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:
[more]
Updates on Plan for v2.4Monday, 31 August 2009Tags: [Perl] [SDL] [Updates] After some hunting for memory leaks, it became obvious that some rewrite of XS will be necessary. Since this will be a big undertaking I asked for some help from chromatic and garu . We came up with the following plan for v2.4.
Currently all XS is mapped to the SDL_perl module. This does not reflect the modular nature of the sdl libs. So the plan is to gradually move SDL structs and their respective functions to their correct namespaces. We will start with SDL::Rect as garu has added many tests for it. This way the build system will be a lot easier to hack since Module::Build was made for one XS per module. Moreover we will move the Build utilities to Alien::SDL, making it even simpler. The main idea is to adhere to single responsibility principle and encapsulation.
Obviously this will take some time and effort, but it will pay off in the long run. Any help will be greatly appreciated.
[more]
Code is not the only thingSunday, 30 August 2009Tags: [Perl] [Questions] [SDL] After only several weeks of maintaining SDL perl, Today I have come to noticed how important it is to update README's, docs and so on. I will redouble my effort to do this .
However I am not sure where to start updating docs. Has anyone re-documented old modules before? Any advice? If anyone is interested in helping me to sort out documentation please contact me on sdl-devel@perl.org. For people wanting to learn the SDL base there is no better way.
[more]
SDL Perl v2.2.2 out and Plans for v2.4Saturday, 29 August 2009Tags: [Perl] [SDL] I have release v2.2.2 which includes several bug fixes:
Made App loop() faster RT Patched support for add support for gluquadric* sub RT Made App init slimer RT Added faster SDL::Color alternative RT Added better error reporting for TTFont errors Added experimental win32 support RT [Update: v2.2.2.5 is better for windows support]
You can grab this release off CPAN .
[more]
Catching memory leaks in XSFriday, 28 August 2009Tags: [Perl] [SDL]So I am trying to find and plug memory leaks in SDL perl. Most of the memory leaks occur because in XS a reference is still held. One very expensive mem leak was caught by TELS really early on here . The problem occurs where in XS there is
RETVAL = (cast *) safemalloc( ... ); and safefree(...) is never called.
Here is a in code example lines 1082 on.
[more]
Alien::SDL 0.01 released!!!Thursday, 27 August 2009Tags: [Alien] [Perl] [Releases] [SDL]With yesterday's frantic coding to get windows compatibility setup we were left with a very crude way of installing. After some late night hacking I finally came up with Alias's suggestion to have Alien::SDL. All thanks to Alias's generous access to his windows farm , I was able to make a easier module to install SDL deps on windows. Future plans are in place to get sources and compile them for other platform.Hopefully a SDL perl release will be out soon to use Alien::SDL now.
The above script is in test/testsprite.pl.
Until then you can do:
[more]
SDL perl is coming to Strawberry!!Wednesday, 26 August 2009Tags: [Perl] [Releases] [SDL]You can follow the history here .
It has been tested on winXP 32/64 bit strawberry so far. Here is how you can get it.
Go here to get the code Click download, choose .tar.gz Save the resultant kthakore....tar.gz somewhere Get this and extract it on C:/strawberry/ Last do pip kthakore......tar.gz (I find this so amazing!!) Play with C:/strawberry/cpan/build/SDL/test/*.pl or post a bug report
[more]
My milestones (itches) for gaming in PerlTuesday, 25 August 2009Tags: [Perl] [SDL] [personal]As a new Perl developer I am able to contribute with great enthusiasm due to the great community and the fancies of the language. However I know that these things will fade and I will need something else to take the place. Usually what has worked for me in the past was to set milestones. These will act as roots, keeping me interested in being involved. After all in words better than mines.
We all âscratch our own itchesâ. Itâs why I started Linux, itâs why I started git, and itâs why I am still involved. -- Linus
[more]
\ No newline at end of file
+Results for tag: SDL
SDL Perl Documentation: Reviewers needThursday, 26 November 2009Tags: [Docs] [Perl] [SDL] Documentation In an effort to learn from past versions of SDL Perl and improve. We have been writing lots of documentation for our users. Of course since this is the first time we have been providing documentation we need your help. Please review our docs, at sdl.perl.org and give us some feed back. Send us the feeback at sdl-devel@mail.org or join us at #sdl irc.perl.org
--yapgh
[more]
Migrating Sol's Tutorial of SDL to SDL_PerlSunday, 15 November 2009Tags: [Example] [Perl] [SDL] Sol's Tutorials
When I was struggling with SDL C a while ago, someone recommended Sol's Tutorial to me. It had not only help me understand video in SDL, but I believe my code has improved using Sol's code style. I would like to pass these along to fellow SDL_Perl users too. So here is the Ch 02 code of Sol's Tutorial in SDL_Perl. It will be getting more and more Perly as our team hacks on it. There is more to come!
[more]
Development UpdateMonday, 09 November 2009Tags: [Perl] [SDL] [Updates]Had an exam on the weekend so I am a bit late. Here is the progress so far.
SDL::Video at 97% SDL::Events at 25% ~1000 tests cases passing on Windows and Linux
[more]
Development UpdateMonday, 02 November 2009Tags: [Perl] [SDL] [Updates]In the past week the SDL Perl team has been busy! This is what we have accomplished
Commitment to Testing! In an effort to focus on continuing our focus on testing we have setup a Smolder site for the SDL redesign process. Currently we have two platforms (linux, windows32) regularly tested on here. If there are more people following the redesign process and would like to share their test results; contact us at sdl-devel@perl.org and we will provide access to you.
SDL::Video For the core development most of the focus has been on redesigning around the Video category of the SDL perl API. As of now we are 50% done . 19 functions out of 38 functions have been implemented and tested.
[more]
The Future and Beyond!Saturday, 24 October 2009Tags: [Design] [SDL] [Updates] [games] Updates Since the last post SDL Perl has seen an increase of interest to both use and contribute to SDL Perl. Before I dig into the updates, I would like to acknowledge them.
Core Development Acme ( Leon Brocard ): Has started to work on the Redesign Effort with me. The help is much appreciated! Enjoy your vacation.
Website and Windows Testing FROGGS (Tobias Leich): Came in as a new user to SDL Perl. And after breaking the redesigned SDL Perl in as many ways possible he has decided to help out on the new site.
[more]
The beginnings of modular design for SDL PerlSunday, 11 October 2009Tags: [Design] [SDL] [Updates] 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.
[more]
HackFest: ResultsMonday, 28 September 2009Tags: [HackFest] [Perl] [SDL] MacOSX build is working again. It's still rough but Tetris works on it now. dngor++ SDL::Tutorial::Tetris is on CPAN as v0.15. nferraz++ SDL Perl docs are a little better now. magnet++ Finally experimental Rect and Game::Rect are behaving. There is still more work needed in Game::Rect. Moreover there are more tests on the experimental release. garu++ Also POGL is working experimentally with SDL.
Hopefully I can get the first three results into the next release soon. The next release 2.2.3 will go up as a developmental release first. Also the experimental branch is going up as version 2_4.
Developers All developers please tell me what to put you guys want to be put down as on the
[more]
Updates, Falling Block Game, and Hack FestWednesday, 23 September 2009Tags: [Docs] [Perl] [SDL]You can grab the code . Note you will have to install deps yourself. Read the README file. It is not a tutorial yet, because it was hacked together in ~50 hours. But it playable now. During building this I found out that MacOSX (and Snow Leopard) has died again.
Hackfest So with dngor's help this sunday (27/09/09) we will have a hackfest to fix MacOSX support. Anyone with a MacOSX and wants to help is welcome on #sdl irc.perl.org . We will also try to fix up a lot of docs and the tutorial for a early next week release. Also if we can we will migrate to the new site.
[more]
Thanks nothingmuch, and updatesFriday, 18 September 2009Tags: [Design] [Perl] [SDL] [Tutorial] After a struggling with XS and opaque C structs in the experimental SDL::Rect for a long time. Nothingmuch comes along and solves my problem with this beautiful module XS::Object::Magic . So I will start moving my ugly XS to Magic Land.
SDL Perl Tutorials
This past week I have been working on the sorry state of SDL Perl tutorials. Currently I am working on a Tetris Clone . I am hoping to have it done by next Thrusday for TPM meeting. This tutorial is a mix of several tutorials I found online . Another Lunar Lander tutorial has been submitted by Nelson Ferraz.
[more]
Design of SDL::RectSaturday, 12 September 2009Tags: [Design] [Perl] [SDL]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.
[more]
Why I will be sticking to CPANSunday, 06 September 2009Tags: [CPAN] [Perl] [SDL]Recently there was really long discussion on sdl-devel@perl.org about providing packages for SDL perl rather than focusing on CPAN releases. The gists of the argument was that SDL perl should be making platform specific packages for end users. I agree with this idea but I do have to face the truth.
The truth is there are very few developers currently working on SDL Perl. The truth is CPAN provides several tools that which currently drives development for SDL Perl. There are people interested in packaging SDL Perl ( kmx , jean and Jerome Quelin). The truth is there are other very critical areas we can focus on.
If there are people looking to package SDL Perl for their platform please contact us at sdl-devel@perl.org.
[more]
Frozen Bubble coming to CPANFriday, 04 September 2009Tags: [CPAN] [Frozen Bubble] [Perl] [SDL] To do this the Makefile.PL will need to be rewritten a little bit. Moreover we will need to make test using code from Frozen Bubble so that it can be smoke tested on CPAN. If contributors need more information please contact me.
[more]
Newbie Friendly Perl ProjectsThursday, 03 September 2009Tags: [CPAN] [Perl] [SDL] [personal]This is a reply to szabgab's post on how to get newbies interested in Perl modules. Being a newbie in Perl myself I thought I should take a shot.
I was thinking you can make projects more accessible to newbies by having a step by step plan included with where they need to look. For example for docs of SDL_perl:
Look at SDL docs [ link ] See where SDL_perl is using the same functions [ link ] and the docs to this file [ link ] Use the pod format to add it to the source [ link to using pod ] {BONUS} Come up with tutorial or cookbook [ link to example ] Submit code to github [ link ] or email them to me [ link ]
[more]
More Games + UpdateTuesday, 01 September 2009Tags: [Perl] [SDL] [games]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:
[more]
Updates on Plan for v2.4Monday, 31 August 2009Tags: [Perl] [SDL] [Updates] After some hunting for memory leaks, it became obvious that some rewrite of XS will be necessary. Since this will be a big undertaking I asked for some help from chromatic and garu . We came up with the following plan for v2.4.
Currently all XS is mapped to the SDL_perl module. This does not reflect the modular nature of the sdl libs. So the plan is to gradually move SDL structs and their respective functions to their correct namespaces. We will start with SDL::Rect as garu has added many tests for it. This way the build system will be a lot easier to hack since Module::Build was made for one XS per module. Moreover we will move the Build utilities to Alien::SDL, making it even simpler. The main idea is to adhere to single responsibility principle and encapsulation.
Obviously this will take some time and effort, but it will pay off in the long run. Any help will be greatly appreciated.
[more]
Code is not the only thingSunday, 30 August 2009Tags: [Perl] [Questions] [SDL] After only several weeks of maintaining SDL perl, Today I have come to noticed how important it is to update README's, docs and so on. I will redouble my effort to do this .
However I am not sure where to start updating docs. Has anyone re-documented old modules before? Any advice? If anyone is interested in helping me to sort out documentation please contact me on sdl-devel@perl.org. For people wanting to learn the SDL base there is no better way.
[more]
SDL Perl v2.2.2 out and Plans for v2.4Saturday, 29 August 2009Tags: [Perl] [SDL] I have release v2.2.2 which includes several bug fixes:
Made App loop() faster RT Patched support for add support for gluquadric* sub RT Made App init slimer RT Added faster SDL::Color alternative RT Added better error reporting for TTFont errors Added experimental win32 support RT [Update: v2.2.2.5 is better for windows support]
You can grab this release off CPAN .
[more]
Catching memory leaks in XSFriday, 28 August 2009Tags: [Perl] [SDL]So I am trying to find and plug memory leaks in SDL perl. Most of the memory leaks occur because in XS a reference is still held. One very expensive mem leak was caught by TELS really early on here . The problem occurs where in XS there is
RETVAL = (cast *) safemalloc( ... ); and safefree(...) is never called.
Here is a in code example lines 1082 on.
[more]
Alien::SDL 0.01 released!!!Thursday, 27 August 2009Tags: [Alien] [Perl] [Releases] [SDL]With yesterday's frantic coding to get windows compatibility setup we were left with a very crude way of installing. After some late night hacking I finally came up with Alias's suggestion to have Alien::SDL. All thanks to Alias's generous access to his windows farm , I was able to make a easier module to install SDL deps on windows. Future plans are in place to get sources and compile them for other platform.Hopefully a SDL perl release will be out soon to use Alien::SDL now.
The above script is in test/testsprite.pl.
Until then you can do:
[more]
SDL perl is coming to Strawberry!!Wednesday, 26 August 2009Tags: [Perl] [Releases] [SDL]You can follow the history here .
It has been tested on winXP 32/64 bit strawberry so far. Here is how you can get it.
Go here to get the code Click download, choose .tar.gz Save the resultant kthakore....tar.gz somewhere Get this and extract it on C:/strawberry/ Last do pip kthakore......tar.gz (I find this so amazing!!) Play with C:/strawberry/cpan/build/SDL/test/*.pl or post a bug report
[more]
\ No newline at end of file
diff --git a/pages/tags-Sneak-Preview.html-inc b/pages/tags-Sneak-Preview.html-inc
index cda25f3..c238db5 100644
--- a/pages/tags-Sneak-Preview.html-inc
+++ b/pages/tags-Sneak-Preview.html-inc
@@ -1 +1 @@
-Results for tag: Sneak Preview
\ No newline at end of file
+Results for tag: Sneak Preview
\ No newline at end of file
diff --git a/pages/tags-Tutorial.html-inc b/pages/tags-Tutorial.html-inc
index 04981f2..0a9082f 100644
--- a/pages/tags-Tutorial.html-inc
+++ b/pages/tags-Tutorial.html-inc
@@ -1 +1 @@
-Results for tag: Tutorial
Thanks nothingmuch, and updatesFriday, 18 September 2009Tags: [Design] [Perl] [SDL] [Tutorial] After a struggling with XS and opaque C structs in the experimental SDL::Rect for a long time. Nothingmuch comes along and solves my problem with this beautiful module XS::Object::Magic . So I will start moving my ugly XS to Magic Land.
SDL Perl Tutorials
This past week I have been working on the sorry state of SDL Perl tutorials. Currently I am working on a Tetris Clone . I am hoping to have it done by next Thrusday for TPM meeting. This tutorial is a mix of several tutorials I found online . Another Lunar Lander tutorial has been submitted by Nelson Ferraz.
[more]
\ No newline at end of file
+Results for tag: Tutorial
Thanks nothingmuch, and updatesFriday, 18 September 2009Tags: [Design] [Perl] [SDL] [Tutorial] After a struggling with XS and opaque C structs in the experimental SDL::Rect for a long time. Nothingmuch comes along and solves my problem with this beautiful module XS::Object::Magic . So I will start moving my ugly XS to Magic Land.
SDL Perl Tutorials
This past week I have been working on the sorry state of SDL Perl tutorials. Currently I am working on a Tetris Clone . I am hoping to have it done by next Thrusday for TPM meeting. This tutorial is a mix of several tutorials I found online . Another Lunar Lander tutorial has been submitted by Nelson Ferraz.
[more]
\ No newline at end of file
diff --git a/pages/tags-Updates.html-inc b/pages/tags-Updates.html-inc
index 18fabd2..45bdf3a 100644
--- a/pages/tags-Updates.html-inc
+++ b/pages/tags-Updates.html-inc
@@ -1 +1 @@
-Results for tag: Updates
Development UpdateMonday, 09 November 2009Tags: [Perl] [SDL] [Updates]Had an exam on the weekend so I am a bit late. Here is the progress so far.
SDL::Video at 97% SDL::Events at 25% ~1000 tests cases passing on Windows and Linux
[more]
Development UpdateMonday, 02 November 2009Tags: [Perl] [SDL] [Updates]In the past week the SDL Perl team has been busy! This is what we have accomplished
Commitment to Testing! In an effort to focus on continuing our focus on testing we have setup a Smolder site for the SDL redesign process. Currently we have two platforms (linux, windows32) regularly tested on here. If there are more people following the redesign process and would like to share their test results; contact us at sdl-devel@perl.org and we will provide access to you.
SDL::Video For the core development most of the focus has been on redesigning around the Video category of the SDL perl API. As of now we are 50% done . 19 functions out of 38 functions have been implemented and tested.
[more]
The Future and Beyond!Saturday, 24 October 2009Tags: [Design] [SDL] [Updates] [games] Updates Since the last post SDL Perl has seen an increase of interest to both use and contribute to SDL Perl. Before I dig into the updates, I would like to acknowledge them.
Core Development Acme ( Leon Brocard ): Has started to work on the Redesign Effort with me. The help is much appreciated! Enjoy your vacation.
Website and Windows Testing FROGGS (Tobias Leich): Came in as a new user to SDL Perl. And after breaking the redesigned SDL Perl in as many ways possible he has decided to help out on the new site.
[more]
The beginnings of modular design for SDL PerlSunday, 11 October 2009Tags: [Design] [SDL] [Updates] 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.
[more]
Updates on Plan for v2.4Monday, 31 August 2009Tags: [Perl] [SDL] [Updates] After some hunting for memory leaks, it became obvious that some rewrite of XS will be necessary. Since this will be a big undertaking I asked for some help from chromatic and garu . We came up with the following plan for v2.4.
Currently all XS is mapped to the SDL_perl module. This does not reflect the modular nature of the sdl libs. So the plan is to gradually move SDL structs and their respective functions to their correct namespaces. We will start with SDL::Rect as garu has added many tests for it. This way the build system will be a lot easier to hack since Module::Build was made for one XS per module. Moreover we will move the Build utilities to Alien::SDL, making it even simpler. The main idea is to adhere to single responsibility principle and encapsulation.
Obviously this will take some time and effort, but it will pay off in the long run. Any help will be greatly appreciated.
[more]
\ No newline at end of file
+Results for tag: Updates
Development UpdateMonday, 09 November 2009Tags: [Perl] [SDL] [Updates]Had an exam on the weekend so I am a bit late. Here is the progress so far.
SDL::Video at 97% SDL::Events at 25% ~1000 tests cases passing on Windows and Linux
[more]
Development UpdateMonday, 02 November 2009Tags: [Perl] [SDL] [Updates]In the past week the SDL Perl team has been busy! This is what we have accomplished
Commitment to Testing! In an effort to focus on continuing our focus on testing we have setup a Smolder site for the SDL redesign process. Currently we have two platforms (linux, windows32) regularly tested on here. If there are more people following the redesign process and would like to share their test results; contact us at sdl-devel@perl.org and we will provide access to you.
SDL::Video For the core development most of the focus has been on redesigning around the Video category of the SDL perl API. As of now we are 50% done . 19 functions out of 38 functions have been implemented and tested.
[more]
The Future and Beyond!Saturday, 24 October 2009Tags: [Design] [SDL] [Updates] [games] Updates Since the last post SDL Perl has seen an increase of interest to both use and contribute to SDL Perl. Before I dig into the updates, I would like to acknowledge them.
Core Development Acme ( Leon Brocard ): Has started to work on the Redesign Effort with me. The help is much appreciated! Enjoy your vacation.
Website and Windows Testing FROGGS (Tobias Leich): Came in as a new user to SDL Perl. And after breaking the redesigned SDL Perl in as many ways possible he has decided to help out on the new site.
[more]
The beginnings of modular design for SDL PerlSunday, 11 October 2009Tags: [Design] [SDL] [Updates] 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.
[more]
Updates on Plan for v2.4Monday, 31 August 2009Tags: [Perl] [SDL] [Updates] After some hunting for memory leaks, it became obvious that some rewrite of XS will be necessary. Since this will be a big undertaking I asked for some help from chromatic and garu . We came up with the following plan for v2.4.
Currently all XS is mapped to the SDL_perl module. This does not reflect the modular nature of the sdl libs. So the plan is to gradually move SDL structs and their respective functions to their correct namespaces. We will start with SDL::Rect as garu has added many tests for it. This way the build system will be a lot easier to hack since Module::Build was made for one XS per module. Moreover we will move the Build utilities to Alien::SDL, making it even simpler. The main idea is to adhere to single responsibility principle and encapsulation.
Obviously this will take some time and effort, but it will pay off in the long run. Any help will be greatly appreciated.
[more]
\ No newline at end of file
diff --git a/pages/tags-XS.html-inc b/pages/tags-XS.html-inc
index f782f51..f53ff9b 100644
--- a/pages/tags-XS.html-inc
+++ b/pages/tags-XS.html-inc
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/pages/tags-games.html-inc b/pages/tags-games.html-inc
index 0391343..8ed2b42 100644
--- a/pages/tags-games.html-inc
+++ b/pages/tags-games.html-inc
@@ -1 +1 @@
-Results for tag: games
The Future and Beyond!Saturday, 24 October 2009Tags: [Design] [SDL] [Updates] [games] Updates Since the last post SDL Perl has seen an increase of interest to both use and contribute to SDL Perl. Before I dig into the updates, I would like to acknowledge them.
Core Development Acme ( Leon Brocard ): Has started to work on the Redesign Effort with me. The help is much appreciated! Enjoy your vacation.
Website and Windows Testing FROGGS (Tobias Leich): Came in as a new user to SDL Perl. And after breaking the redesigned SDL Perl in as many ways possible he has decided to help out on the new site.
[more]
More Games + UpdateTuesday, 01 September 2009Tags: [Perl] [SDL] [games]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:
[more]
\ No newline at end of file
+Results for tag: games
The Future and Beyond!Saturday, 24 October 2009Tags: [Design] [SDL] [Updates] [games] Updates Since the last post SDL Perl has seen an increase of interest to both use and contribute to SDL Perl. Before I dig into the updates, I would like to acknowledge them.
Core Development Acme ( Leon Brocard ): Has started to work on the Redesign Effort with me. The help is much appreciated! Enjoy your vacation.
Website and Windows Testing FROGGS (Tobias Leich): Came in as a new user to SDL Perl. And after breaking the redesigned SDL Perl in as many ways possible he has decided to help out on the new site.
[more]
More Games + UpdateTuesday, 01 September 2009Tags: [Perl] [SDL] [games]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:
[more]
\ No newline at end of file
diff --git a/pages/tags-index b/pages/tags-index
index 439630c..f50eb41 100644
--- a/pages/tags-index
+++ b/pages/tags-index
@@ -1,17 +1,17 @@
-Alien: blog-0023.html-inc
-CPAN: blog-0014.html-inc,blog-0015.html-inc,blog-0016.html-inc
-Design: blog-0006.html-inc,blog-0007.html-inc,blog-0011.html-inc,blog-0012.html-inc,blog-0013.html-inc
-Docs: blog-0010.html-inc
-Example: blog-0001.html-inc
-Frozen Bubble: blog-0008.html-inc,blog-0015.html-inc
-HackFest: blog-0009.html-inc
-Perl: blog-0001.html-inc,blog-0002.html-inc,blog-0003.html-inc,blog-0004.html-inc,blog-0005.html-inc,blog-0008.html-inc,blog-0009.html-inc,blog-0010.html-inc,blog-0011.html-inc,blog-0012.html-inc,blog-0013.html-inc,blog-0014.html-inc,blog-0015.html-inc,blog-0016.html-inc,blog-0017.html-inc,blog-0018.html-inc,blog-0019.html-inc,blog-0020.html-inc,blog-0021.html-inc,blog-0022.html-inc,blog-0023.html-inc,blog-0024.html-inc,blog-0025.html-inc
-Questions: blog-0020.html-inc
-Releases: blog-0023.html-inc,blog-0024.html-inc
-SDL: blog-0001.html-inc,blog-0002.html-inc,blog-0003.html-inc,blog-0004.html-inc,blog-0005.html-inc,blog-0006.html-inc,blog-0007.html-inc,blog-0008.html-inc,blog-0009.html-inc,blog-0010.html-inc,blog-0011.html-inc,blog-0012.html-inc,blog-0013.html-inc,blog-0014.html-inc,blog-0015.html-inc,blog-0016.html-inc,blog-0018.html-inc,blog-0019.html-inc,blog-0020.html-inc,blog-0021.html-inc,blog-0022.html-inc,blog-0023.html-inc,blog-0024.html-inc,blog-0025.html-inc
-Sneak Preview: blog-0003.html-inc
-Tutorial: blog-0011.html-inc,blog-0017.html-inc
-Updates: blog-0004.html-inc,blog-0005.html-inc,blog-0006.html-inc,blog-0007.html-inc,blog-0013.html-inc,blog-0019.html-inc
-XS: blog-0002.html-inc,blog-0017.html-inc
-games: blog-0006.html-inc,blog-0018.html-inc
-personal: blog-0016.html-inc,blog-0025.html-inc
+Alien: blog-0024.html-inc
+CPAN: blog-0015.html-inc,blog-0016.html-inc,blog-0017.html-inc
+Design: blog-0007.html-inc,blog-0008.html-inc,blog-0012.html-inc,blog-0013.html-inc,blog-0014.html-inc
+Docs: blog-0001.html-inc,blog-0011.html-inc
+Example: blog-0002.html-inc
+Frozen Bubble: blog-0009.html-inc,blog-0016.html-inc
+HackFest: blog-0010.html-inc
+Perl: blog-0001.html-inc,blog-0002.html-inc,blog-0003.html-inc,blog-0004.html-inc,blog-0005.html-inc,blog-0006.html-inc,blog-0009.html-inc,blog-0010.html-inc,blog-0011.html-inc,blog-0012.html-inc,blog-0013.html-inc,blog-0014.html-inc,blog-0015.html-inc,blog-0016.html-inc,blog-0017.html-inc,blog-0018.html-inc,blog-0019.html-inc,blog-0020.html-inc,blog-0021.html-inc,blog-0022.html-inc,blog-0023.html-inc,blog-0024.html-inc,blog-0025.html-inc
+Questions: blog-0021.html-inc
+Releases: blog-0024.html-inc,blog-0025.html-inc
+SDL: blog-0001.html-inc,blog-0002.html-inc,blog-0003.html-inc,blog-0004.html-inc,blog-0005.html-inc,blog-0006.html-inc,blog-0007.html-inc,blog-0008.html-inc,blog-0009.html-inc,blog-0010.html-inc,blog-0011.html-inc,blog-0012.html-inc,blog-0013.html-inc,blog-0014.html-inc,blog-0015.html-inc,blog-0016.html-inc,blog-0017.html-inc,blog-0019.html-inc,blog-0020.html-inc,blog-0021.html-inc,blog-0022.html-inc,blog-0023.html-inc,blog-0024.html-inc,blog-0025.html-inc
+Sneak Preview: blog-0004.html-inc
+Tutorial: blog-0012.html-inc,blog-0018.html-inc
+Updates: blog-0005.html-inc,blog-0006.html-inc,blog-0007.html-inc,blog-0008.html-inc,blog-0014.html-inc,blog-0020.html-inc
+XS: blog-0003.html-inc,blog-0018.html-inc
+games: blog-0007.html-inc,blog-0019.html-inc
+personal: blog-0017.html-inc
diff --git a/pages/tags-personal.html-inc b/pages/tags-personal.html-inc
index a7db01e..8dbc4a7 100644
--- a/pages/tags-personal.html-inc
+++ b/pages/tags-personal.html-inc
@@ -1 +1 @@
-Results for tag: personal
Newbie Friendly Perl ProjectsThursday, 03 September 2009Tags: [CPAN] [Perl] [SDL] [personal]This is a reply to szabgab's post on how to get newbies interested in Perl modules. Being a newbie in Perl myself I thought I should take a shot.
I was thinking you can make projects more accessible to newbies by having a step by step plan included with where they need to look. For example for docs of SDL_perl:
Look at SDL docs [ link ] See where SDL_perl is using the same functions [ link ] and the docs to this file [ link ] Use the pod format to add it to the source [ link to using pod ] {BONUS} Come up with tutorial or cookbook [ link to example ] Submit code to github [ link ] or email them to me [ link ]
[more]
My milestones (itches) for gaming in PerlTuesday, 25 August 2009Tags: [Perl] [SDL] [personal]As a new Perl developer I am able to contribute with great enthusiasm due to the great community and the fancies of the language. However I know that these things will fade and I will need something else to take the place. Usually what has worked for me in the past was to set milestones. These will act as roots, keeping me interested in being involved. After all in words better than mines.
We all âscratch our own itchesâ. Itâs why I started Linux, itâs why I started git, and itâs why I am still involved. -- Linus
[more]
\ No newline at end of file
+Results for tag: personal
Newbie Friendly Perl ProjectsThursday, 03 September 2009Tags: [CPAN] [Perl] [SDL] [personal]This is a reply to szabgab's post on how to get newbies interested in Perl modules. Being a newbie in Perl myself I thought I should take a shot.
I was thinking you can make projects more accessible to newbies by having a step by step plan included with where they need to look. For example for docs of SDL_perl:
Look at SDL docs [ link ] See where SDL_perl is using the same functions [ link ] and the docs to this file [ link ] Use the pod format to add it to the source [ link to using pod ] {BONUS} Come up with tutorial or cookbook [ link to example ] Submit code to github [ link ] or email them to me [ link ]
[more]
\ No newline at end of file