SDL Framework RSS
NAVIGATION >>
HOME API TOOLS FORUM REPORT BUGS
:. SDL Framework (SDLFW)
SDLFW-app
SDLFW is a cross-platform framework from the powerful SDL library to create your own 2D games with the Lua programming language.
It's easy-to-use, free, open-source, and works on Windows and Linux.

SDLFW is licensed under the zLib license. That means you can use it freely for any purpose - including commercial purposes with no limitations.

:. Main Features
  • Fast application development through Lua scripting language
  • Support for multiple image formats
  • TrueType font rendering support
  • Provides input from the keyboard, mouse, and joystick
  • Provides a simple API to query the capabilities of the sound card
  • Complex audio functions, mainly for sound mixing
  • Provides a clean, simple, and reliable time and timer API
  • Provides an API for reading and playing tracks on a CDROM
  • Networking support
  • Provides a thread API that looks like a simplified version of pthreads
  • Is small, portable, and reliable
:. What's New in This Version?
  • Added support to packaging file
    • Support to automatically load if the file have the name "base.sdl"
    • Support to some extensions to automatically load : .sdl, .res, .pak, .dat and .zip
  • Changed license to zLib License
:. Example
main.lua
local function main()
  -- Initialize SDL video   if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) then     print( "Couldn't initialize SDL: " .. SDL_GetError() )     return 1   end
  -- Set the window caption   SDL_WM_SetCaption( "SDLFW - Hello World", nil )
  -- Create a new window   local screen = SDL_SetVideoMode( 512, 384, 16, SDL_SWSURFACE )   if ( screen == nil ) then     print( "Unable to set the video mode: " .. SDL_GetError() )     SDL_Quit()     return 1   end
  -- Get the global event   local event = SDLFW_GetGlobalEvent()
  -- While the user hasn't quit   local done = false   while ( done == false ) do     -- While there's an event to handle     if ( SDL_PollEvent(event) ) then       -- If the user has X out the window       if ( event.type == SDL_QUIT ) then done = true end     end
    -- Swaps screen buffers     SDL_Flip( screen )
    -- Wait a specified number of milliseconds before returning     SDL_Delay( 1 )   end
  -- Make sure SDL cleans up before exit   SDL_Quit()
  return 0 end
main()
:: CURRENT VERSION

1.6.1

Apr / 2015
:: PLATFORMS SUPPORTED
WINDOWS LINUX
:: DOWNLOAD
DOWNLOAD Deps
:: DONATE
SDLFW needs your support, please donate 1 dollar or more to make this project better.
:: POWERED BY
SDL
Lua
:: VISITORS
:: CONTACT AND FEEDBACK
Developer
CorEduard@Programmer.net
SourceForge.net
SDLFW.sf.net Except where otherwise noted, content on this site is
licensed under a Creative Commons Attribution 3.0 License.