Re: Problems Installing SDL
Thanks Breno! Pmesa1. Although the irc channel is quite I can help you out on there later in the evening. I am on PDT to > On Jun 5, 2017, at 7:15 AM, brenowrote: > > Hello! > > After downloading/unpacking the SDL dist, try adding the following line to > the top of inc/My/Builder/Darwin.pm: > > use File::Spec::Functions qw(rel2abs); > > and let us know how the build goes. > > If it still fails, please let us know the output of: > > * perl -V (note capital V) > * set | grep -e SDL -e PERL > * perl -MData::Dumper -MAlien::SDL -E 'say > Dumper(Alien::SDL->config(q(libs))); say > Dumper(Alien::SDL->config(q(ld_shlib_map)))' > > Thanks! > >> On Sat, Jun 3, 2017 at 7:52 PM pmesa1 wrote: >> Hello, >> >> I need SDL for a project that I am working on however I am unable to install >> it because when I run Build.pl I receive an error "Undefined subroutine >> ::Builder::Darwin::rel2abs called at inc/My/Builder/Darwin.pm line 115.". >> The same thing happens when I install using cpan or manually. I don’t know >> where to go from here so any help would be appreciated. Thank you. >> >> Best, >> >> Paul
Re: [Alien-SDL2] Don't use $ENV{HOME} (#6)
Hi! Hmm weird. Can you set your %home% variable? On Sat, Aug 2, 2014 at 7:53 AM, Alex notificati...@github.com wrote: Hi! I just installed Alien::SDL2 on my computer and I got the following output: Set up gcc environment - 3.4.5 (mingw-vista special r3) Build option used: Binaries Win/32bit SDL2 (20130305) RECOMMENDED (gfx, image, mixer, net, smpeg, ttf) Building Alien-SDL2 Use of uninitialized value $ENV{HOME} in concatenation (.) or string at C:/Per l/lib/CPAN/Config.pm line 6. Fetching 'http://strawberryperl.com/package/kmx/sdl/32bit_SDL2_20130305.zip'... There is $ENV{HOME}. Is it something that has to do with Alien::SDL2 or is it not related to this module? If it is related, then could we switch to File::HomeDir? --- Reply to this email directly or view it on GitHub: https://github.com/PerlGameDev/Alien-SDL2/issues/6
Re: [Alien-SDL2] Don't use $ENV{HOME} (#6)
Oh right! Also hi tobais!! On Sat, Aug 2, 2014 at 11:32 AM, Tobias Leich em...@froggs.de wrote: HOME is gone since Win7+, one should really use: File::HomeDir-my_home Cheers Am 02.08.2014 17:25, schrieb Kartik Thakore: Hi! Hmm weird. Can you set your %home% variable? On Sat, Aug 2, 2014 at 7:53 AM, Alex notificati...@github.com mailto:notificati...@github.com wrote: Hi! I just installed Alien::SDL2 on my computer and I got the following output: Set up gcc environment - 3.4.5 (mingw-vista special r3) Build option used: Binaries Win/32bit SDL2 (20130305) RECOMMENDED (gfx, image, mixer, net, smpeg, ttf) Building Alien-SDL2 Use of uninitialized value $ENV{HOME} in concatenation (.) or string at C:/Per l/lib/CPAN/Config.pm line 6. Fetching 'http://strawberryperl.com/package/kmx/sdl/32bit_SDL2_20130305.zip'... There is $ENV{HOME}. Is it something that has to do with Alien::SDL2 or is it not related to this module? If it is related, then could we switch to File::HomeDir? — Reply to this email directly or view it on GitHub https://github.com/PerlGameDev/Alien-SDL2/issues/6.
Re: SDL and wxPerl
Hi Eriam, Actually I haven't had a lot of luck with this, sorry. On Mon, Sep 23, 2013 at 5:40 AM, Eriam Schaffter er...@mediavirtuel.comwrote: Hello Kartik I've seen your Interfacing SDL Perl and WxPerl post on the wxPerl mailing list. Have you been able to get some of that working ? A SDL window inside a wxPerl application ? Thanks for the update ! Regards Eriam
Re: Alien::SDL2 - updated libs
We are getting fails because of something with png and libz. https://travis-ci.org/PerlGameDev/Alien-SDL2/builds/10315397 https://travis-ci.org/PerlGameDev/Alien-SDL2/jobs/10315398 On Sat, Aug 17, 2013 at 3:08 PM, kmx k...@volny.cz wrote: now also in experimental -- kmx On 17.8.2013 20:52, Kartik Thakore wrote: Actually I have made some changes to that file, can you move those changes to the experimental branch? I have a patch in there too. On Sat, Aug 17, 2013 at 2:48 PM, kmx k...@volny.cz wrote: I have commited the patch to 'master' see https://github.com/PerlGameDev/Alien-SDL2/commit/f796a3d Needs testing -- kmx
Re: Alien::SDL2 - updated libs
I am also getting these errors with vorbis now: /bin/bash ../libtool --mode=install /usr/bin/install -c libvorbis.la libvorbisfile.la libvorbisenc.la'/root/Alien-SDL2/sharedir/0.002_5fb04777/lib' libtool: install: /usr/bin/install -c .libs/libvorbis.so.0.4.6 /root/Alien-SDL2/sharedir/0.002_5fb04777/lib/libvorbis.so.0.4.6 libtool: install: (cd /root/Alien-SDL2/sharedir/0.002_5fb04777/lib { ln -s -f libvorbis.so.0.4.6 libvorbis.so.0 || { rm -f libvorbis.so.0 ln -s libvorbis.so.0.4.6 libvorbis.so.0; }; }) libtool: install: (cd /root/Alien-SDL2/sharedir/0.002_5fb04777/lib { ln -s -f libvorbis.so.0.4.6 libvorbis.so || { rm -f libvorbis.so ln -s libvorbis.so.0.4.6 libvorbis.so; }; }) libtool: install: /usr/bin/install -c .libs/libvorbis.lai /root/Alien-SDL2/sharedir/0.002_5fb04777/lib/libvorbis.la libtool: install: error: cannot install `libvorbisfile.la' to a directory not ending in /root/Alien-SDL2/sharedir/0.001_9c0ef58f/lib make[3]: *** [install-libLTLIBRARIES] Error 1 make[3]: Leaving directory `/root/Alien-SDL2/build_src/libvorbis-1.3.3/lib' make[2]: *** [install-am] Error 2 make[2]: Leaving directory `/root/Alien-SDL2/build_src/libvorbis-1.3.3/lib' make[1]: *** [install-recursive] Error 1 make[1]: Leaving directory `/root/Alien-SDL2/build_src/libvorbis-1.3.3/lib' On Sat, Aug 17, 2013 at 3:19 PM, Kartik Thakore thakore.kar...@gmail.comwrote: We are getting fails because of something with png and libz. https://travis-ci.org/PerlGameDev/Alien-SDL2/builds/10315397 https://travis-ci.org/PerlGameDev/Alien-SDL2/jobs/10315398 On Sat, Aug 17, 2013 at 3:08 PM, kmx k...@volny.cz wrote: now also in experimental -- kmx On 17.8.2013 20:52, Kartik Thakore wrote: Actually I have made some changes to that file, can you move those changes to the experimental branch? I have a patch in there too. On Sat, Aug 17, 2013 at 2:48 PM, kmx k...@volny.cz wrote: I have commited the patch to 'master' see https://github.com/PerlGameDev/Alien-SDL2/commit/f796a3d Needs testing -- kmx
Re: Alien::SDL2 - updated libs
oops nevermind On Sat, Aug 17, 2013 at 3:31 PM, Kartik Thakore thakore.kar...@gmail.comwrote: I am also getting these errors with vorbis now: /bin/bash ../libtool --mode=install /usr/bin/install -c libvorbis.la libvorbisfile.la libvorbisenc.la'/root/Alien-SDL2/sharedir/0.002_5fb04777/lib' libtool: install: /usr/bin/install -c .libs/libvorbis.so.0.4.6 /root/Alien-SDL2/sharedir/0.002_5fb04777/lib/libvorbis.so.0.4.6 libtool: install: (cd /root/Alien-SDL2/sharedir/0.002_5fb04777/lib { ln -s -f libvorbis.so.0.4.6 libvorbis.so.0 || { rm -f libvorbis.so.0 ln -s libvorbis.so.0.4.6 libvorbis.so.0; }; }) libtool: install: (cd /root/Alien-SDL2/sharedir/0.002_5fb04777/lib { ln -s -f libvorbis.so.0.4.6 libvorbis.so || { rm -f libvorbis.so ln -s libvorbis.so.0.4.6 libvorbis.so; }; }) libtool: install: /usr/bin/install -c .libs/libvorbis.lai /root/Alien-SDL2/sharedir/0.002_5fb04777/lib/libvorbis.la libtool: install: error: cannot install `libvorbisfile.la' to a directory not ending in /root/Alien-SDL2/sharedir/0.001_9c0ef58f/lib make[3]: *** [install-libLTLIBRARIES] Error 1 make[3]: Leaving directory `/root/Alien-SDL2/build_src/libvorbis-1.3.3/lib' make[2]: *** [install-am] Error 2 make[2]: Leaving directory `/root/Alien-SDL2/build_src/libvorbis-1.3.3/lib' make[1]: *** [install-recursive] Error 1 make[1]: Leaving directory `/root/Alien-SDL2/build_src/libvorbis-1.3.3/lib' On Sat, Aug 17, 2013 at 3:19 PM, Kartik Thakore thakore.kar...@gmail.comwrote: We are getting fails because of something with png and libz. https://travis-ci.org/PerlGameDev/Alien-SDL2/builds/10315397 https://travis-ci.org/PerlGameDev/Alien-SDL2/jobs/10315398 On Sat, Aug 17, 2013 at 3:08 PM, kmx k...@volny.cz wrote: now also in experimental -- kmx On 17.8.2013 20:52, Kartik Thakore wrote: Actually I have made some changes to that file, can you move those changes to the experimental branch? I have a patch in there too. On Sat, Aug 17, 2013 at 2:48 PM, kmx k...@volny.cz wrote: I have commited the patch to 'master' see https://github.com/PerlGameDev/Alien-SDL2/commit/f796a3d Needs testing -- kmx
Re: Alien::SDL2 - updated libs
Awesome cool. Gonna merge to master! On Sat, Aug 17, 2013 at 3:56 PM, kmx k...@volny.cz wrote: Now fixed https://travis-ci.org/PerlGameDev/Alien-SDL2/builds/10316295 On 17.8.2013 21:19, Kartik Thakore wrote: We are getting fails because of something with png and libz. https://travis-ci.org/PerlGameDev/Alien-SDL2/builds/10315397 https://travis-ci.org/PerlGameDev/Alien-SDL2/jobs/10315398 On Sat, Aug 17, 2013 at 3:08 PM, kmx k...@volny.cz wrote: now also in experimental -- kmx On 17.8.2013 20:52, Kartik Thakore wrote: Actually I have made some changes to that file, can you move those changes to the experimental branch? I have a patch in there too. On Sat, Aug 17, 2013 at 2:48 PM, kmx k...@volny.cz wrote: I have commited the patch to 'master' see https://github.com/PerlGameDev/Alien-SDL2/commit/f796a3d Needs testing -- kmx
Re: perltidy style?
+1 On Wed, Aug 14, 2013 at 8:12 PM, Mason James m...@kohaaloha.com wrote: On 2013-08-15, at 5:47 AM, Kartik Thakore wrote: :p Mason, if you make a .pertidy I will use it. (I think people prefer spaces to tabs, and methods are like_this_for_now ) cool!, and yes to spaces and that style of method names too guys, before i commit that file - can we have a quick vote for a perltidy style? (i don't want anyone to be forced to use a perl-style they are unhappy with) +1 for the original -nopro 'larry wall' style and -pbp (--perl-best-practices) style, from me anyone else? On Wed, Aug 14, 2013 at 4:13 AM, Tobias Leich em...@froggs.de wrote: There is more than *one* style? :P Cheers, Tobias PS: I'd say the set style is the one used mainly in the code. Am 13.08.2013 15:08, schrieb Mason James: hi all has anyone discussed a preferred perltidy style for the project, yet?
Re: SDL 2.0.0 has finally been released
No problem. Btw do you have any comments on the new Constants.pm ? Using XS to load them instead of use constants? On Thu, Aug 15, 2013 at 9:53 AM, Chris Marshall devel.chm...@gmail.comwrote: Excellent, thanks for the link! --Chris On Thu, Aug 15, 2013 at 9:27 AM, Kartik Thakore thakore.kar...@gmail.com wrote: We are working on it: http://github.com/PerlGameDev/SDL2 On Thu, Aug 15, 2013 at 9:26 AM, Chris Marshall devel.chm...@gmail.com wrote: Are there any perl bindings to SDL2? The libsdl.org site only lists C#, Pascal, and Python. --Chris On Thu, Aug 15, 2013 at 9:08 AM, Kartik Thakore thakore.kar...@gmail.com wrote: Yeah all of them. Also smpeg was missing. On Wed, Aug 14, 2013 at 6:10 AM, kmx k...@volny.cz wrote: On 13.8.2013 22:24, Kartik Thakore wrote: Yeah read this! Hey kmx, anyway you can update the packs? or FROGGS If you mean urls in Alien::SDL2 - https://github.com/PerlGameDev/Alien-SDL2/blob/master/inc/My/Utility.pm#L58 - I can do it. Just SDL2_xxx packages or should I update also zlib, png, freetype ... to the latest versions? -- kmx
Re: perltidy style?
:p Mason, if you make a .pertidy I will use it. (I think people prefer spaces to tabs, and methods are like_this_for_now ) On Wed, Aug 14, 2013 at 4:13 AM, Tobias Leich em...@froggs.de wrote: There is more than *one* style? :P Cheers, Tobias PS: I'd say the set style is the one used mainly in the code. Am 13.08.2013 15:08, schrieb Mason James: hi all has anyone discussed a preferred perltidy style for the project, yet?
Re: automated building/testing for SDL_Perl?
? On Tue, Aug 13, 2013 at 2:32 PM, Mason James m...@kohaaloha.com wrote: On 2013-08-12, at 8:40 AM, Mason James wrote: On 2013-08-12, at 8:06 AM, Kartik Thakore wrote: Yeap this would be great for sdl. I can give you permissions to add it to SDL repos? yes please :) just a little update... i've managed to sort a successful travis build on the PerlGamesDev/Alien-SDL2 experimental branch https://travis-ci.org/PerlGameDev/Alien-SDL2 https://github.com/PerlGameDev/Alien-SDL2/commits/experimental i'll attempt to get a SDL2 build succeeding over then next few days On Sun, Aug 11, 2013 at 4:04 PM, Mason James m...@kohaaloha.com wrote: On 2013-08-12, at 7:30 AM, Tobias Leich wrote: Hi Mason, that is pretty cool. If it does a rebuild and test after every commit, can I see a matrix of commits? Cheers, Tobias hmm, the 'build history' (and 'pull request'?) tabs show a history of commits (and their test result) https://travis-ci.org/KohaAloha/Alien-SDL/builds https://travis-ci.org/KohaAloha/Alien-SDL/pull_requests thats the best travis does, i think…?
Re: automated building/testing for SDL_Perl?
Yeap this would be great for sdl. I can give you permissions to add it to SDL repos? On Sun, Aug 11, 2013 at 4:04 PM, Mason James m...@kohaaloha.com wrote: On 2013-08-12, at 7:30 AM, Tobias Leich wrote: Hi Mason, that is pretty cool. If it does a rebuild and test after every commit, can I see a matrix of commits? Cheers, Tobias hmm, the 'build history' (and 'pull request'?) tabs show a history of commits (and their test result) https://travis-ci.org/KohaAloha/Alien-SDL/builds https://travis-ci.org/KohaAloha/Alien-SDL/pull_requests thats the best travis does, i think…? Am 11.08.2013 21:20, schrieb Mason James: hi All I've recently learnt how to use the Travis [1] automated build system with github repos its a pretty handy tool that detects errors in commits; and also builds/tests your codebase after any commit series is pushed, on multiple versions of perl even (currently 5.10 - 5.18) with some pretty small changes, I've managed to get both the SDL and Alien-SDL repos building/testing successfully with Travis [2][3] (i plan on sorting the SDL2 and Alien-SDL2 repos soon) so… is this something people are keen on using for SDL_Perl project? cheers, Mason [1] https://travis-ci.org/ [2] https://travis-ci.org/KohaAloha/SDL [3] https://travis-ci.org/KohaAloha/Alien-SDL cheers, Mason -- KohaAloha, NZ
Re: automated building/testing for SDL_Perl?
Done. Let me know if you need more permissions for the travis irc stuff. On Sun, Aug 11, 2013 at 4:56 PM, Mason James m...@kohaaloha.com wrote: On 2013-08-12, at 7:20 AM, Mason James wrote: hi All I've recently learnt how to use the Travis [1] automated build system with github repos its a pretty handy tool that detects errors in commits; and also builds/tests your codebase after any commit series is pushed, on multiple versions of perl even (currently 5.10 - 5.18) oh, also... some other nice things with Travis, is that (afaik) it can be configured to send emails and irc messages after a build so we could get Travis to send build messages to #sdl on irc.perl.org, (or create a 'build' mailing list)
Request comments on new types of constants
Hey Guys, What do you think of doing this for constants: XS plug https://github.com/PerlGameDev/SDL2/blob/experimental/src/Core/Constants.xs#L17 Mapped directly to https://github.com/PerlGameDev/SDL2/blob/experimental/lib/SDL2/Constants.pm#L96 This way we don't have to update their values if libSDL2 changes them. Regards, Kartik
[Alien-SDL2] libtiff 4.0.3 incompatible on debian/ubuntu
Hey guys, Any ideas on how I can fix this? https://github.com/PerlGameDev/Alien-SDL2/issues/3 I tried ... { FALSE= 0, TRUE= 0} ... But that is not working.
Re: [Alien-SDL2] libtiff 4.0.3 incompatible on debian/ubuntu
This seems to work: https://github.com/PerlGameDev/Alien-SDL2/commit/dfece76c277922550610f8c8179f149131522c7e any comments? On Sun, Aug 11, 2013 at 9:51 PM, Kartik Thakore thakore.kar...@gmail.comwrote: Hey guys, Any ideas on how I can fix this? https://github.com/PerlGameDev/Alien-SDL2/issues/3 I tried ... { FALSE= 0, TRUE= 0} ... But that is not working.
Re: [Alien-SDL2] libtiff 4.0.3 incompatible on debian/ubuntu
Seems like prereqs are not installing now: https://github.com/PerlGameDev/Alien-SDL2/issues/4 Any clue guys? Also kmx: your url for smpeg is no longer valid. On Sun, Aug 11, 2013 at 10:41 PM, Kartik Thakore thakore.kar...@gmail.comwrote: This seems to work: https://github.com/PerlGameDev/Alien-SDL2/commit/dfece76c277922550610f8c8179f149131522c7e any comments? On Sun, Aug 11, 2013 at 9:51 PM, Kartik Thakore thakore.kar...@gmail.comwrote: Hey guys, Any ideas on how I can fix this? https://github.com/PerlGameDev/Alien-SDL2/issues/3 I tried ... { FALSE= 0, TRUE= 0} ... But that is not working.
Re: [Alien-SDL2] libtiff 4.0.3 incompatible on debian/ubuntu
Also this looks like the Builder is not fetching and install SDL2, when I ask it to build from scratch : Do you want to see all messages during configure/make (y/n)? [n ]n Checking checksum for already existing 'download/zlib-1.2.8.tar.gz'... Checking checksum for already existing 'download/jpegsrc.v9.tar.gz'... Checking checksum for already existing 'download/tiff-4.0.3.tar.gz'... Checking checksum for already existing 'download/libpng-1.5.14.tar.gz'... Checking checksum for already existing 'download/freetype-2.4.11.tar.gz'... Checking checksum for already existing 'download/SDL2_image-hg20130301.tar.gz'... Checking checksum for already existing 'download/libogg-1.3.0.tar.gz'... Checking checksum for already existing 'download/libvorbis-1.3.3.tar.gz'... Fetching ' http://strawberryperl.com/package/kmx/sdl/src/SDL2_mixer-hg20130301.tar.gz'. .. Checking checksum for 'download/SDL2_mixer-hg20130301.tar.gz'... Checking checksum for already existing 'download/SDL2_ttf-hg20130301.tar.gz'... Checking checksum for already existing 'download/SDL2_gfx-svn20130301.tar.gz'... Extracting z... Extracting jpeg... Extracting tiff... ### Any ideas why? On Sun, Aug 11, 2013 at 11:13 PM, Kartik Thakore thakore.kar...@gmail.comwrote: Seems like prereqs are not installing now: https://github.com/PerlGameDev/Alien-SDL2/issues/4 Any clue guys? Also kmx: your url for smpeg is no longer valid. On Sun, Aug 11, 2013 at 10:41 PM, Kartik Thakore thakore.kar...@gmail.com wrote: This seems to work: https://github.com/PerlGameDev/Alien-SDL2/commit/dfece76c277922550610f8c8179f149131522c7e any comments? On Sun, Aug 11, 2013 at 9:51 PM, Kartik Thakore thakore.kar...@gmail.com wrote: Hey guys, Any ideas on how I can fix this? https://github.com/PerlGameDev/Alien-SDL2/issues/3 I tried ... { FALSE= 0, TRUE= 0} ... But that is not working.
Re: adding texture scaling functionally to SDL2_perl
Thanks mason, Can you make these feature requests as issues on http://github.com/PerlGameDev/SDL2 On Fri, Aug 9, 2013 at 2:25 PM, Mason James m...@kohaaloha.com wrote: hi sdl-devel i am planning/researching about adding a small amount of SDL2_Perl code into my existing SDL_Perl app, for a framerate increase i have one long-standingly slow bit of code in my app, that i would like to replace with SDL2 code my slow code is a SDL::GFX::Rotozoom::surface() call. but SDL2 has 'hardware accelerated' stretching/scaling/zooming [1], yay! i checked the SDL2 version of ./SDL2_rotozoom.c, and it is still using the current slow software method (no changes) but the good news is… there seems to be a preferred method to achieve this fast hardware scaling in SDL2 SDL2's SDL_RenderCopyEx() function [2] will scale a texture using a fast HW method, (but...i have not benchmarked my theory yet) my plan is to attempt to add some missing SDL2 functionality to SDL2_Perl. then swap my slow SDL::GFX::Rotozoom::surface() call, with the faster SDL2 equivalent so basically, i need to implement the 'test/testrendercopyex.c' demo [3], in SDL2_Perl, and add access to these missing SDL2 functions in SDL2_Perl... SDL_LoadBMP(), SDL_CreateTextureFromSurface(), SDL_FreeSurface() SDL_RenderGetViewport() SDL_CreateTexture() SDL_SetRenderTarget() SDL_RenderCopy() SDL_RenderCopyEx(), SDL_QueryTexture() fyi: the testrendercopyex.c demo is nice and simple, it... - loads a .bmp file to a surface - converts the surface to a HW texture - then randomly moves, rotates and scales that texture around the window, in a loop i believe this demo is using the new hardware-accelerated scaling on a 'texture' in SDL2 [1] http://wiki.libsdl.org/moin.fcg/Introduction [2] http://wiki.libsdl.org/moin.fcg/SDL_RenderCopyEx [3] http://hg.libsdl.org/SDL/file/90ff13467550/test/testrendercopyex.c any comments or suggestions, folks? cheers, Mason
Re: (in cleanup) panic: free from wrong pool
Created the issue btw: https://github.com/PerlGameDev/SDL/issues/247 Thanks! On Wed, Aug 7, 2013 at 11:28 PM, Kartik Thakore thakore.kar...@gmail.comwrote: What happened? Did you report it to github issues? I think you can report here: https://github.com/github/github-services/issues Those guys are very very responsive so it is good. On Wed, Aug 7, 2013 at 10:06 PM, Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯 da...@cpan.org wrote: This bug report is too much for GitHub's feeble mind.
Re: YUV Overlay
Can we run this with out needing ARDdrone? On Wed, Jul 24, 2013 at 8:22 AM, tmur...@wumpus-cave.net wrote: Short on time at the moment, but I have the complete code on a github repo: https://github.com/frezik/UAV-**Pilothttps://github.com/frezik/UAV-Pilot The relevant code is in UAV::Pilot::SDL::Video, and the decoding happens in the xs file for UAV::Pilot::Video::**H264Decoder. The test t/160_video_decode.t should run the decoding end of things. There's a test video in t_data/ardrone_video_stream_**dump.bin, though that contains the PaVE headers from the UAV before each frame. Those headers can be stripped out by bin/uav_video_dump. I'll try to come up with a more concise example later this evening. Thanks, Timm On 24.07.2013 01:00, Tobias Leich wrote: Hi, can you paste a complete example please? Maybe with a link to a test video file. What I would try first is SDL's latest release, which is 2.540 or so. Cheers, FROGGS Am 23.07.2013 23:44, schrieb tmur...@wumpus-cave.net: I'm working on a project involving decoding h.264 video frames with ffmpeg and then outputting them to an SDL surface. From what I've read, the YUV overlay is meant for this kind of job, but I'm having trouble getting it to work with the Perl bindings. One thing that seems odd to me in the Perl docs is: As of release 2.3 direct right to overlay is disable. Besides the typos, this troubles me because it seems that disabling the feature makes the YUV overlay completely useless. Not to be deterred, I wrote this code: SDL::Video::lock_YUV_overlay( $overlay ); # The order of array indexen is correct, according to: # http://dranger.com/ffmpeg/**tutorial02.htmlhttp://dranger.com/ffmpeg/tutorial02.html my $pitches = $overlay-pitches; $$pitches[0] = scalar @{ $last_vid_frame[0] }; $$pitches[2] = scalar @{ $last_vid_frame[1] }; $$pitches[1] = scalar @{ $last_vid_frame[2] }; my $pixels = $overlay-pixels; $$pixels[0] = $last_vid_frame[0]; $$pixels[2] = $last_vid_frame[1]; $$pixels[1] = $last_vid_frame[2]; SDL::Video::unlock_YUV_**overlay( $overlay ); SDL::Video::update_rects( $sdl, $bg_rect ); SDL::Video::display_YUV_**overlay( $sdl, $bg_rect ); When I run this, I get an error about not being able to find the pitches() method against the class SDL::Overlay. Eh? (Same thing happens for the pixels() method if I put that call first.) I can call width() and format() and such just fine on that object. If needed, I can handle the overlay entirely at the C level. I may end up doing that anyway; the C array that comes out of ffmpeg is being transformed into a Perl array-of-arrays, which is going to be an expensive operation to do for 720p at 30 fps in realtime. But I'd like to try this at the Perl level for now. I might also have to convert the output from ffmpeg using sws_scale(). It's coming out in YUV420P mode, and I'm using YV12 to init the overlay. But I'd like to get the above working before messing with that. Thanks, Timm Murray
Introducing Play Spine
Hey Guys, So I have been using http://backbonejs.org/docs/backbone.html and templates for web development a lot and I was thinking it would be great if we had that for game dev in perl. https://github.com/PerlGameDev/PlaySpine/blob/master/README.md What do you guys think? Regards, Kartik
Re: Packaging with strawberry perl
AWESOME On Thu, Mar 7, 2013 at 4:54 PM, kmx k...@volny.cz wrote: Kartik, Try this special edition: http://strawberryperl.com/**beta/spp-spec-minimal-5.16.3.** 1-32bit-portable.ziphttp://strawberryperl.com/beta/spp-spec-minimal-5.16.3.1-32bit-portable.zip Simply: - unzip into e.g. c:\strawberry-portable - install SDL + all other required modules - remove c:\strawberry-portable\c (the whole directory) - clean c:\strawberry-portable\cpan\* - clean c:\strawberry-portable\data\* - zip (after SDL installation should be approx 23MB) - distribute -- kmx
Fwd: [SDL] [PATCH] DirectX - Failed loading D3DX9_*.dll
Patch applied -- Forwarded message -- From: Sam Lantinga slou...@libsdl.org Date: Tue, Mar 5, 2013 at 9:53 PM Subject: Re: [SDL] [PATCH] DirectX - Failed loading D3DX9_*.dll To: SDL Development List s...@lists.libsdl.org Patch applied, thanks! FYI, the best place to submit patches is buzilla so they don't get lost in the mailing list traffic: http://bugzilla.libsdl.org Cheers! On Tue, Mar 5, 2013 at 2:18 AM, Tobias Leich em...@froggs.de wrote: Hi, we have a patch for loading DirectX dlls on Windows. Cheers, Tobias Original-Nachricht Betreff: DirectX - Failed loading D3DX9_*.dll Datum: Tue, 05 Mar 2013 11:09:05 +0100 Von: kmx k...@volny.cz k...@volny.cz An: sdl-devel@perl.org sdl-devel@perl.orgsdl-devel@perl.org Hi Kartik and Tobias, ad our last discussion on IRC. I have investigated the warning Failed loading D3DX9_*.dll and come up with the enclosed patch (please forward it to relevant SDL2 mailing list/bugtracker). The warning has gone and DirectX seems to be loaded but I was not able to test it more. -- kmx ___ SDL mailing list s...@lists.libsdl.org http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org ___ SDL mailing list s...@lists.libsdl.org http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Re: DirectX - Failed loading D3DX9_*.dll
Awesome. What is the difference (besides muting the error?) for the load there? On Tue, Mar 5, 2013 at 5:09 AM, kmx k...@volny.cz wrote: Hi Kartik and Tobias, ad our last discussion on IRC. I have investigated the warning Failed loading D3DX9_*.dll and come up with the enclosed patch (please forward it to relevant SDL2 mailing list/bugtracker). The warning has gone and DirectX seems to be loaded but I was not able to test it more. New binaries: http://strawberryperl.com/package/kmx/sdl/32bit_SDL2_20130305.zip http://strawberryperl.com/package/kmx/sdl/64bit_SDL2_20130305.zip Alien-SDL2 on github was also updated -- kmx
Re: DirectX - Failed loading D3DX9_*.dll
Ok will do. Kartik Thakore On 2013-03-05, at 7:58 AM, kmx k...@volny.cz wrote: On 5.3.2013 13:11, Kartik Thakore wrote: Awesome. What is the difference (besides muting the error?) for the load there? Just muting the error message. To be honest I do not know how to measure whether HW acceleration was really utilised or not. Perhaps some of your benchmark scripts can tell us :) -- kmx
Packaging with strawberry perl
Hey so, I was trying to send a friend a simple SDL script with strawberry perl to play around with. But strawberry perl seemed huge! Especially with the DBI/Pg and what not in it. How can i get a vanilla version of portable strawberry perl with no extra libraries installed with it. I will then jsut cpan install SDL (or SDL2) and package a 'game' that way. ideas?
Re: Packaging with strawberry perl
hmm what if I cpan install that? Where is the 'script' that runs the portable thing? On Tue, Mar 5, 2013 at 4:38 PM, kmx k...@volny.cz wrote: Interesting idea. My guess is that for portable strawberry you will need to keep at least perl\vendor\lib\Portable\* perl\vendor\lib\Portable.pm + perhaps File::HomeDir and other Portable's prereqs -- kmx On 5.3.2013 20:54, Kartik Thakore wrote: Could I delete all of perl/vendor and install SDL using cpan. Then remove the cpan stuff? On Tue, Mar 5, 2013 at 2:31 PM, kmx k...@volny.cz wrote: In theory you can delete whatever in perl/vendor you only cannot be sure if some of SDL dependencies is not using it. -- kmx On 5.3.2013 17:54, Kartik Thakore wrote: What about stuff inside perl\vendor and what not. It has a lot of the stuff that is not needed (DBI, BerkelyDB, etc ) On Tue, Mar 5, 2013 at 10:53 AM, kmx k...@volny.cz wrote: On 5.3.2013 15:18, Kartik Thakore wrote: Hey so, I was trying to send a friend a simple SDL script with strawberry perl to play around with. But strawberry perl seemed huge! Especially with the DBI/Pg and what not in it. How can i get a vanilla version of portable strawberry perl with no extra libraries installed with it. I will then jsut cpan install SDL (or SDL2) and package a 'game' that way. ideas? There is no such thing as strawberry perl portable minimal edition What you can do: 1/ take strawberry portable 2/ install SDL + all necessary modules 3/ move all c:\portable-strawberry\c\bin\***.dll to c:\portable-strawberry\perl\**bin\ 4/ delete c:\portable-strawberry\c c:\portable-strawberry\cpan\* c:\portable-strawberry\data\* 5/ now you still have fully working perl (but without possibility to install anything from cpan) -- kmx
Re: Alien::SLD2
Thanks. In SDL2 I had to neuter your internal::Loader stuff. I didn't know what was it doing. I will have SDL2 use the Alien::SDL2 in a bit too. On Sun, Mar 3, 2013 at 4:43 PM, kmx k...@volny.cz wrote: I have cloned the good old Alien::SDL into https://github.com/** PerlGameDev/Alien-SDL2 https://github.com/PerlGameDev/Alien-SDL2 Nearly all patches + some parts that I considered conected to SDL-1.x were removed but overall idea + interface style is the same. I have tested only on strawberry perl (pre-built binaries) and one of my Linux box (building from source), so it is far from release quality. -- kmx
Weird ness with SDL2 rendering
So I have been working on making a simple enough red screen and blue rect on SDL2. I was using this code which is in two test cases in the repo: http://wiki.libsdl.org/moin.fcg/SDL_RenderPresent For the hardware render the D3DX9 is not loading well. But for the software even I can see any thing. Can you guys try this code with KMX's packages and tell me if you guys are getting the same result? Result: C:\Users\kthakore\Documents\Development\perl\SDL2cp t/0perl Build test perl Build test 0 at t\001_load.t line 37. 0 at t\001_load.t line 39. 0 at t\001_load.t line 41. 0 at t\001_load.t line 43. 0 at t\001_load.t line 47. FINISHED: Failed loading D3DX9_44.dll: The specified module could not be found. t\001_load.t .. ok 0 at t\002_software.t line 37. 0 at t\002_software.t line 39. 0 at t\002_software.t line 41. 0 at t\002_software.t line 43. 0 at t\002_software.t line 47. FINISHED: Passed a NULL mutex at t\002_software.t line 52. t\002_software.t .. ok All tests successful. Files=2, Tests=10, 7 wallclock secs ( 0.05 usr + 0.00 sys = 0.05 CPU) Result: PASS
SDL2.0 Dev
Hey Froggs, I am in windows lappy lately :(. How do you compile SDL1.2 and can you compile SDL2.0 for strawberry perl?
Re: SDL2.0 Dev
How do I set that up? I opened it in vs2013 and it kept complaining about missing directx headers. But when I google it, msdn says that directx is part of vs2013 since vs2008. So fucking weird. Kartik Thakore On 2013-02-28, at 1:20 AM, Tobias Leich em...@froggs.de wrote: I'm using VC2010 Express or so... But I can give it a try to compile libSDL2. Am 28.02.2013 02:09, schrieb Kartik Thakore: Hey Froggs, I am in windows lappy lately :(. How do you compile SDL1.2 and can you compile SDL2.0 for strawberry perl?
Re: SDL2.0 Dev
fucking liars On Thu, Feb 28, 2013 at 4:07 PM, Tobias Leich em...@froggs.de wrote: Thats not true, you still need to download and install the diectx sdk. Am 28.02.2013 20:52, schrieb Kartik Thakore: How do I set that up? I opened it in vs2013 and it kept complaining about missing directx headers. But when I google it, msdn says that directx is part of vs2013 since vs2008. So fucking weird. Kartik Thakore On 2013-02-28, at 1:20 AM, Tobias Leich em...@froggs.de wrote: I'm using VC2010 Express or so... But I can give it a try to compile libSDL2. Am 28.02.2013 02:09, schrieb Kartik Thakore: Hey Froggs, I am in windows lappy lately :(. How do you compile SDL1.2 and can you compile SDL2.0 for strawberry perl?
Re: SDL2.0 Dev
AWESOME. I would love your help on Alien::SDL2. Can you document your process somewhere for how you do the build on windows? On Thu, Feb 28, 2013 at 4:04 PM, kmx k...@volny.cz wrote: On 28.2.2013 2:09, Kartik Thakore wrote: Hey Froggs, I am in windows lappy lately :(. How do you compile SDL1.2 and can you compile SDL2.0 for strawberry perl? Hi Kartik, Check these: http://strawberryperl.com/**package/kmx/sdl/32bit_SDL-2.0.** 0-6921_20130228.ziphttp://strawberryperl.com/package/kmx/sdl/32bit_SDL-2.0.0-6921_20130228.zip http://strawberryperl.com/**package/kmx/sdl/64bit_SDL-2.0.** 0-6921_20130228.ziphttp://strawberryperl.com/package/kmx/sdl/64bit_SDL-2.0.0-6921_20130228.zip (just unpack them into c:\strawberry) If you decide to go for Alien:SDL2 I just want you to know that I am ready :) It is quite a long time since I was hacking on Alien::SDL -- kmx
Re: SDL2.0 Dev
Creating now On Thu, Feb 28, 2013 at 5:58 PM, kmx k...@volny.cz wrote: On 28.2.2013 23:23, Kartik Thakore wrote: I couldn't do ./configure in the portable strawberry perl .bat file shell. What shell do you use? MSYS - you can get it from http://sourceforge.net/** projects/perlmingw/files/MSYS%**20Environment%20for%20End%**20Users/http://sourceforge.net/projects/perlmingw/files/MSYS%20Environment%20for%20End%20Users/ Alien::SDL2 will just have SDL2 for now. The other libraries don't work with SDL2 as of yet. OK, could you create a repo like https://github.com/** PerlGameDev/Alien-SDL2 https://github.com/PerlGameDev/Alien-SDL2 ? -- kmx
Re: SDL2.0 Dev
Done https://github.com/PerlGameDev/Alien-SDL2 On Thu, Feb 28, 2013 at 10:10 PM, Kartik Thakore thakore.kar...@gmail.comwrote: Creating now On Thu, Feb 28, 2013 at 5:58 PM, kmx k...@volny.cz wrote: On 28.2.2013 23:23, Kartik Thakore wrote: I couldn't do ./configure in the portable strawberry perl .bat file shell. What shell do you use? MSYS - you can get it from http://sourceforge.net/** projects/perlmingw/files/MSYS%**20Environment%20for%20End%**20Users/http://sourceforge.net/projects/perlmingw/files/MSYS%20Environment%20for%20End%20Users/ Alien::SDL2 will just have SDL2 for now. The other libraries don't work with SDL2 as of yet. OK, could you create a repo like https://github.com/** PerlGameDev/Alien-SDL2 https://github.com/PerlGameDev/Alien-SDL2 ? -- kmx
Fwd: [SDL] SDL 2.0 API stabilization
SDL 2.0 API is STABLE! I will be working on getting libperl-sdl2 started. Any thoughts on name space? SDL2 seems more logical. Would there be any issues with perl for having a number in the package name? -- Forwarded -- From: Sam Lantinga slou...@libsdl.org Date: Mon, Feb 18, 2013 at 2:19 AM Subject: [SDL] SDL 2.0 API stabilization To: A list for developers using the SDL library. (includes SDL-announce) s...@lists.libsdl.org We're on the road to release for SDL 2.0. To that end, most of the existing APIs are stable, and we'll only change them if it's critical. There are a few things which are still being considered, such as the iOS event handling, and touch/mouse event semantics, but by and large the API is set for release. Please report bugs which are affecting you in the current snapshot: http://www.libsdl.org/tmp/SDL-2.0.zip If anyone wants to fix anything currently in bugzilla, they are more than welcome: http://bugzilla.libsdl.org Cheers! --Sam ___ SDL mailing list s...@lists.libsdl.org http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Re: Fwd: [SDL] SDL 2.0 API stabilization
Although we should do Alien::SDL2 first. On Fri, Feb 22, 2013 at 1:54 PM, Kartik Thakore thakore.kar...@gmail.comwrote: pendant? On Fri, Feb 22, 2013 at 1:53 PM, Tobias Leich em...@froggs.de wrote: SDL2 is fine! I'll make the perl 6 pendant at some point... Kartik Thakore thakore.kar...@gmail.com hat geschrieben: SDL 2.0 API is STABLE! I will be working on getting libperl-sdl2 started. Any thoughts on name space? SDL2 seems more logical. Would there be any issues with perl for having a number in the package name? -- Forwarded -- From: Sam Lantinga slou...@libsdl.org Date: Mon, Feb 18, 2013 at 2:19 AM Subject: [SDL] SDL 2.0 API stabilization To: A list for developers using the SDL library. (includes SDL-announce) s...@lists.libsdl.org We're on the road to release for SDL 2.0. To that end, most of the existing APIs are stable, and we'll only change them if it's critical. There are a few things which are still being considered, such as the iOS event handling, and touch/mouse event semantics, but by and large the API is set for release. Please report bugs which are affecting you in the current snapshot: http://www.libsdl.org/tmp/SDL-2.0.zip If anyone wants to fix anything currently in bugzilla, they are more than welcome: http://bugzilla.libsdl.org Cheers! --Sam ___ SDL mailing list s...@lists.libsdl.org http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Re: install SDL fails for Strawberry Perl 5.16.2 x64
Can you paste the output? Thanks On Tue, Jan 8, 2013 at 5:32 AM, Dov Levenglick dov.levengl...@gmail.comwrote: Hi, When performing cpan install SDL The mixer_channelstest causes Perl to crash. בברכה | Best Regards, דוב לוונגליק | Dov Levenglick
Re: install SDL fails for Strawberry Perl 5.16.2 x64
What is the bug exactly? On Wed, Jan 9, 2013 at 10:55 AM, Tobias Leich em...@froggs.de wrote: Already solved via irc. Win7 with strawberry x64 is buggy, the x86 is fine. Cheers, Tobias Am 09.01.2013 16:41, schrieb Kartik Thakore: Can you paste the output? Thanks On Tue, Jan 8, 2013 at 5:32 AM, Dov Levenglick dov.levengl...@gmail.com wrote: Hi, When performing cpan install SDL The mixer_channelstest causes Perl to crash. בברכה | Best Regards, דוב לוונגליק | Dov Levenglick
Re: PDL image to SDL::Surface
Whats wrong with https://github.com/PerlGameDev/SDL_Manual/blob/master/code_listings/pdl.pl ? On Mon, Sep 24, 2012 at 12:36 PM, Chris Marshall devel.chm...@gmail.comwrote: Looking back through the code to the original SDL_Perl I found version 2.0.5 which allows one to actually create an SDL surface from pixel data. More recent versions appear to copy the data and as far as I can tell, there is no way to directly create an SDL surface from external data. If that is the case (that SDL_CreateRGBSurfaceFrom is not accessible from the perl API), have you implemented another approach to achieve this? Regards, Chris On Mon, Sep 24, 2012 at 12:07 PM, Chris Marshall devel.chm...@gmail.com wrote: On Mon, Sep 24, 2012 at 10:41 AM, Tobias Leich em...@froggs.de wrote: Hi Chris, The performance is poor of course. I tried to use the piddle's pointer (-dataref or so) but it looks like it is not pointing to a usable memory area. $piddle-get_dataref returns a scalar reference to a perl PV whose string content _is_ the data block. You should be able to get the starting location for the pixel data (i.e., the string) via SvPV. It looks like there are more than 4 bytes per pixel, and libSDL can't handle that. Per the above, the get_dataref returns an RV to an Sv with the data in the string. It is just a contiguous block of memory. As far as I know, all the SDL memory buffers are just contiguous blocks of memory (ignoring variations due to stride, alignment,...) The pdl.pl example is working, I see colored squares. I don't know what the output should look like. I'm cc-ing our PDL mailing list in the hopes that someone with access to both PDL and SDL can give it a try. Is there a cygwin install of SDL and libSDL? I think we should need to improve our examples btw, there is not a single comment, thats bad. In the pdl.pl is a var $ref, which is never used. Thats a bit confusing. I think the ref is from a previous iteration in the code trying to get things working. Speaking of documentation, do you have any on the actual perl-libSDL bindings an data structures? Trying to read XS is not the simplest way to sort things out--- especially since I am far for an expert on some of the tricky XS technologies. --Chris Cheers, Tobias Am 24.09.2012 16:09, schrieb Chris Marshall: I took a look at the gist and it looks reasonable (I can't run it because I don't have the SDL module and lib installed on my system), however... I would expect the performance to be *very* poor since the image data is essentially being converted from packed byte data to a perl list and then poked a byte at a time into the SDL surface data. The better approach would be to wrap a PDL object (a.k.a. piddle) into an SDL surface. Then you could just lock, copy the data via a PDL direct assignment, unlock and use SDL. There is an examples/pdl.pl that shows how to do the wrapping. BUT, I took a look at the xs code and it appears that your SDL_Surface objects no longer use a packed-string representation for the SDL surface data. If that is the case, I would be surprised if the pdl.pl example works at all now. If someone could verify this, I would appreciate it. If that is the case, it should be straightforward to modify the SDL_CreateRGBSurfaceFrom routine to allow for a SvPV for pixel data as one alternative. Given the power of PDL for whole-image data manipulation, allowing for easy interoperability with the current SDL module would benefit both our user and developer communities. Regards, Chris On Sun, Sep 23, 2012 at 3:07 PM, Tobias Leich em...@froggs.de wrote: Hi, Andrei asked some days ago how to load an image via PDL and but it in a Surface to use it in SDL. The example is here: https://gist.github.com/3772701 I'll put that in the examples folder too. Cheers, Tobias
Re: [Perldl] PDL image to SDL::Surface
Can you select a videodriver for SDL by exporting SDL_VIDEODRIVER either fbcon or x11 may fix this. If not then your SDL were not compiled with X11 libs. Install those. On Mon, Sep 24, 2012 at 6:36 PM, Sisyphus sisyph...@optusnet.com.au wrote: - Original Message - From: Chris Marshall devel.chm...@gmail.com To: Kartik Thakore thakore.kar...@gmail.com Cc: Tobias Leich em...@froggs.de; sdl-devel sdl-devel@perl.org Sent: Tuesday, September 25, 2012 2:46 AM Subject: Re: [Perldl] PDL image to SDL::Surface Hi Kartik- I don't have a working SDL module install that I could check things out on. Hi guys, Chris, 'cpan -fi SDL' should install SDL-2.54 on your SPP. (You need force because a couple of the SDL tests fail.) During the 'perl build.pl' stage of Alien::SDL you'll be prompted to select which library package to install. I took option 1 because it was RECOMMENDED, though option 2 is probably more recent. I've run the demo at https://gist.github.com/**3772701https://gist.github.com/3772701but that just produces: C:\_32\pscrpt\pdlperl pdl2surface.pl No available video device at C:/_32/strawberry516/perl/**site/lib/SDLx/App.pm line 123, DATA line 206. SDLx::App::new('SDLx::App', 'title', 'PDL and SDL aplication', 'width', 640, 'height', 640, 'eoq', 1, ...) called at pdl2surface.pl line 12 And same error for https://github.com/**PerlGameDev/SDL_Manual/blob/** master/code_listings/pdl.plhttps://github.com/PerlGameDev/SDL_Manual/blob/master/code_listings/pdl.pl I don't know what needs to be done in order that a video device becomes available. (I'm probably not the sharpest tool in the shed to be using for this ;-) Cheers, Rob
MonoGame review
Hey Garu. In my recent attempt at Zemmings I explored other open source modern frameworks. Have you seen MonoGame. https://github.com/mono/MonoGame/wiki/Tutorials It is an open source alt of XNA 4.0. Kartik Thakore
Re: Next release
Ok i will twiddle with it. Do you have a freebsd machine I can ssh too? Or a vmware image? On Aug 24, 2012 4:11 AM, em...@froggs.de wrote: Hi pals! In the last time we did, in my opinion, a big mistake. In test scripts we checked for libpng like: SDL::Config-has('png'). But this didnt ever returned true, Simply because the HAVE_PNG was only set when actually building that lib in SDL. (Note: not Alien::SDL) This -has() method works pretty fine for stuff like SDL_gfx, since it will return true if we found SDL_gfx*.h. But there was no check for png.h at this stage. So even if we found libpng in system dirs or when we build it on our own, -has('png') never returned true. I changed the tests so it checks now for libpng in the shlib-hash that we get from Alien::SDL. This hash contains all found/build libs, and their path. And why does it fail then? BSD. LibPNG needs libz to run. Normally you would think that libpng is actually linked against libz, but hey, the BSD ppl dont think that way. I dont know the reasons but they decided to somehow build libpng without linking against libz. when you do: ldd /path/to/libpng.so you will get all the dependencies printed as a list. This works pretty fine on most systems, like on our ubuntu's and what not. On OpemBSD it prints an error message that the lib cant be loaded. But if you do LD_PRELOAD_LIBS=/path/to/libz.**so ldd /path/to/libpng.so it will work. So we have to preload the lib in order libpng will use it. Doing this needs to happen on a very early level. Doing it from within a running perl is to late, even if we load libpng using DynaLoader. The only thing I can think about atm is that we run a perl, load that libz.so, and start a child perl process that does the stuff we do now. This problem applies to libpng (needs libz), libtiff (needs libjpeg) and libvorbis (needs libogg). Before YAPC::EU I was working hard on that thing, I guess I can supply a patch in a few days. Another problem that exists right now is that the old G4-Macs dont have a header file we want to use, I will debug that at some point. I dont think that there are so many users with a G4. These fails only come from BinGOs so far. And there are still SDL::Controller(::Interface) fails. But since I dont really understand whats happening there it would be cool if the author (you kathekore ;o) would have a look at it. So far from me, I will write a msg about the YAPC later. See ya and take care, Tobias Zitat von Kartik Thakore thakore.kar...@gmail.com: Awesome thanks. Kartik Thakore On 2012-08-23, at 9:40 PM, Jeffrey Palmer jeffrey.t.pal...@gmail.com wrote: Hi, I think the problem is TIFF support on BSD and Solaris, but FROGGS will know for sure. Jeff On Thu, Aug 23, 2012 at 8:49 PM, Kartik Thakore thakore.kar...@gmail.com **wrote: Hey guys, It looks like SDL lastest experimental has quite a few bit of fails. May I get a summary of what the fails are? Regards
Re: Next release
Cool no rush. On Fri, Aug 24, 2012 at 12:58 PM, Tobias Leich em...@froggs.de wrote: Hi, I tried exporting that machine from virtualbox, but it fails with a stupid errormessage that I dont understand. You cant access that box from internet, I'm sorry. I'll let you know when I got an export of that machine. Cheers. Am 24.08.2012 18:21, schrieb Kartik Thakore: Ok i will twiddle with it. Do you have a freebsd machine I can ssh too? Or a vmware image? On Aug 24, 2012 4:11 AM, em...@froggs.de wrote: Hi pals! In the last time we did, in my opinion, a big mistake. In test scripts we checked for libpng like: SDL::Config-has('png'). But this didnt ever returned true, Simply because the HAVE_PNG was only set when actually building that lib in SDL. (Note: not Alien::SDL) This -has() method works pretty fine for stuff like SDL_gfx, since it will return true if we found SDL_gfx*.h. But there was no check for png.h at this stage. So even if we found libpng in system dirs or when we build it on our own, -has('png') never returned true. I changed the tests so it checks now for libpng in the shlib-hash that we get from Alien::SDL. This hash contains all found/build libs, and their path. And why does it fail then? BSD. LibPNG needs libz to run. Normally you would think that libpng is actually linked against libz, but hey, the BSD ppl dont think that way. I dont know the reasons but they decided to somehow build libpng without linking against libz. when you do: ldd /path/to/libpng.so you will get all the dependencies printed as a list. This works pretty fine on most systems, like on our ubuntu's and what not. On OpemBSD it prints an error message that the lib cant be loaded. But if you do LD_PRELOAD_LIBS=/path/to/libz.so ldd /path/to/libpng.so it will work. So we have to preload the lib in order libpng will use it. Doing this needs to happen on a very early level. Doing it from within a running perl is to late, even if we load libpng using DynaLoader. The only thing I can think about atm is that we run a perl, load that libz.so, and start a child perl process that does the stuff we do now. This problem applies to libpng (needs libz), libtiff (needs libjpeg) and libvorbis (needs libogg). Before YAPC::EU I was working hard on that thing, I guess I can supply a patch in a few days. Another problem that exists right now is that the old G4-Macs dont have a header file we want to use, I will debug that at some point. I dont think that there are so many users with a G4. These fails only come from BinGOs so far. And there are still SDL::Controller(::Interface) fails. But since I dont really understand whats happening there it would be cool if the author (you kathekore ;o) would have a look at it. So far from me, I will write a msg about the YAPC later. See ya and take care, Tobias Zitat von Kartik Thakore thakore.kar...@gmail.com: Awesome thanks. Kartik Thakore On 2012-08-23, at 9:40 PM, Jeffrey Palmer jeffrey.t.pal...@gmail.com wrote: Hi, I think the problem is TIFF support on BSD and Solaris, but FROGGS will know for sure. Jeff On Thu, Aug 23, 2012 at 8:49 PM, Kartik Thakore thakore.kar...@gmail.comwrote: Hey guys, It looks like SDL lastest experimental has quite a few bit of fails. May I get a summary of what the fails are? Regards
Next release
Hey guys, It looks like SDL lastest experimental has quite a few bit of fails. May I get a summary of what the fails are? Regards
Re: Next release
Awesome thanks. Kartik Thakore On 2012-08-23, at 9:40 PM, Jeffrey Palmer jeffrey.t.pal...@gmail.com wrote: Hi, I think the problem is TIFF support on BSD and Solaris, but FROGGS will know for sure. Jeff On Thu, Aug 23, 2012 at 8:49 PM, Kartik Thakore thakore.kar...@gmail.comwrote: Hey guys, It looks like SDL lastest experimental has quite a few bit of fails. May I get a summary of what the fails are? Regards
Re: sdl-config file for Alien::SDL
It will be sdl-config -p Kartik Thakore On 2012-07-10, at 4:56 AM, Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯 da...@cpan.org wrote: sdl-config is already part of the package libSDL-devel. Name it alien-sdl-config or something.
Re: sdl-config file for Alien::SDL
Oops I meant 'sdl-config.pl' On Tue, Jul 10, 2012 at 4:34 PM, Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯 da...@cpan.org wrote: It will be sdl-config -p You can't do that. When Alien::SDL containing a {bin,script}/sdl-config is packaged as perl-Alien-SDL.rpm, this resulting /usr/bin/sdl-config conflicts with the already existing /usr/bin/sdl-config from libSDL-devel.rpm. You can disregard that advice, be prepared for packagers renaming the file (each distro differently) and a bug report each.
sdl-config file for Alien::SDL
Hey guys, I am proposing Alien::SDL makes sdl-config available as a script file. It would just print out config('libs') and etc. This way it makes it the same as using `sdl-config ...` in other XS projects. It is a pain to always to use Alien::SDL and so on. Regards
Re: CPAN Testers Daily Summary Report
Crap ... how did this happen? *facepalm* Ok lets re roll. On Thu, May 24, 2012 at 7:46 PM, Jeffrey Palmer jeffrey.t.pal...@gmail.comwrote: There were many changes in 2.538 that weren't in 2.537_02 (see attached diff). Was this intentional? I'm concerned that these might be responsible for the test failures. Should we revert to the previous release (plus the documentation fixes) and slowly add these changes in new dev releases or should we just work on fixing the new problems? Jeff On Wed, May 23, 2012 at 3:06 PM, Kartik Thakore thakore.kar...@gmail.comwrote: And we have some fails! SDL-2.538: - MSWin32-x64-multi-thread / 5.14.2: - FAIL http://www.cpantesters.org/cpan/report/26ee8b64-6bf6-1014-ad3c-44931eecb6a3 - x86_64-linux-thread-multi / 5.15.8: - FAIL http://www.cpantesters.org/cpan/report/5bd4ba90-a46b-11e1-a210-b03bf4b14d39 - x86_64-linux-thread-multi / 5.15.9: - FAIL http://www.cpantesters.org/cpan/report/a5aaaff4-a46a-11e1-8dfd-c832f4b14d39
Fwd: CPAN Testers Daily Summary Report
And we have some fails! SDL-2.538: - MSWin32-x64-multi-thread / 5.14.2: - FAIL http://www.cpantesters.org/cpan/report/26ee8b64-6bf6-1014-ad3c-44931eecb6a3 - x86_64-linux-thread-multi / 5.15.8: - FAIL http://www.cpantesters.org/cpan/report/5bd4ba90-a46b-11e1-a210-b03bf4b14d39 - x86_64-linux-thread-multi / 5.15.9: - FAIL http://www.cpantesters.org/cpan/report/a5aaaff4-a46a-11e1-8dfd-c832f4b14d39
SDL Perl experimental to master
Hey, We need to merge SDL experimental to master. Do you know which was the most latest stable release? Regards
Re: Help: with create a surface from my own RGBA data
Cool! Thats great. Can't wait to see the results. Be sure to do an update() based on the rect given. On Apr 5, 2012 4:04 PM, agraham agra...@g-b.net wrote: On 04/05/2012 06:02 PM, Tobias Leich wrote: Hi, do you know the pixel format of the data you have? Do you get scanlines that you wanna pass to an SDL::Surface? Or do you get just the whole image? May I invite you to irc? Would be much easier than mails... #sdl at irc.perl.org. Cheers, FROGGS Hi FROGGS, I was on IRC and got a lot of help, thank you. The data is RAW BGR/RGB or RGBA data from the network i.e. VNC rectangle packets. The problem I had was it was not obvious how to put this raw data into a surface so that it could be blitted. The solution (thanks to Scott Walters) was to get the get_pixels_ptr and fill the area of the surface directly as follows: $pixels_ptr=$surface-get_**pixels_ptr(); substr $$pixels_ptr, 0, length($data), $data; # $data=raw RGB data. I hope this information helps others. Albert
Fwd: [SDLx-Widget] SYNOPSIS-code doesn't work: missing font (#2)
Woops Begin forwarded message: *From:* Alex reply+i-2784720-7298c9ca04eb299d5d048ccbac880cc879c5ad67-21...@reply.github.com *Date:* 10 January, 2012 7:58:06 AM EST *To:* Kartik Thakore thakore.kar...@gmail.com *Subject:* *[SDLx-Widget] SYNOPSIS-code doesn't work: missing font (#2)* Hi! The code in SYNOPSIS does not work as it is, it dies with an error: Attribute (font) is required at menu.pl line 14 Here is some demo code: perl``` #!perl use strict; use warnings; use SDL; use SDLx::App; use SDLx::Widget::Menu; my $app = SDLx::App-new( title = 'Menu demo', exit_on_quit = 1, ); my $menu = SDLx::Widget::Menu-new-items( 'New Game' = \play, 'Options' = \settings, 'Quit' = \quit, ); $app-run(); exit(0); Maybe you can add default font support as it is done in SDLx::Font? hth, Alex --- Reply to this email directly or view it on GitHub: https://github.com/PerlGameDev/SDLx-Widget/issues/2
Re: Revamping SDL_Manual
On 2012-01-10, at 2:03 AM, Alexander Becker cap...@gmx.de wrote: Hi Kartik, I recently started working with the SDL Manual, but I don't have a game in mind. Regardless of that, I find it very useful to see the things you can do with SDL demonstrated with games. What I'm missing so far, and what is part of every game, too, is UI stuff. How do buttons work with SDL, how do you change the state of a button element (normal, active, hover, diabled, etc.) and how do you encapsulate such UI elements properly. Perhaps getting Agar working again in perl will help? Http://libagar.org/ Basically, I'm still experimenting to find a way to create a good button class for a menu. I know there is a package out there that provides methods for drawing menus, but especially when writing your own games / apps, I guess one might want to implement its own kind of menu with nifty nice effects, layout and so on. Hmm we would love it if you can provide feedback/issues on the SDLx::Widgets github site. So this is my idea: add a chapter on UI elements (not only buttons, but (high-score-tables, text fields etc.). Unfortunately, all I can add to this project so far (I'm still a SDL n00b) are possibly dumb questions. For example, I don't know how to adjust a text on a surface for a button. By adjusting, I mean something like aligning to the left or the right or automatically splitting the text up an breaking into a new line when a given with would be exceeded (I'm generating buttons with unknown text length, which is quite problematic). Seems like a good idea. Thanks. hth, Alex Kartik Original-Nachricht Datum: Mon, 9 Jan 2012 16:34:25 -0500 Von: Kartik Thakore thakore.kar...@gmail.com An: sdl-devel@perl.org, chromatic chroma...@wgz.org Betreff: Revamping SDL_Manual Hello guys, So as I have gotten busy over the last couple months with my startup and masters the SDL Manual has fell behind, and I would like to ask if anyone is interested in taking on writing new chapters or reorganizing SDL Manual. We can discuss any new chapters to add and work with reorganize it. An idea I have is to change the name to Perl Game Development and incorporate more then just SDL chapters into the manual. Any suggestions are welcome! Regards, Kartik -- NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie! Jetzt informieren: http://www.gmx.net/de/go/freephone
Re: SDLx::Text - replace old text?
But the surface is not an SDLx::Surface ... maybe we should change that at least on the text surface. I think that once you decide to rewrite on the text surface it should do that. How about we add $text-clear(); ? On Fri, Dec 23, 2011 at 2:37 PM, Jeffrey Palmer jeffrey.t.pal...@gmail.comwrote: Hi Alex, This is actually the correct behavior. You need to redraw the background before writing the new text. The easiest way to do that is with: $app-draw_rect( undef, 0x00FF ); The undef there indicates that the entire surface should be used as the rectangle. See draw_rect in SDLx::Surface for more information. Cheers, Jeff On Wed, Dec 21, 2011 at 6:17 PM, Alex cap...@gmx.de wrote: Dear all! I want to replace an SDLx::Text by some other text. Do I have to redraw the whole surface that was covered by the old text in order to replace it by a new text? The following script demonstrates my problem: [code] #!perl use strict; use warnings; use SDL; use SDL; use SDLx::App; use SDLx::Text; my $app = SDLx::App-new( exit_on_quit = 1, ); my $message = SDLx::Text-new; $message-write_to( $app, Hello, World! ); $app-update; $message-text('Susan'); $message-write_to( $app ); $app-update(); $app-run(); [/code] First, the text Hello World! is drawn to the surface. Then, I alter the text and draw it again. But the old hello world text still remains on the surface. I don't want that. I want Hello World! to disappear and Susan so show up. How do I do that? Best regards, Alex
Re: SDLx::Text - replace old text?
On Dec 23, 2011 2:43 PM, Jeffrey Palmer jeffrey.t.pal...@gmail.com wrote: I just realized this was discussed on Github, so you can probably ignore what I wrote. Regarding the surface, SDLx::App is a SDLx::Surface. That's what I was referring to. I don't think it's safe to make any assumptions about what's behind the text, so it should be the module user's responsibility to clear whatever is behind it. Hmm can we just not make the blit for clearing the text surface? Cause it wraps an sdl::surface. On Fri, Dec 23, 2011 at 2:39 PM, Kartik Thakore thakore.kar...@gmail.com wrote: But the surface is not an SDLx::Surface ... maybe we should change that at least on the text surface. I think that once you decide to rewrite on the text surface it should do that. How about we add $text-clear(); ? On Fri, Dec 23, 2011 at 2:37 PM, Jeffrey Palmer jeffrey.t.pal...@gmail.com wrote: Hi Alex, This is actually the correct behavior. You need to redraw the background before writing the new text. The easiest way to do that is with: $app-draw_rect( undef, 0x00FF ); The undef there indicates that the entire surface should be used as the rectangle. See draw_rect in SDLx::Surface for more information. Cheers, Jeff On Wed, Dec 21, 2011 at 6:17 PM, Alex cap...@gmx.de wrote: Dear all! I want to replace an SDLx::Text by some other text. Do I have to redraw the whole surface that was covered by the old text in order to replace it by a new text? The following script demonstrates my problem: [code] #!perl use strict; use warnings; use SDL; use SDL; use SDLx::App; use SDLx::Text; my $app = SDLx::App-new( exit_on_quit = 1, ); my $message = SDLx::Text-new; $message-write_to( $app, Hello, World! ); $app-update; $message-text('Susan'); $message-write_to( $app ); $app-update(); $app-run(); [/code] First, the text Hello World! is drawn to the surface. Then, I alter the text and draw it again. But the old hello world text still remains on the surface. I don't want that. I want Hello World! to disappear and Susan so show up. How do I do that? Best regards, Alex -- Jeffrey T. Palmer
Re: Button-Binding
Is there a framework to resolve location of events better? Sent from my iPhone On 2011-12-16, at 11:48 AM, Leich Tobias tobias.le...@telent.de wrote: Hi, for b) Add an event listener like this http://sdl.perl.org/SDL-Events.html#SYNOPSIS and call the tk-callback when receiving the right event. (SDL_MOUSEBUTTONUP I suppose) Cheers, FROGGS mit freundlichen Grüßen Tobias Leich Entwicklung ICT telent GmbH - ein Unternehmen der euromicron Gruppe Rheinstraße 10B, D-14513 Teltow Tel.: +49-(0)3328 4590-512 Fax.: +49-(0)3328 4590-55 512 Mobil: +49-(0)152 579 39 064 E-Mail: tobias.le...@telent.demailto:tobias.le...@telent.de Internet: www.telent.dehttp://www.telent.de telent GmbH - ein Unternehmen der euomicron Gruppe, Sitz Backnang; Registergericht: Amtsgericht Stuttgart, HRB 738199 Geschäftsführung: Dr. Stefan Kindt, Hans-Peter Fischer, Robert Blum, Alexander Thome Am 09.12.2011 22:00, schrieb Alex: Deal all! I continue my experiments with SDL. I found some old thread somewhere and now I have a button-like image that switches its appearance when I hover over it (with the mouse). Here are the questions: a) Is the code attached the recommended way to do it or should it be done in another fashion? b) I would like to add an action, when someone clicks the button. In Tk-terminology, this would be a callback. Any suggestions on how I should do this? Best regards, Alex [code] #!perl package My::SimpleButton; use strict; use warnings; use SDL; use SDLx::Rect; use Data::Dumper qw/Dumper/; =head1 =cut sub new { my ($class,@params) = @_; my $self = {}; bless($self,$class); for(qw(ID APP X Y IMG IMGHV IMGPRESSED)){ $self-{$_} = shift(@params); } $self-{HV} = 0; $self-draw($self-{IMG}); return($self); } sub draw{ my ($self, $img) = @_; my $frame_rect = SDLx::Rect-new(0, 0, $img-width(), $img-height()); my $dest_rect = SDLx::Rect-new( $self-{X}, $self-{Y}, $img-width(), $img-height(), ); $self-{APP}-blit_by($img, [0, 0, $img-width(), $img-height()], [ $self-{X}, $self-{Y}, $img-width(), $img-height(), ]); $self-{APP}-update(); return 1; } sub check{ my ($self,$mx,$my,$event) = @_; my $img = $self-{IMG}; #Hover - Effekt if( $mx $self-{X} $mx ($self-{X}+ $img-width) $my $self-{Y} $my ($self-{Y}+ $img-height) ){ if( !$self-{HV} ) { $self-{HV} = 1; $self-draw($self-{IMGHV}); } } else { if($self-{HV}) { $self-{HV}=0; $self-draw($self-{IMG}); } return 0; } return; } =head1 CREDITS c.f. Lhttp://www.perl-community.de/bat/poard/thread/7847http://www.perl-community.de/bat/poard/thread/7847 =cut 1; # /My::SimpleButton use SDL; use SDLx::App; use SDL::Event; use SDL::Events; use SDLx::Surface; use SDL::Color; my $app = SDLx::App-new( w = 640, h = 400, exit_on_quit = 1, ); $app-add_event_handler( \quit_event ); $app-add_event_handler( \mnouseover ); my $img = SDLx::Surface-load( 'images/blueOpera_1.png' ); my $img2 = SDLx::Surface-load( 'images/blueOpera_2.png' ); my $img3 = SDLx::Surface-load( 'images/redOpera_2.png' ); my $SimpleButton = My::SimpleButton-new(1, $app, 65, 25, $img, $img2, $img3); $app-run(); sub quit_event { #The callback is provided a SDL::Event to use my $event = shift; #Each event handler also returns you back the Controller call it my $controller = shift; #Stopping the controller for us will exit $app-run() for us $controller-stop if $event-type == SDL_QUIT; } # /quit_event sub mnouseover { #The callback is provided a SDL::Event to use my $event = shift; #Each event handler also returns you back the Controller call it my $controller = shift; if( $event-type == SDL_MOUSEMOTION ) { my $click = $SimpleButton-check($event-motion_x, $event-motion_y,$event); } } # /mnouseover exit(0); [/code] Scanned by MailDefender - managed email security from intY - www.maildefender.net
Re: How to draw image sections
On 2011-12-05, at 4:51 PM, Alex cap...@gmx.de wrote: Dear all! I would like to draw a menu like the one in the game TRAUMA (cf. http://images.netzwelt.de/thumb/27/2011/4322/32288-test-trauma.jpg no, I don't want to code a game). So, it's basically 4 picture slides in a row. For testing purposes, I assume my window to be 640x400. Each of the 4 pics should have 160 x 400 px. I need to load each one of the 4 images and blit them to the surface. How do I do that? Here is what I got so far and I don't see anything else than a black screen with 640 x 400 pixels :-s [code] #!perl use strict; use warnings; use utf8; use Data::Dumper qw/Dumper/; use SDL; use SDLx::Surface; use SDL::Event; use SDL::Events; use SDLx::App; use SDL::Image; # create our main screen my $app = SDLx::App-new( w = 640, h = 400, exit_on_quit = 1, dt = 0.2, title = 'SDLx Menu' ); $app-update(); # make it black my $some_jpg_file = 'images/1-0d5ff539c7a3d166.jpg'; my $image = SDL::Image::load( $some_jpg_file ); $app-blit_by( $image, [0, 0, 160, 400], ); $app-blit(); $app-run(); # -- Cleanup. exit(0); [/code] And, is it possible to extract a picture section from the image loaded? In case the app is loaded with 4:3 aspect ratio, I would like to snip a bit of the images at the left and the right, so that the pictures fit in without the need of black bars at the top and the bottom of the screen. Yup this is possible. Make a smaller SDLx::Surface of the final snipped image, blit_by the original image with the right offset. Best regards, Alex
Re: How to play an mp3 file from a database
Thanks froggs. Sent from my iPhone On 2011-12-01, at 5:25 AM, Tobias Leich em...@froggs.de wrote: Great! So I will add RWOps support today, I'll drop you a note when its done. Cheers, FROGGS Am 30.11.2011 23:09, schrieb Alexander Becker: Hi! The example code in your link gives me version 1.2.11 on Win 7 x64 with strawberry perl 5.12.2 built for MSWin32-x64-multi-thread. HTH, Alex [code] use SDL::Mixer; use SDL::Version; my $version = SDL::Mixer::linked_version(); printf(%d.%d.%d\n, $version-major, $version-minor, $version-patch); # prints 1.2.11 for me [/code] -Ursprüngliche Nachricht- Von: Tobias Leich [mailto:em...@froggs.de] Gesendet: Mittwoch, 30. November 2011 13:18 An: Alexander Becker Cc: 'breno'; sdl-devel@perl.org Betreff: Re: How to play an mp3 file from a database Hi, can you please check what version of libSDL_mixer do you have installed? http://sdl.perl.org/SDL-Mixer.html#linked_version In case you have 1.2.7 or better we can add support for RWOps objects. So you dont need temp files. Cheers, FROGGS Am 29.11.2011 20:37, schrieb Alexander Becker: Hi breno, thank you for the quick response. It helped. I had a look into mixer_samples.t and line 106 states, that quick_load_WAV is not (yet? Who do I have to bribe with what to get it?) implemented. Here is a working piece of code using temporary files. Of course, you need a database containing audio files. Best regards, Alex [code] #!perl use strict; use warnings; use utf8; use DBI; use SQL::Abstract::Limit; use File::Temp; use SDL; use SDL::Audio; use SDL::Mixer; use SDL::Mixer::Samples; use SDL::Mixer::Channels; use SDL::Mixer::Music; SDL::init(SDL_INIT_AUDIO); SDL::Mixer::init( MIX_INIT_MP3 | MUS_MP3 ); unless( SDL::Mixer::open_audio( 44100, AUDIO_S16SYS, 2, 4096 ) == 0 ) { Carp::croak Cannot open audio: .SDL::get_error(); } my $buffer = get_audio_buffer(); # -- write audio buffer to temp file my $fh = File::Temp-new( UNLINK = 1, SUFFIX = '.mp3' ); $fh-unlink_on_destroy( 1 ); print $fh $buffer; my $fname = $fh-filename; # close the handle or the temfile will have some sort of lock on it and cannot be read $fh-close(); my $background_music = SDL::Mixer::Music::load_MUS( $fname ); unless( $background_music ) { Carp::croak Cannot load music file [buffer from DB]: . SDL::get_error(); } SDL::Mixer::Music::play_music( $background_music,0 ); sleep(6); SDL::Mixer::Music::halt_music(); SDL::Mixer::close_audio; exit(0); sub get_audio_buffer { my $sql = SQL::Abstract::Limit-new( limit_dialect = 'LimitXY' );; my $table = 'audio_files'; my @fields = (qw/audio/); my %where = ( id = 2, ); my @order = (); my $limit = 1; my $offset = 0; my ( $stmt, @bind ) = $sql-select( $table, \@fields, \%where, \@order, $limit, $offset ); my $database = 'database_name'; my $db_host = 'your_host'; my $db_port = '3306'; my $dsn = DBI:mysql:database=$database;host=$db_host;port=$db_port; my $username = 'username'; my $password = 'password'; my $dbh = DBI-connect($dsn, $username, $password) or die('Cannot connect to DB: ' . DBI-errstr()); my $sth = $dbh-prepare( $stmt ); $sth-execute( @bind ); my ($buffer) = $sth-fetchrow_array(); return $buffer; } # /get_audio_buffer [/code] -Ursprüngliche Nachricht- Von: breno [mailto:oainikus...@gmail.com] Gesendet: Dienstag, 29. November 2011 06:34 An: Alexander Becker Cc: sdl-devel@perl.org Betreff: Re: How to play an mp3 file from a database On Mon, Nov 28, 2011 at 8:13 PM, Alexander Becker wrote: Dear all! Hi there! I just tried the example code of the SDL Manual where you play some music. By the SDL manual, I refer to the one that is hidden at the bottom of the sdl.perl.org page, so that you really have to search for it in order to find it - and even then you have to get along with an ugly github interface. There's a new project website under way, but we're missing people to work in it. Please join #sdl in irc.perl.org if you want to help us get it right :) So, in general: Is there a way to play mp3 files? Yup. If your libsdl was compiled with mp3 support, all you have to do (iirc) is set the MIX_INIT_MP3 (for effects) and MUS_MP3 (for audio) flags when you call SDL::Mixer::init(): SDL::Mixer::init( MIX_INIT_MP3 | MUS_MP3 ); then use load_MUS() and play_music() from SDL::Mixer::Music to play mp3 files as background music, or load_WAV() from SDL::Mixer::Samples to play mp3 effects (yes, the function is named load_WAV() but plays different formats too if they're available). The documentation in SDL::Mixer, SDL::Mixer::Music and SDL::Mixer::Samples should be helpful, as some of the test files (t/mixer_music.t comes to mind). And in particular: is there a way to play mp3 files that are in a variable? Or do I have to work with temporary files? Not sure. I *think*
Re: SDL packaging team revival
Is there interest from the games team to push and work on SDL packages? Or would it get lost in a larger sea of packages to maintain. Additionally, I feel SDL is not necessarily only games related. On Nov 21, 2011 3:11 AM, Paul Wise p...@debian.org wrote: What happened to the idea of folding the SDL team into the games team? -- bye, pabs http://wiki.debian.org/PaulWise
Getting SDL on Debian [Update]
Hello Guys, Currently dod/dodathome ( in #sdl) has shown interest in getting SDL 2.534 onto Debian, however we are currently blocked by an issue in PangZero a game that depends on SDLperl on Debian. We have been working on updating the pangzero code to use the new SDL here: https://github.com/kthakore/pangzero We have one last bug to fix and it is basically a blitting problem for the bottom of the screen. It is fairly obvious if you run the current pangzero with the debian version. Any help would be great! In the meantime we are getting closer to getting SDL on Debian. Which has been a great milestone for the SDL Perl project for over a year now. Regards!
RE: Offer to take over sdlperl package
Hi Dominique, As I have mentioned before we have already ported frozen-bubble over to use the new SDL perl bindings. You will find the necessary repositories at http://github.com/PerlGameDev Thank you for your interest. -- Kartik Thakore thakore.kar...@gmail.com
Re: Perl OpenGL Project
Hi Chris, I am interested in helping out! Any bugs I can tackle I will take. I am also hoping to look at using some of the P5NCI optimizations chromatic was talking about but I will wait for a while and learn the code base so far. P.S. It would be appreciated if you CC'd the sdl-devel@perl.org list. We have several ppl on that list that are interested in this project Kartik On Sun, 2011-07-03 at 14:25 -0400, chm wrote: Announcing the new Perl OpenGL project site at sourceforge.net. A read-only git access is at git://pogl.git.sourceforge.net/gitroot/pogl/pogl I plan on updating the plan going forward but the immediate goals are: (1) Continue work with Dmitry Karasik to resolve win32 and cygwin build issues for his new Prima::OpenGL module at http://github.com/dk/Prima-OpenGL (2) Refactor the perl API bindings to OpenGL to use GLEW rather than rolling our own. That should allow for an immediate bump in OpenGL support to version 4.x. (3) Refactor the GUI/system inteface in OpenGL to be more platform *and* GUI toolkit portable. The current FreeGLUT default is very portable but abstracting the needed interface should allow it to be provided by *any* GUI library. This is already getting started (surprisingly quickly) in #1. (4) Replace platform OpenGL library detection in the Makefile.PL by an Alien::OpenGL or such approach. Maybe Alien::GLEW would be better here. (5) Move from EU::MM to Module::Build to reduce platform specific shell and make issues. If you are interested in participating, please contact me via email or through the sf.net project page links at http://sourceforge.net/projects/pogl/develop Thanks! Chris -- Kartik Thakore thakore.kar...@gmail.com
PerlGameDev Annonces, Aftermath YAPC::NA
technology for doing OpenGL context/display lists better. Can you mention it again chip? I seem to have forgotten it. The hope will be to make a declarative for OpenGL constructs that can be sent straight to the hardware. Adam Kennedy has some work start in this area (OpenGL::List). Regards, -- Kartik Thakore kthak...@cpan.org
Re: PerlGameDev Annonces, Aftermath YAPC::NA
Oh this is some great stuff too! This will help me with another problem I have (CUDA and OpenCL), Thanks. On Fri, 2011-07-01 at 16:40 -0700, Reverend Chip wrote: On 7/1/2011 2:26 PM, chromatic wrote: On Friday, July 01, 2011 at 10:58 am, Chip Salzenberg wrote: On 7/1/2011 7:24 AM, Kartik Thakore wrote: chip during my talk you mentioned some technology for doing OpenGL context/display lists better. Can you mention it again chip? I seem to have forgotten it. Hi! I was talking about tcc, the http://en.wikipedia.org/wiki/Tiny_C_Compiler . It's x86-specific but otherwise it seems like a convenient and really fast way to create structures defined by C. Are you suggesting an approach like Python's Weave or Cinpy? http://scipy.org/Weave http://www.cs.tut.fi/~ask/cinpy/ Yes, quite. The approach I had in mind was to build an XS file full of Perl - C thunks and then use the closure-over-dlfunc-pointer trick of P5NCI to avoid writing (and paying the cost of) hundreds of otherwise-identical XS wrappers. Ah, well, I had perhaps an incomplete understanding of the problem. I thought we needed to create complex data structures for some newer OpenGL calls, so I wanted to ease the difficulty of making complex C data structures from Perl. If, OTOH, the primary problem is exposing a very broad API from C to Perl, then yes, reusing XS wrappers is very good (reduced memory use, better cache coherency, blah blah). This is even one spot where a little AUTOLOAD magic would help memory usage even more. -- c -- Kartik Thakore thakore.kar...@gmail.com
Re: Problem with SDL::Perl
Hi, H Adam, It's been a week since I asked about this and No one has responded, Did I ask incorrectly or in the wrong mailing list? Apologies for that I normally don't see this mailing list. sdl-devel@perl.org is a better list for these things. Any help that could be provided would be appreciated. Absolutely, it seems that your Alien::SDL install had a bit of a hiccup. Can you paste your build text? $ cpan = fforce install Alien::SDL SDL Thanks, #-- Adam Fairbrother Help Desk Technician afairbrot...@sd73.bc.ca School District #73 - Adam Fairbrother afairbrot...@sd73.bc.ca wrote: Hi I'm having a bit of trouble getting a SDL::Perl running on a debian Lenny setup. I have SDL::Perl installed from CPAN. Alien::SDL installed from cpan with the option to build all dependencies and library's. When I was testing to get things working, my short test script would throw an error. The script and the error are below. I have libjpeg.so.8 built in the Alien SDL directory, but my guess is that SDL isn't correctly configured to pick up that library folder. I don't want to mess up the system SDL install incase something goes wrong, and I can't install libjpeg.so.8 from packages on Lenny, as there is no package for it. How do I have SDL recognize the library's provided by SDL::Alien, or what am I doing wrong? Thanks, Here is my script: #!/usr/bin/perl use 5.010; use strict; use warnings; use SDLx::App; use SDLx::Sprite; my $app = SDLx::App-new(height=1024,width=768); my $sprite = SDLx::Sprite-new(image='pic.jpg'); $sprite-draw($app); Here is the Error error loading image pic.jpg: Failed loading libjpeg.so.8: libjpeg.so.8: cannot open shared object file: No such file or directory at /usr/local/lib/perl/5.10.0/SDLx/Surface.pm line 188 SDLx::Surface::load('SDLx::Surface', 'pic.jpg') called at /usr/local/lib/perl/5.10.0/SDLx/Sprite.pm line 25 SDLx::Sprite::new('SDLx::Sprite', 'image', 'pic.jpg') called at ./slideshow.pl line 14 #-- Adam Fairbrother Help Desk Technician afairbrot...@sd73.bc.ca School District #73 -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- Kartik Thakore thakore.kar...@gmail.com
Re: Problem with SDL::Perl
Hmm that is all fine. Can I see your LD_LIBRARY_PATH? echo $LD_LIBRARY_PATH Are you still getting the problem btw cause the tests run fine. On Tue, 2011-06-14 at 09:47 -0700, Adam Fairbrother wrote: My bad, I guess I glossed by the sdl-devel@perl.org list when I was looking through. Here is a link to a file that contains the stdout from fforce install Alien::SDL SDL inside the cpan shell. If it's not the information you were looking for let me know and I can provide the correct info. http://dl.dropbox.com/u/949632/build.text #-- Adam Fairbrother Help Desk Technician afairbrot...@sd73.bc.ca School District #73 - Kartik Thakore thakore.kar...@gmail.com wrote: Hi, H Adam, It's been a week since I asked about this and No one has responded, Did I ask incorrectly or in the wrong mailing list? Apologies for that I normally don't see this mailing list. sdl-devel@perl.org is a better list for these things. Any help that could be provided would be appreciated. Absolutely, it seems that your Alien::SDL install had a bit of a hiccup. Can you paste your build text? $ cpan = fforce install Alien::SDL SDL Thanks, #-- Adam Fairbrother Help Desk Technician afairbrot...@sd73.bc.ca School District #73 - Adam Fairbrother afairbrot...@sd73.bc.ca wrote: Hi I'm having a bit of trouble getting a SDL::Perl running on a debian Lenny setup. I have SDL::Perl installed from CPAN. Alien::SDL installed from cpan with the option to build all dependencies and library's. When I was testing to get things working, my short test script would throw an error. The script and the error are below. I have libjpeg.so.8 built in the Alien SDL directory, but my guess is that SDL isn't correctly configured to pick up that library folder. I don't want to mess up the system SDL install incase something goes wrong, and I can't install libjpeg.so.8 from packages on Lenny, as there is no package for it. How do I have SDL recognize the library's provided by SDL::Alien, or what am I doing wrong? Thanks, Here is my script: #!/usr/bin/perl use 5.010; use strict; use warnings; use SDLx::App; use SDLx::Sprite; my $app = SDLx::App-new(height=1024,width=768); my $sprite = SDLx::Sprite-new(image='pic.jpg'); $sprite-draw($app); Here is the Error error loading image pic.jpg: Failed loading libjpeg.so.8: libjpeg.so.8: cannot open shared object file: No such file or directory at /usr/local/lib/perl/5.10.0/SDLx/Surface.pm line 188 SDLx::Surface::load('SDLx::Surface', 'pic.jpg') called at /usr/local/lib/perl/5.10.0/SDLx/Sprite.pm line 25 SDLx::Sprite::new('SDLx::Sprite', 'image', 'pic.jpg') called at ./slideshow.pl line 14 #-- Adam Fairbrother Help Desk Technician afairbrot...@sd73.bc.ca School District #73 -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- Kartik Thakore thakore.kar...@gmail.com -- Kartik Thakore thakore.kar...@gmail.com
Re: AW: Problem with SDL::Perl
Oh yeah you are right. Why is that happening? On Tue, 2011-06-14 at 22:56 +0200, Tobias Leich wrote: Its not looking good imo. See, its just installing libjpeg.la, not libjpeg.so.8 ... -Ursprüngliche Nachricht- Von: Kartik Thakore [mailto:thakore.kar...@gmail.com] Gesendet: Dienstag, 14. Juni 2011 22:19 An: Adam Fairbrother Cc: beginn...@perl.org; sdl-devel Betreff: Re: Problem with SDL::Perl Hmm that is all fine. Can I see your LD_LIBRARY_PATH? echo $LD_LIBRARY_PATH Are you still getting the problem btw cause the tests run fine. On Tue, 2011-06-14 at 09:47 -0700, Adam Fairbrother wrote: My bad, I guess I glossed by the sdl-devel@perl.org list when I was looking through. Here is a link to a file that contains the stdout from fforce install Alien::SDL SDL inside the cpan shell. If it's not the information you were looking for let me know and I can provide the correct info. http://dl.dropbox.com/u/949632/build.text #-- Adam Fairbrother Help Desk Technician afairbrot...@sd73.bc.ca School District #73 - Kartik Thakore thakore.kar...@gmail.com wrote: Hi, H Adam, It's been a week since I asked about this and No one has responded, Did I ask incorrectly or in the wrong mailing list? Apologies for that I normally don't see this mailing list. sdl-devel@perl.org is a better list for these things. Any help that could be provided would be appreciated. Absolutely, it seems that your Alien::SDL install had a bit of a hiccup. Can you paste your build text? $ cpan = fforce install Alien::SDL SDL Thanks, #-- Adam Fairbrother Help Desk Technician afairbrot...@sd73.bc.ca School District #73 - Adam Fairbrother afairbrot...@sd73.bc.ca wrote: Hi I'm having a bit of trouble getting a SDL::Perl running on a debian Lenny setup. I have SDL::Perl installed from CPAN. Alien::SDL installed from cpan with the option to build all dependencies and library's. When I was testing to get things working, my short test script would throw an error. The script and the error are below. I have libjpeg.so.8 built in the Alien SDL directory, but my guess is that SDL isn't correctly configured to pick up that library folder. I don't want to mess up the system SDL install incase something goes wrong, and I can't install libjpeg.so.8 from packages on Lenny, as there is no package for it. How do I have SDL recognize the library's provided by SDL::Alien, or what am I doing wrong? Thanks, Here is my script: #!/usr/bin/perl use 5.010; use strict; use warnings; use SDLx::App; use SDLx::Sprite; my $app = SDLx::App-new(height=1024,width=768); my $sprite = SDLx::Sprite-new(image='pic.jpg'); $sprite-draw($app); Here is the Error error loading image pic.jpg: Failed loading libjpeg.so.8: libjpeg.so.8: cannot open shared object file: No such file or directory at /usr/local/lib/perl/5.10.0/SDLx/Surface.pm line 188 SDLx::Surface::load('SDLx::Surface', 'pic.jpg') called at /usr/local/lib/perl/5.10.0/SDLx/Sprite.pm line 25 SDLx::Sprite::new('SDLx::Sprite', 'image', 'pic.jpg') called at ./slideshow.pl line 14 #-- Adam Fairbrother Help Desk Technician afairbrot...@sd73.bc.ca School District #73 -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- Kartik Thakore thakore.kar...@gmail.com -- Kartik Thakore thakore.kar...@gmail.com
Re: Problem with SDL::Perl
Adam what distro are you on? On Tue, 2011-06-14 at 13:54 -0700, Adam Fairbrother wrote: $LD_LIBRARY_PATH was unset. I set it manually to the SDL Libs folder, and the error no longer happens. My test picture dosn't show up, but I think that's an issue I can hack through myself. Thanks you for all the help with this. #-- Adam Fairbrother Help Desk Technician afairbrot...@sd73.bc.ca School District #73 - Kartik Thakore thakore.kar...@gmail.com wrote: Hmm that is all fine. Can I see your LD_LIBRARY_PATH? echo $LD_LIBRARY_PATH Are you still getting the problem btw cause the tests run fine. On Tue, 2011-06-14 at 09:47 -0700, Adam Fairbrother wrote: My bad, I guess I glossed by the sdl-devel@perl.org list when I was looking through. Here is a link to a file that contains the stdout from fforce install Alien::SDL SDL inside the cpan shell. If it's not the information you were looking for let me know and I can provide the correct info. http://dl.dropbox.com/u/949632/build.text #-- Adam Fairbrother Help Desk Technician afairbrot...@sd73.bc.ca School District #73 - Kartik Thakore thakore.kar...@gmail.com wrote: Hi, H Adam, It's been a week since I asked about this and No one has responded, Did I ask incorrectly or in the wrong mailing list? Apologies for that I normally don't see this mailing list. sdl-devel@perl.org is a better list for these things. Any help that could be provided would be appreciated. Absolutely, it seems that your Alien::SDL install had a bit of a hiccup. Can you paste your build text? $ cpan = fforce install Alien::SDL SDL Thanks, #-- Adam Fairbrother Help Desk Technician afairbrot...@sd73.bc.ca School District #73 - Adam Fairbrother afairbrot...@sd73.bc.ca wrote: Hi I'm having a bit of trouble getting a SDL::Perl running on a debian Lenny setup. I have SDL::Perl installed from CPAN. Alien::SDL installed from cpan with the option to build all dependencies and library's. When I was testing to get things working, my short test script would throw an error. The script and the error are below. I have libjpeg.so.8 built in the Alien SDL directory, but my guess is that SDL isn't correctly configured to pick up that library folder. I don't want to mess up the system SDL install incase something goes wrong, and I can't install libjpeg.so.8 from packages on Lenny, as there is no package for it. How do I have SDL recognize the library's provided by SDL::Alien, or what am I doing wrong? Thanks, Here is my script: #!/usr/bin/perl use 5.010; use strict; use warnings; use SDLx::App; use SDLx::Sprite; my $app = SDLx::App-new(height=1024,width=768); my $sprite = SDLx::Sprite-new(image='pic.jpg'); $sprite-draw($app); Here is the Error error loading image pic.jpg: Failed loading libjpeg.so.8: libjpeg.so.8: cannot open shared object file: No such file or directory at /usr/local/lib/perl/5.10.0/SDLx/Surface.pm line 188 SDLx::Surface::load('SDLx::Surface', 'pic.jpg') called at /usr/local/lib/perl/5.10.0/SDLx/Sprite.pm line 25 SDLx::Sprite::new('SDLx::Sprite', 'image', 'pic.jpg') called at ./slideshow.pl line 14 #-- Adam Fairbrother Help Desk Technician afairbrot...@sd73.bc.ca School District #73 -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- Kartik Thakore thakore.kar...@gmail.com -- Kartik Thakore thakore.kar...@gmail.com -- Kartik Thakore thakore.kar...@gmail.com
Re: SDL Perl Game Contest - week 1 roundup
On 2011-03-08, at 4:36 AM, Thomas Klausner d...@cpan.org wrote: Hi! Hi Domm, On Tue, Mar 08, 2011 at 06:00:24AM -0300, breno wrote: So far we had some awesome entries - people really stood up to the challenge! Check them out: And where can I get those games from? :-) http://yapgh.blogspot.com First post links straight to the game repos. PS: I tried to convert my old SpaceInvader hack from YAPC::Europe 2008 to SDLx-stuff (during Dutch Perl Workshop last weekend, and on my train journey back..), but I had some problems. Perhaps the SDL_Manual can help? http://sdl.perl.org has a link for it. I'll post them later (now at work), but do you prefere mailing list posts or blog posts? I guess blog posts are more visible, so I was planning a blog post, but than blogs aren't the greatest medium for detailed technical discussions etc. Any opinions? Either are fine. But both are preferred, especially if a summarized and in-depth retrospective of mailing list discussions are done on blog post. Greetings, domm Hola -- #!/usr/bin/perl http://domm.plix.at for(ref bless{},just'another'perl'hacker){s-:+-$-gprint$_.$/}
Re: SDL Perl
SDLx::Text is experimental, but I will get garu (the author) to handle UTF8 in it. Kartik Thakore On 2011-02-22, at 7:57 AM, Roman V. Nikolaev rsha...@rambler.ru wrote: Hi! I am Perl developer Roman V. Nikolaev.I try to make my first tower defence style game. I use latest SDL 2.530 from CPAN and see you use render_text_blended in SDLx::Text module. How about use utf8 functions (like render_utf8_blended). It`s really important for me. Thank you. Good job! -- Roman V. Nikolaev mail:rsha...@rambler.ru jabber: rsha...@jabber.org icq: 198-364-657 site:http://www.rshadow.ru
Re: SDL Manual Correction
Done at http://bit.ly/i0j3mc Thanks. On Sun, 2011-01-02 at 21:42 -0500, Sheppy R wrote: I remembered encountering an issue the first go through the manual, but wasn't really aware of the community at that time. I'm going back through the most recent version and came across the following 'typo'. I don't know why, but Im inclined to blame garu. pg. 33 - Remove the 'my' in line 51. $brush_color is a global variable. 51 my $brush_color = $key_name if $key_name =~ /^nd$/; The program will run, but the user will not be able to change the brush color as long as 'my' is in there.
Grant Updates
Hello, As you know I have received a TPF grant to write a SDL Perl Manual. http://news.perlfoundation.org/2010/08/2010q3-grant-proposal-manual-f.html http://news.perlfoundation.org/2010/08/accepted-grants-for-2010q3.html I have been a bit busy with that and not been able to update the mailing list. Anyway here is the latest Grant Update. Also these updates where also posted on http://news.perlfoundation.org/ REPORT 3: November 2010 This is the progress so far: - SDL 2.523 Releases: - Adds stability and better memory management for the game loop - 2 chapters have been completed - Pong Chapter (Contributed by garu) - Additional Modules - 1 extra chapter has been added - Puzz(le) Chapter (Contributed by Blaizer) - 2 Chapters are in the Works - Tetris Code has been mostly done (contributed by FROGGS) - Needs to be fixed - Needs write up - Sound and Music Effects code is done - Needs to be fixed - Needs write up Our work can be seen at: http://sdlperl.ath.cx/releases/SDL_Manual.pdf http://sdlperl.ath.cx/releases/SDL_Manual.html http://github.com/PerlGameDev/SDL_Manual regards, Kartik Thakore
[Fwd: Re: How badly does my SDLx::App code suck?]
Apologies I sent the wrong file out. -- Kartik Thakore thakore.kar...@gmail.com ---BeginMessage--- SDLx::* is still in the stages of being too slow to use. We have not optimized the SDLx::Validate in it. You can mix with SDL::* to improve your performance, if you are confident of the validation. Another things you can do is keep track of what 'LED' changes, and only update that rect. SDL::Video::update_rects( ( SDL::Rect-new(x,y,w,h), ); I have attached an updated script. Regards, Kartik Thakore On Tue, 2010-10-12 at 10:56 -0400, Andy Walker wrote: So, my intent here was to simulate the behavior of a planned array of LED light circuits. Simply, the idea was that each one would occasionally randomly decide to change its color to a random RGB value. This would then propogate a 'front' of sorts that could potentially interact with other fronts in strange and interesting ways. This basically works. The problem is that it seems kind of slow. This is a result, no doubt of my only burgeoning understanding of SDL and the Perl bindings. As you can probably see, it's based off of the game of life example in that it uses draw_rect to make a grid of objects across an SDLx::App surface. Basically it iterates over a 2D array of datastructures representing each element and renders it. Is there a better/faster way to be rendering this? Should I be blitting? What aspects could be slowing it down significantly? A cursory examination with NYTProf revealed that, unsurprisingly, a lot of time is being spent in draw_rect, though, interestingly, the highest amount of time is in its call to SDLx::Validate::_color_arrayref. Does this mean using an approach like this: unpack ('I', pack ('C*', int rand... to color randomization and comparison would be better, or would validation still take up a sizable amount of time? I'm still learning and trying to piece together the right way to do things from disparate examples, but it's a little difficult, so I thought I'd ask here. Please feel free to comment / criticize at length. -A -- Kartik Thakore thakore.kar...@gmail.com gridtest.pl Description: Perl program ---End Message--- gridtest.pl Description: Perl program
Re: Packaging SDL_perl 2.5*, and frozen-bubble for Debian Experimental
Ok but ... how do I get an experimental package made and uploaded? On Sat, 2010-09-25 at 13:40 +0800, Paul Wise wrote: On Mon, Aug 16, 2010 at 6:47 PM, Kartik Thakore thakore.kar...@gmail.com wrote: On 2010-08-16, at 3:56 AM, Josselin Mouette j...@debian.org wrote: No problem with uploading this version to experimental. How does it get uploaded? A Debian Developer, such as Josselin, builds signs and uploads it to the Debian archive. NMU? I don't know what that means. Non-maintainer upload. http://wiki.debian.org/NonMaintainerUpload -- Kartik Thakore thakore.kar...@gmail.com
Hunting SDL 2.516 Interface bug on BSD platform
Hi Chris, I am trying to hunt down the following failures for SDL 2.516. Most of them seem to happen in your *bsd farms. May I get access to one of them to debug the code? If not can you force install and run gdb --args perl t/sdlx_interface.t gdb run and also run this gdb --args perl script.pl gdb run Where script.pl is attached to this email. Thank you very much Kartik Thakore On Thu, 2010-09-23 at 02:08 +, CPAN Tester Report Server wrote: Dear Kartik Thakore, Please find below the latest reports for your distributions, generated by CPAN Testers, from the last 24 hours. To set your preferences for what you wish to have reported in this Daily Summary, please visit the CPAN Testers Preferences system at https://prefs.cpantesters.org. SDL-2.516: - amd64-netbsd / 5.10.0: - FAIL http://www.cpantesters.org/cpan/report/c8815bd2-c612-11df-a192-193f4afd17af - amd64-netbsd / 5.10.1: - FAIL http://www.cpantesters.org/cpan/report/d9356bf6-c650-11df-a192-193f4afd17af - i386-freebsd / 5.12.0: - FAIL http://www.cpantesters.org/cpan/report/4dfcd040-c657-11df-8f8a-f8988fbefd91 - i386-freebsd / 5.12.1: - FAIL http://www.cpantesters.org/cpan/report/b850d2bc-c688-11df-8f8a-f8988fbefd91 If you have an issue with a particular report, or wish to gain further information from the tester, please use the 'Find A Tester' tool at http://stats.cpantesters.org/cpanmail.html, using the ID or GUID of the report, as listed above, to locate the correct email address. If you wish to unsubscribe from these notifications, please login to the CPAN Testers Preferences system, with your PAUSE credentials, and disable CPAN Testers notifications permanently or temporarily. If you have problems with accessing the site, please contact Barbie bar...@cpan.org and request to be removed from the automatic mailings. Thanks, The CPAN Testers script.pl Description: Perl program
Re: Packaging SDL_perl 2.5*, and frozen-bubble for Debian Experimental
Thank you, Also I am just doing Reply-All, sorry if I messed up the CC. Regards, Kartik Thakore On Sun, 2010-09-26 at 10:57 +0800, Paul Wise wrote: On Sat, Sep 25, 2010 at 7:38 PM, Kartik Thakore thakore.kar...@gmail.com wrote: Ok but ... how do I get an experimental package made and uploaded? For the making part, either wait for Josselin to do it or do it yourself by going through the new upstream steps listed in maint-guide: http://www.debian.org/doc/maint-guide/ch-update.en.html#s-inspectnewupstream http://www.debian.org/doc/maint-guide/ch-update.en.html#s-newupstream For the uploading part, send a mail to Josselin asking him to build and upload. If he doesn't reply, you can mail debian-mentors and debian-devel-games and someone (probably me) will do it instead. -- Kartik Thakore thakore.kar...@gmail.com
Re: SDL 2.516 Tutorial::LunarLander Error
I will update that soon. Until then can you try http://sdlperl.ath.cx/releases/SDL_Manual.pdf Regards, Kartik Thakore On Mon, 2010-09-20 at 17:54 -0500, Pip Stuart wrote: Hi SDLPerl Homiez, I just tried to install SDL 2.516 from the CPAN onto my Ubuntu box I'm perplexed as the install process seemed to succeed but when I ran: [...@akua9kh0zq~/.tmp]perl -MSDL::Tutorial::LunarLander=lander.pl -e1 [-] created 'lander.pl' [-] created 'images' [-] created 'images/ship.jpg' [-] created 'images/background.jpg' [...@akua9kh0pf~/.tmp]perl lander.pl Can't call method w on an undefined value at lander.pl line 22. I also tried `perl -MSDL::Tutorial -e 1` a black window flashed on the screen kinda as expected `perl -MSDL::Tutorial::Animation=sdl_anim.pl -e 1` did properly animate the blue rectangle slow then fast. Any ideas why lander.pl line 19 SDL::Image::load('images/background.jpg'); would fail? Thanks in advance for any help. I want to get at least basic SDLPerl stuff working to learn from (if not FrozenBubble). Peace, -...@cpan -- Kartik Thakore thakore.kar...@gmail.com
Adding headers for building packages in Alien::SDL
How do I add a header check as a prereq for build packages? For MacOSX I want to add a check for X11/Xlib.h and X11/Xatom.h This test would then be NA and discarded. http://www.cpantesters.org/cpan/report/1a3cbc08-a1d5-11df-8246-59ba6e8696e0 Regards, Kartik
Re: SDL 2.503 Released!
Oh I didn't know you had perl 5.8 ... App::perlbrew would be a simple, non intrusive way of upgrading just. http://search.cpan.org/dist/App-perlbrew/ perlbrew init perlbrew install perl-5.12.1 -D=useithreads perlbrew switch perl-5.12.1 cpan/pip the stuff again. You can switch back to old perl with: perlswitch /usr/bin/perlbrew Kartik Thakore On 2010-07-28, at 6:19 PM, Pip Stuart pipstu...@gmail.com wrote: On Wed, Jul 28, 2010 at 14:40, Kartik Thakore thakore.kar...@gmail.com wrote: On 2010-07-28, at 2:03 PM, Pip Stuart pipstu...@gmail.com wrote: From Gentoo GNU/Linux, I unmerged my old dev-perl/sdl-perl-2.2.6 install, then manual Build install worked to have `perl -MSDL -e 'print $SDL::VERSION'` return 2.504. The libpath must've been misordering the versions favoring the distro vendor. Now I got warnings treated as errors with quickness I'm not sure why. `cpan Games::FrozenBubble`: ... cc1: warnings being treated as errors server/tools.c: In function 'reregister_server_if_needed': server/tools.c:189: error: ISO C90 forbids mixed declarations and code error building server/tools.o from 'server/tools.c' at /usr/lib64/perl5/vendor_perl/5.8.8/ExtUtils/CBuilder/Base.pm line 115. KTHAKORE/Games-FrozenBubble-2.210.tar.gz What version of gcc do you have? I should probably make this portable. I will do this as soon as I get home. sys-devel/gcc version: 4.4.3-r2 Until the here is anothe game as a condolation prize :) . It was make in a couple of days during FISL by crazy brazilians. http://search.cpan.org/~garu/Games-Zumbis-0.01/lib/Games/Zumbis.pm cpan Games::Zumbis CPAN.pm: Going to build G/GA/GARU/Games-Zumbis-0.01.tar.gz ... /usr/bin/make -j3 -j3 -- OK Running make test Skip blib/lib/auto/share/dist/Games-Zumbis/dados/zumbi.png (unchanged) Skip blib/lib/auto/share/dist/Games-Zumbis/mapa.xsd (unchanged) Skip blib/lib/auto/share/dist/Games-Zumbis/mapas/mapa-de-teste-1.xml (unchanged) Skip blib/lib/auto/share/dist/Games-Zumbis/dados/AtariSmall.ttf (unchanged) Skip blib/lib/auto/share/dist/Games-Zumbis/mapas/ free_tileset_version_10.png (unchanged) Skip blib/lib/auto/share/dist/Games-Zumbis/dados/gameover.png (unchanged) Skip blib/lib/auto/share/dist/Games-Zumbis/dados/terrortrack.ogg (unchanged) Skip blib/lib/auto/share/dist/Games-Zumbis/dados/heroi.png (unchanged) Skip blib/lib/auto/share/dist/Games-Zumbis/dados/bullet.png (unchanged) Skip blib/lib/auto/share/dist/Games-Zumbis/dados/heroina.png (unchanged) Skip blib/lib/auto/share/dist/Games-Zumbis/dados/shot.ogg (unchanged) PERL_DL_NONLAZY=1 /usr/bin/perl5.8.8 -MExtUtils::Command::MM -e test_harness(0, 'blib/lib', 'blib/arch') t/*.t t/00-compile.t .. 1/7 Can't load '/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux/auto/SDL/Mixer/Music/ Music.so' for module SDL::Mixer::Music: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux/auto/SDL/Mixer/Music/ Music.so: undefined symbol: perl_clone at /usr/lib64/perl5/5.8.8/x86_64-linux/DynaLoader.pm line 230. at lib/Games/Zumbis/Audio.pm line 13 Compilation failed in require at lib/Games/Zumbis/Audio.pm line 13. BEGIN failed--compilation aborted at lib/Games/Zumbis/Audio.pm line 13. Compilation failed in require at -e line 1. # Failed test 'Games::Zumbis::Audio loaded ok' # at t/00-compile.t line 34. # '' # doesn't match '(?s-xim:^\s*Games::Zumbis::Audio ok)' procurando /home/pip/.cpan/build/Games-Zumbis-0.01-OsJV48/.. at lib/Games/Zumbis.pm line 18. t/00-compile.t .. 3/7 Can't load '/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux/auto/SDLx/Surface/ Surface.so' for module SDLx::Surface: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux/auto/SDLx/Surface/ Surface.so: undefined symbol: DPPP_my_newSV_type at /usr/lib64/perl5/5.8.8/x86_64-linux/DynaLoader.pm line 230. at lib/Games/Zumbis/TelaGameOver.pm line 9 Compilation failed in require at lib/Games/Zumbis/TelaGameOver.pm line 9. BEGIN failed--compilation aborted at lib/Games/Zumbis/ TelaGameOver.pm line 9. Compilation failed in require at -e line 1. t/00-compile.t .. 4/7 # Failed test 'Games::Zumbis::TelaGameOver loaded ok' # at t/00-compile.t line 34. # '' # doesn't match '(?s-xim:^\s*Games::Zumbis::TelaGameOver ok)' Perl v5.10.0 required--this is only v5.8.8, stopped at lib/Games/Zumbis/Tiro.pm line 5. BEGIN failed--compilation aborted at lib/Games/Zumbis/Tiro.pm line 5. Compilation failed in require at -e line 1. # Failed test 'Games::Zumbis::Tiro loaded ok' # at t/00-compile.t line 34. # '' # doesn't match '(?s-xim:^\s*Games::Zumbis::Tiro ok)' procurando /home/pip/.cpan/build/Games-Zumbis-0.01-OsJV48/.. at lib/Games/Zumbis.pm line 18. libpng warning: Application was compiled with png.h from libpng-1.4.3 libpng warning: Application is running with png.c from libpng-1.2.43 libpng error: Incompatible libpng version in application and library # Failed test 'zumbis script compiles' # at t/00-compile.t line 42. # 9 - Perl v5.10.0 required
Re: SDL 2.503 Released!
You should set the PERLBREW_ROOT before doing init. Sorry I should have mentioned it. rm -rf perl5 and that line from .bashrc. Kartik Thakore On 2010-07-29, at 12:48 AM, Pip Stuart pipstu...@gmail.com wrote: On Wed, Jul 28, 2010 at 15:25, Kartik Thakore thakore.kar...@gmail.com wrote: Oh I didn't know you had perl 5.8 ... App::perlbrew would be a simple, non intrusive way of upgrading just. OMG! I wish it were simple non-intrusive. ;) http://search.cpan.org/dist/App-perlbrew/ perlbrew init This command presumptuously created a perl5/perlbrew/* sub-dirs in my $HOME! IPERLBREW_ROO moved it to ~/.perlbrew/ instead then had to export to the latter. perlbrew install perl-5.12.1 -D=useithreads r...@ryua7snajl~perlbrew installed r...@ryua7snab2~perlbrew install perl-5.12.1 -D=useithreads Attempting to load conf from /home/pip/.perlbrew/Conf.pm Fetching perl-5.12.1 as /home/pip/.perlbrew/dists/perl-5.12.1.tar.gz Installing perl-5.12.1 into /home/pip/.perlbrew/perls/perl-5.12.1 This could take a while. You can run the following command on another shell to track the status: tail -f /home/pip/.perlbrew/build.log (cd /home/pip/.perlbrew/build; tar xzf /home/pip/.perlbrew/dists/perl-5.12.1.tar.gz;cd /home/pip/.perlbrew/build/perl-5.12.1;rm -f config.sh Policy.sh;sh Configure -de -Dprefix=/home/pip/.perlbrew/perls/perl-5.12.1 -Duseithreads;make;make test make install) '/home/pip/.perlbrew/build.log' 21 Installing perl-5.12.1 failed. See /home/pip/.perlbrew/build.log to see why. If you want to force install the distribution, try: perlbrew --force install perl r...@ryua7snb2g~tail -f .perlbrew/build.log gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now sh: line 0: cd: /home/pip/.perlbrew/build/perl-5.12.1: No such file or directory sh: Configure: No such file or directory make: *** No targets specified and no makefile found. Stop. make: *** No rule to make target `test'. Stop. r...@ryua7sndup~echo Yipes! perlbrew switch perl-5.12.1 cpan/pip the stuff again. You can switch back to old perl with: perlswitch /usr/bin/perlbrew Kartik Thakore -Pip
Re: SDL 2.503 Released!
On 2010-07-27, at 8:51 PM, Pip Stuart pipstu...@gmail.com wrote: Hi Kartik, Hi, Thanks for all the awesome SDLPerl work you've been doing. It's much appreciated. I'd like to get back into some SDLPerl hacking to help you test releases features. Earlier today, I tried to run `perl -MCPAN -e install SDL`, but it failed I was hoping you could please help me get it ( the Games::FrozenBubble beta) installed running, when you have time. Force install didn't work I'm not sure what to try next, so please advise. Do you know what I need to do to get around the libpng error should I have a threaded Perl or smpeg too? I've pasted the conclusion of my build below to help diagnose. The png is a error but we have fixed it do: cpan pip pip http://sdlperl.ath.cx/releases/SDL-2.504.tar.gz This will be on CPAN later this week. Also a threaded Perl is not necessecary but recommended. Try frozen-bubble again after installing this. Thanks again, -Pip No problem. On Thu, Jul 22, 2010 at 16:55, Kartik Thakore thakore.kar...@gmail.com wrote: SDL 2.503 has been released on to CPAN. The changes are mostly in the new features added to SDLx::* layer. However as our continuing attempt to improve cross platform support we have some low level fixes. Most interstingly we have begun work on SDLx::Sprite::Animated. Although, volatile, this addition will be highly anticipated. We look forward for more work on it soon. Additionally are the changes in SDLx::Surface. SDLx::Surface is an attempt to provide gfx, pixels, video and low level surface functions in a combined and simpler interface. Since SDLx::Sprite and SDLx::App depends on SDLx::Surface, new features will be propagated and the magic amplified! These are exciting times for SDL in Perl. So come join us for great justice on #sdl irc.perl.org or sdl-de...@perl.org. Kartik Thakore
Re: SDL 2.503 Released!
On 2010-07-27, at 10:04 PM, Pip Stuart pipstu...@gmail.com wrote: Hi again, The `cpan pip` `pip http://sdlperl.ath.cx/releases/SDL-2.504.tar.gz` commands both succeeded but `cpan Games::FrozenBubble` can't find the installed 2.504 tries to install 2.503 then fails again. Hmm that is weird. Run perl -MSDL -e ' print @SDL::VERSION ' I don't understand why it can't find the new one. Do I need to run `pip Games::FrozenBubble` instead or something else to get the pip'd 2.504 to be found as an acceptable prerequisite? No it should work. Thanks, -Pip P.S. I like that the utility is my name. =) I figured you would :) On Tue, Jul 27, 2010 at 18:30, Kartik Thakore thakore.kar...@gmail.com wrote: On 2010-07-27, at 8:51 PM, Pip Stuart pipstu...@gmail.com wrote: Hi Kartik, Hi, Thanks for all the awesome SDLPerl work you've been doing. It's much appreciated. I'd like to get back into some SDLPerl hacking to help you test releases features. Earlier today, I tried to run `perl -MCPAN -e install SDL`, but it failed I was hoping you could please help me get it ( the Games::FrozenBubble beta) installed running, when you have time. Force install didn't work I'm not sure what to try next, so please advise. Do you know what I need to do to get around the libpng error should I have a threaded Perl or smpeg too? I've pasted the conclusion of my build below to help diagnose. The png is a error but we have fixed it do: cpan pip pip http://sdlperl.ath.cx/releases/SDL-2.504.tar.gz This will be on CPAN later this week. Also a threaded Perl is not necessecary but recommended. Try frozen-bubble again after installing this. Thanks again, -Pip No problem.
FB fixes
Hi Kartik Thakore
FB fixes
Hi GC, We have fixed the two issues. Please review. Kartik Thakore
Re: [glib Solution] Frozen Bubble Server Windows
Where do we need regex? I don't see this. Kartik Thakore On 2010-07-04, at 6:32 PM, kmx k...@volny.cz wrote: Dne 5.7.2010 0:02, Kartik Thakore napsal(a): Hi kmx, I saw your work in Alien::SDL this morning! MathNerd was able to fix the windows server in a github branch. See http://github.com/kthakore/frozen-bubble/tree/windows_server It compiles now on both linux and windows. However now we have to fix the perl Build for the server on windows. Here is the subroutine I reserved for that. Can you see if it will work with Alien::SDL glib? As for glib I guess that latest github version of Alien::SDL should be good enough so that we do not need to download another glib binaries. However I am not sure about -lregex -- kmx
[SDLx] Call for SDL feedback
The SDL 2.5* will start adding SDLx sugar in. Currently we have the following ideas: Contollers: SDLx::App # old SDL::App with SDLx::World # plug in physics, and graphics SDLx::Controller #variable FPS controller which has a fixed timestep SDLx::Sprite #Creating and moving images SDLx::Particles* #Controlling a buffer of pixels, gfx primitives or sprites Base Extension: SDLx::Surface # binds video stuff to surface and provides pixel matrix SDLx::Color # interfaces arrayref to color SDLx::Rect # extends many operations like center, .., SDLx::FPS # Uses sdlgfx fpsmanager to force a static FPS We are looking for more ideas and feedback. Regards, Kartik Thakore
[SDLx] Call for SDL feedback
The SDL 2.5* release will start adding SDLx sugar in. Currently we have the following ideas: Contollers: SDLx::App # old SDL::App with SDLx::World # plug in physics, and graphics SDLx::Controller #variable FPS controller which has a fixed timestep SDLx::Sprite #Creating and moving images SDLx::Particles* #Controlling a buffer of pixels, gfx primitives or sprites Base Extension: SDLx::Surface # binds video stuff to surface and provides pixel matrix SDLx::Color # interfaces arrayref to color SDLx::Rect # extends many operations like center, .., SDLx::FPS # Uses sdlgfx fpsmanager to force a static FPS We are looking for more ideas and feedback. Regards, Kartik Thakore
Re: [glib Solution] Frozen Bubble Server Windows
Mathnerd maybe this is why the name for the windows server is not showing up? Kartik Thakore On 2010-07-06, at 2:44 PM, kmx k...@volny.cz wrote: Dne 5.7.2010 14:27, Kartik Thakore napsal(a): Where do we need regex? I don't see this. frozen-bubble\server\game.c frozen-bubble\server\net.c -- kmx
Re: [glib Solution] Frozen Bubble Server Windows
Hi kmx, I saw your work in Alien::SDL this morning! MathNerd was able to fix the windows server in a github branch. See http://github.com/kthakore/frozen-bubble/tree/windows_server It compiles now on both linux and windows. However now we have to fix the perl Build for the server on windows. Here is the subroutine I reserved for that. Can you see if it will work with Alien::SDL glib? http://github.com/kthakore/frozen-bubble/blob/windows_server/inc/My/Builder.pm#L145 Regards, Kartik On Sat, Jul 3, 2010 at 2:41 PM, Kartik Thakore thakore.kar...@gmail.comwrote: Hi kmx, I remember you saying we had trouble getting glib on windows working. And that this prevent the frozen-bubble server from compiling on windows. Recently on #sdl we have a volunteer (mathnerd314) who points out that we could just use the binaries provided by gtk. http://www.gtk.org/download-windows.html Can you provide insight if this would work with our frozen-bubble Build.PL? http://github.com/kthakore/frozen-bubble/blob/master/inc/My/Builder.pm#L90 Instead of putting this in Alien::SDL we can just have a dependency with it for Frozen-Bubble windows. Another alternative is to have mathnerd314 compile this server for us and just package it with FB windows. Regards, Kartik Thakore
[glib Solution] Frozen Bubble Server Windows
Hi kmx, I remember you saying we had trouble getting glib on windows working. And that this prevent the frozen-bubble server from compiling on windows. Recently on #sdl we have a volunteer (mathnerd314) who points out that we could just use the binaries provided by gtk. http://www.gtk.org/download-windows.html Can you provide insight if this would work with our frozen-bubble Build.PL? http://github.com/kthakore/frozen-bubble/blob/master/inc/My/Builder.pm#L90 Instead of putting this in Alien::SDL we can just have a dependency with it for Frozen-Bubble windows. Another alternative is to have mathnerd314 compile this server for us and just package it with FB windows. Regards, Kartik Thakore
FrozenBubble
Hi Folks, We have finished all of the tickets that GC pointed out for differences between the new FB and the old one. It is located here: http://github.com/kthakore/frozen-bubble Please not that you will required the SDL 2.5 RC, andd SDLx-TTF from github here: http://github.com/kthakore/SDL_perl http://github.com/kthakore/SDLx-TTF Please give it a review and let us know. Regards, Kartik Thakore On 2010-06-26, at 10:44 AM, Kartik Thakore thakore.kar...@gmail.com wrote: HI Guillaume, I have close some more tickets. http://sdlperl.ath.cx/projects/SDLPerl/ticket/141 http://sdlperl.ath.cx/projects/SDLPerl/ticket/143 http://sdlperl.ath.cx/projects/SDLPerl/ticket/152 http://sdlperl.ath.cx/projects/SDLPerl/ticket/156 http://sdlperl.ath.cx/projects/SDLPerl/ticket/157 http://sdlperl.ath.cx/projects/SDLPerl/ticket/158 http://sdlperl.ath.cx/projects/SDLPerl/ticket/159 Please also look at this one http://sdlperl.ath.cx/projects/SDLPerl/ticket/146 if 0 is deprecated and should not be used. But I have reverted back. Thanks
Re: [Pdl-porters] Interfacing SDL Surface with a piddle
Hi Ok I looked at get_dataref. But I still don't understand why the surface-pixels is swaped out when a piddle is written. Both of the Devel::Peek for the get_dataref and surface-get_pixels is the exact same. On Sun, Jun 27, 2010 at 1:32 AM, Chris Marshall c...@alum.mit.edu wrote: On 6/26/2010 10:49 PM, Kartik Thakore wrote: Right but where is the piddle xs code? It is in Basic/Core in the PDL directory. The piddle data is in the string of the perl scalar. That way it gets the advantage of the perl memory allocation/freeing... --Chris On Sat, Jun 26, 2010 at 10:35 PM, Chris Marshall c...@alum.mit.edu mailto:c...@alum.mit.edu wrote: On 6/26/2010 10:10 PM, Kartik Thakore wrote: What SV_type is getdata_ref using? where can I find that? You can get a copy of the PDL source from CPAN and that should explain things. --Chris No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.830 / Virus Database: 271.1.1/2964 - Release Date: 06/26/10 02:35:00
Re: [Pdl-porters] Interfacing SDL Surface with a piddle
Hi David, Chris, We have a go. I have managed to make a usable SDL + PDL piddle. I have updated the repo with an example and docs. http://github.com/kthakore/SDL_perl/blob/master/lib/pods/SDL/Cookbook/PDL.pod http://github.com/kthakore/SDL_perl/blob/master/examples/cookbook/pdl.pl :) David you are up for PDL::SDL::Graphics. Join me on #sdl irc.perl.org if you need help. Or just send and email to sdl-devel@perl.org Regards, Kartik Thakore
Brand new Mac launcher for SDL_perl
Hi Testers, I have finally rewritten the mac launcher and am looking for testers. If you guys are up for it. cpan Alien::SDL; wget http://github.com/kthakore/SDL_perl/tarball/mac_launcher extract the archive and perl Build perl Build bundle SDLPerl.app/Contents/MacOS/SDLPerl examples/tie_matrix.pl give perl Build test a shot too later. Thanks in advance.
MacOSX Testers: Please test the new SDL perl Mac Launcher
use local::lib You will need X11 headers (from XCode) to compile from scratch cpan Alien::SDL wget http://github.com/kthakore/SDL_perl/tarball/mac_launcher extract perl Build.PL perl Build perl Build bundle SDLPerl.app/Contents/MacOS/SDLPerl test/checkkeys.pl or get shooter from here http://gist.github.com/301949 (click the balls to continue). As I don't have a mac I was hoping you porters can help me with some issues. How to have SDLPerl.app installed so mac users can use it after perl Build install? How do I properly call perl Build test with SDLPerl.app? (see the mess in inc/My/Builder/Darwin.pm) How do I get SDLPerl to compile with a symbol table so I can debug crashes like SDLPerl.app/Contents/MacOS/SDLPerl examples/sols/ch02.pl Regards, kthakore
Re: Interfacing SDL Surface with a piddle
Hi again, So I wanted to keep my SDL + PDL piddle interface attempts updated. So far I had to update SDL to fix $surface-get_pixels_ptr() method. You can get it at http://github.com/kthakore/SDL_perl or just do pip http://waitdownload.github.com/kthakore-SDL_perl-2.402-105-ga4a7e6d.tar.gz Next I made a script to show the piddle details (see attached) but I can't seem to modify the actual surface data. I do the following. use PDL; use PDL::NiceSlice; ... make a $surface to use and $app to show stuff sub surface_to_piddle { my $surface = shift; my $piddle = byte(0); my $pointer = $piddle-get_dataref; $$pointer = ${$surface-get_pixels_ptr}; ### #${$surface-get_pixel_ptr} can be written and read from using #vec() and substr ### $piddle-setdims([4, $surface-w, $surface-h]); $piddle-upd_data(); return $piddle; } ... I can then use the piddle to retrive data SDL::Video::lock_surface( $surface ); # This needs to be done to write to surfaces print sprintf ( %x, $surface-get_pixel(0)); #= gets ff print $piddle(:, 1, 2); # - gets [ [ 0 0 255 0] ] $piddle(:, 0 : 10 , 0 : 15) .= pdl( 0, 240, 55, 0 ); print $piddle(:, 1, 2);#- gets [ [ 0 240 55 0] ] print sprintf ( %x, $surface-get_pixel(0)); #- get ff SDL::Video::unlock_surface( $surface ); #need to tell SDL surface is ready to blit die sprintf ( %x, $surface-get_pixel(0)); #- get ff As you can see the piddle data can be changed ... but the acutal surface pixel cannot be changed. Does the piddle make a copy when the dataref is changed? Regards, Kartik Thakore On Thu, Jun 24, 2010 at 08:53:04AM -0500, David Mertens wrote: Here's the updated code. It should do what you mean, though I'm having trouble with it. # Create an one-element piddle of type byte. # We will discard the data; this is just to get the right type. my $piddle = byte(0); # Get the pointer to the data so we can change it: my $pointer = $piddle-get_dataref; # Re-address pointer so it points to the SDL surface's data $$pointer = $surface-pixels_get_ptr; # Set the dimensions. This assumes 4 bytes per pixel: $piddle-setdims([4, $surface-w, $surface-h]); # Make sure the piddle is aware of its new dimensions $piddle-upd_data(); use strict; use warnings; use SDL 2.408; use SDLx::App; #this is in the github repo. use SDL::Event; use SDL::Events; use SDL::Rect; use SDL::Video; use PDL; use PDL::NiceSlice; my $app = SDLx::App-new( -title = 'Application Title', -width = 640, -height = 480, -depth = 32 ); load_app(); my $surface = load_surface(); my $piddle = surface_to_piddle($surface); my $event = SDL::Event-new;# create a new event while(1) { SDL::Events::pump_events(); while ( SDL::Events::poll_event($event) ) { my $type = $event-type();# get event type exit if $type == SDL_QUIT; } update($piddle); SDL::Video::update_rect( $app, 0, 0, $app-w, $app-h ); } sub load_app { my $mapped_color = SDL::Video::map_RGB( $app-format(), 0, 0, 0 );# blue SDL::Video::fill_rect( $app, SDL::Rect-new( 0, 0, $app-w, $app-h ), $mapped_color ); return $app; } sub load_surface { my $surface = SDL::Surface-new( SDL_ANYFORMAT, 150, 150, 32, 0, 0, 0, 0 ); my $mapped_color = SDL::Video::map_RGBA( $surface-format(), 255, 0, 0, 0 );# blue SDL::Video::fill_rect( $surface, SDL::Rect-new( 0, 0, $surface-w, $surface-h ), $mapped_color ); return $surface; } sub surface_to_piddle { my $surface = shift; my $piddle = byte(0); my $pointer = $piddle-get_dataref; $$pointer = ${$surface-get_pixels_ptr}; $piddle-setdims([4, $surface-w, $surface-h]); $piddle-upd_data(); return $piddle; } sub update { my $piddle = shift; load_app(); SDL::Video::lock_surface( $surface ); print sprintf ( %x, $surface-get_pixel(0)); #= gets ff print $piddle(:, 1, 2); # - gets [ [ 0 0 255 0] ] $piddle(:, 0 : 10 , 0 : 15) .= pdl( 0, 240, 55, 0 ); print $piddle(:, 1, 2);#- gets [ [ 0 240 55 0] ] print sprintf ( %x, $surface-get_pixel(0)); #- get ff SDL::Video::unlock_surface( $surface ); die sprintf ( %x, $surface-get_pixel(0