i am trying to draw a 2d-tiled map in SDL Perl using the SDLx::Sprite module but i was wondering is this really the proper way to draw a tiled map in SDL Perl? Or there are other ways to do it?
Here is how i draw a tile in Perl SDL
my @tile2=map{ my $sprite = SDLx::Sprite->new( image => 'img/tile/tile2.png', # or surface => SDL::Surfac +e x=>int rand(500)-20, y=>400 ); } 1 .. 50; # .... etc ..... for(@tile2){ $_->draw_xy($app,$_->x,$_->y); }
In reply to Drawing a Tile using SDLx::Sprite by Muskovitz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |