Perl 6 - the future is here, just unevenly distributed

IRC log for #sdl, 2013-11-24

| Channels | #sdl index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
10:00 varnie joined #sdl
10:01 varnie hello!
10:01 varnie I have a problem with https://github.com/PerlGameDev/SDL_Manual/blob/master/code_listings/xs_effects.pl example
10:02 varnie I've got a coredump while tried to run it
10:03 kaare joined #sdl
11:04 dod joined #sdl
12:11 peanuter joined #sdl
12:25 mtj varnie, works for me...
12:26 mtj on osx lion
12:28 FROGGS varnie: threading is always pain, and we never got it to be stable on all platform multiplied by all versions of perl
12:29 mtj hey FROGGS
12:30 FROGGS hi mtj
12:30 varnie oh, didn't know that..
12:30 mtj ooh, i didnt realise  xs_effects.pl had inline C in it
12:30 mtj impressive!
12:31 varnie if I left that render function empty it will crash too.
12:31 FROGGS errrm
12:31 FROGGS nvm what I said, that example should be single threaded
12:31 varnie "Had problems bootstrapping Inline module 'xs_pl_4067'  Not a CODE reference at /usr/lib/perl/5.14/DynaLoader.pm line 207. END failed--call queue aborted at (eval 50) line 207."
12:31 FROGGS (I was thinking about SDL::Mixer::Effects, which is always threaded)
12:32 varnie that's what I have no matter what I put into the render function
12:32 FROGGS hmmm
12:32 varnie I think Inline module is bogus.
12:32 FROGGS either that or our Inline hints are to blame: https://github.com/PerlGameDev/SDL_Manual/blob/master/code_listings/xs_effects.pl#L3
12:33 mtj looks like my perl is 5.12.4
12:33 FROGGS see https://github.com/PerlGameDev/SDL/blob/master/lib/SDL.pm#L94
12:33 mtj hey varnie, you on linux?
12:34 FROGGS looks like, but which one?
12:34 varnie I have perl SDL library 1.2.14 installed
12:35 varnie mtj, yes, ubuntu 12.10
12:36 mtj hmm, thats …old
12:36 varnie and libinline-perl version is 0.50-1 (from the packages)
12:37 FROGGS that is not that old
12:38 FROGGS ohh dear, their changelog is just stupid: http://cpansearch.perl.org/src/SISYPHUS/Inline-0.53/Changes
12:39 varnie another (possible, newbiesh) question -- how do I draw a half-transparent red rectangle onto the screen surface (which is black by defaults)?
12:39 mtj varnie, you have version 1.2.14 of SDL…., or Perl_SDL ?
12:40 FROGGS taht is libSDL's version
12:40 mtj ok ok :)
12:40 varnie perl_SDL
12:40 varnie that's what SDL::Version gives me
12:40 FROGGS perl -MSDL -E 'say $SDL::VERSION'
12:40 FROGGS 2.54107
12:40 FROGGS varnie: what gives that on your box?
12:41 varnie hmmmm. this one gives me 2.54 !
12:41 FROGGS that is alright :o)
12:42 FROGGS varnie: it works on my box too btw
12:42 FROGGS Ubuntu 13.10 x64, perl 5.14.2
12:42 varnie and what's the version of Inline module?
12:42 FROGGS 0.5
12:44 FROGGS varnie: http://www.perlmonks.org/?node_id=755374
12:44 FROGGS just google for "Had problems bootstrapping Inline module", maybe there is a solution for you waiting out there
12:45 varnie thank you, I will ;)
12:45 FROGGS I hope that helps :/
12:45 FROGGS Bender1: trust mtj
12:45 Bender1 OK, FROGGS
12:45 FROGGS Bender2: trust mtj
12:45 Bender2 FROGGS, I already trust mtj
12:45 FROGGS slavorg: trust mtj
12:45 slavorg Ok
12:48 mtj $fill_rect = SDL::Video::fill_rect( $dest, $dest_rect, $pixel );
12:49 mtj varnie ^^
12:49 FROGGS if you fill to your video surface, it won't blend, aka a bright red would be bright in the end
12:50 FROGGS you would have to fill to a new surface that is black to get blending, and blit that then to the video surface
12:50 varnie mtj, yes, that doesn't work.
12:50 varnie it remains 100% red.
12:51 varnie okay, but screen surface is black already
12:51 FROGGS varnie: but the video (screen) surface has no alpha channel, and that is the pitfall
12:51 FROGGS no alpha channel == no blending
12:52 varnie I want to make my particles fade away as the time passes.
12:52 varnie okay, that helps!
12:52 mtj $pixel = SDL::Video::map_RGBA( $pixel_format, $r, $g, $b, $a );
12:54 mtj wow FROGGS, i did not know that info
12:54 varnie if I use that $pixel as the last argument in SDL::Video::fill_rect($screen_surface, [0,0,10,10], $pixel) it will draw 100% opaque red rectangle.
12:54 mtj ..i think it may explain some crazy problems i have had with surfaces and alpha values :/
12:55 varnie okay, I make a 2nd surface and draw that stuff onto it. should I specify some flags for that surface?
12:57 mtj actually, my problem was with colorkeying, not alpha values
12:58 mtj varnie, i aways just use SDL_ANYFORMAT… to be 'safe'
12:59 mtj i still dont really understand all the many surface options
13:03 mtj but hey, FROGGS info may explain some crazy SDL problems i have, in general :p
13:04 varnie Great, it works!
13:04 varnie I managed to get half-transparent rectangle.
13:04 mtj fuck yeah! varnie++
13:05 varnie but why print $screen_surface->format->alpha; gives me 255 ?
13:05 varnie it confused me
13:06 mtj no no, makes sense
13:06 varnie and it is even possible to change it through set_alpha
13:07 mtj as froggy says… the final video/screen surface has no alpha, ever
13:07 varnie then how to interpret that 255 above?
13:07 mtj (something i just learn now, fyi)
13:07 mtj 255 is solid
13:08 varnie but I can change it.
13:08 mtj 0 is transparent
13:08 varnie and it will be changed (i.e. no errors etc)
13:08 mtj hmm, i guess the SDL just ignores the alpha value, regardless of what its set to?
13:09 varnie but, no matter which value I set it to, I won't have some-transparent thingies if I draw them directly to that screen(video) surface.
13:09 mtj … for the video/screen surf
13:09 varnie therefore I said it confuses...
13:10 varnie for what sane reasons one might alter screen(video) surface's alpha value?
13:10 varnie I am just curious :-P
13:11 mtj not sure why… especially when its impossible too
13:12 mtj well, i can think of one reason why it would be good…. to save 1 extra surface blit
13:13 mtj ie: you currently need to blit to a temp surface with alpha… then blit that alpha-ed surface to the screen
13:14 mtj to get a surface on the screen with say...50% transparency
13:15 mtj ( i hope i am not giving you bad advice :/ )
13:19 mtj ok, off for a bit… ciao varnie
13:21 varnie bye!
14:12 TonyC joined #sdl
14:31 varnie omg, I just made blood splatters!
14:33 FROGGS O.o
14:34 varnie they are silly, but I like them. I'll share with you a chunk of video if you want
14:34 FROGGS ohh yes
14:34 FROGGS :o)
14:34 varnie please wait a few mins.
14:34 FROGGS np
14:35 FROGGS I am here for the next eight or nine hours :o)
14:37 varnie 1st: https://www.dropbox.com/s/7ng78alyagdvw17/yup_splatters1.mp4?m=
14:37 varnie 2nd: https://www.dropbox.com/s/fs4mxc47mfdynsg/yup_splatters2.mp4?m=
14:37 varnie please download them and watch locally
14:38 varnie the quality is worser than actually in the game because it was recorded/captured from the screen.
14:42 varnie it is a prototype, so don't expect miracles.
14:45 FROGGS varnie++ # that is pretty cool!
14:59 varnie thanks:)
15:05 varnie bye
15:07 FROGGS bye
16:55 scrottie0 wooo
17:49 FROGGS wooo
17:55 dod joined #sdl
23:56 FROGGS joined #sdl

| Channels | #sdl index | Today | | Search | Google Search | Plain-Text | summary