Open kthakore opened 13 years ago
Author: jamesw Time: 1279736983 Field: status Value: accepted
Author: jamesw Time: 1279736983 Field: comment Value:
Author: kthakore Time: 1279737992 Field: comment Value: Scenes, will be SDLx::Map, and SDLx::LayerManager
A collision plugin would be nice.
Create an SDLx::Builder module to create SDL games declaratively, similar in idea to Plack::Builder for laying out websites. Syntax something like this:
SDL { title => 'My Game', dimensions => [640,480], depth => 32, scenes => { scene { name => 'Map1', image => 'map1.jpg', }, scene { name => 'Map2', image => 'map2.jpg', }, }, sprites => { sprite { name => 'actor1', rect => [0, 0, 80, 80] sequence 'walk' => [ [0], [0..7] ], sequence 'run' => [ [0], [8..15] ], } }, texts => { text 'gameover' => { font => 'bold', color => 'red', string => 'Game Over!', position => [15,15], }, }, events => { event 'playerdies' => { displaytext 'gameover' wait; endgame; } } };