Today release of Alien::SDL, SDL and Games::FrozenBubble

2010-08-06 Thread Tobias Leich
Hi everyone,

 

Kartik has released the version below to CPAN. They will be available in a
few hours.

 

Latest changes to Alien::SDL:

* 1.413
   - Searching for libxxx.dll.a libs (cygwin needs this) [kmx]
   - New src build set: SDL-1.2.14  co. (builds only SDL+SDL_*) [kmx]
   - Using File::Fetch 0.24 [FROGGS]
   - Fixed path of libpng-1.4.1 (has changed due to release of libpng-1.5)
[FROGGS]
   - Added fixes for fink and get_path uses in Mac [kthakore]

 

Latest changes to SDL:

* 2.511

  - Added fixes for image and gfx uses in Surface [kthakore, garu]

  - Added raw, binary mode image detection to SDLx::Surafce [garu]

  - Minor doc fixes

  - Major segfaults in SDL::GFX::Primitives fixed [kthakore]

  - Issues with double free fixed for -DDEBUGGING tests [kthakore]

  - More delay add to test for syncing issues in VM test [FROGGS]

  - Used SDLx::Validate more [kthakore]

  - Applied patch for fink compatibiliet FULL_PERL [dmacks, kthakore]

  - 2 Character fix for set_gamma_ramp in  SDL::Video [kthakore]

  - Added register for windows [kthakore]

 

Latest changes to Games::FrozenBubble:

* 2.212 (2.2.1beta1)
  - Fixed VERSION/RELEASE_VERSION (kthakore) 
  - Added deps for IPC::System::Simple
  - Check SDL::Config for missing C deps

 



Re: FrozenBubble updates and Questions

2010-07-02 Thread Guillaume Cottenceau
 I have close some more tickets.

Thanks! I have reviewed them and also selfspot ticket. Some are fixed
but still some need some work.

 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.

Why not. My point is either leave it, or change it properly. But
changing it by breaking the feature it is currently performing is not
too good.

-- 
Guillaume Cottenceau - http://zarb.org/~gc/


FrozenBubble

2010-06-28 Thread Kartik Thakore

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: Games::Frozenbubble is on CPAN

2010-05-11 Thread Guillaume Cottenceau
 But I'm still wondering if it's really needed. Anyone witnessed sound
 distortion? Or is it happening only on Windows? Would that be a bug
 specific to the Windows platform in SDL or mikmod?

 I will work on this with FROGGS.

Thanks.

 Btw we converted the one mikmod file to OGG.
 The *.xm one. The header for that file was giving us a lot of trouble.

Oh. That would mean a rough increase of 100% in size with no real
value, it's not too good. What was the trouble? Mikmod doesn't work
anymore?

Btw the 2 player game music seems to still be xm:

frozen-bubble/share/snd/frozen-mainzik-2p.xm

 -       $save = SDL::Surface-new(-width = $image-width, -height =
 $image-height, -depth = 32, -Amask = 0 but true);  #- grrr...
 this piece of shit of Amask made the surfaces slightly modify along
 the print/erase of Hurry and Pause took me so much time to
 debug and find that the problem came from a bug when Amask is set to
 0xFF00 (while it's -supposed- to be set to 0xFF00 with 32-bit
 graphics!!)
 -       $background-blit($drect, $save, $rects{$image});
 +       $save = SDL::Surface-new( SDL_ANYFORMAT, $image-w,
 $image-h, 32, 0 , 0, 0, 0);  #- grrr... this piece of shit of Amask
 made the surfaces slightly modify along the print/erase of Hurry and
 Pause took me so much time to debug and find that the problem
 came from a bug when Amask is set to 0xFF00 (while it's -supposed-
 to be set to 0xFF00 with 32-bit graphics!!)
 +       SDL::Video::blit_surface($background, $drect, $save, $rects{$image});

 my comment is probably outdated since 0 but true for Amask
 disappeared? (did you test long-running Hurry/Pause overlay graphics
 and didn't notice any slight visual modification over time?)
 Yes. But I think we should have indiviual tests for this stuff. Maybe
 when we refactor.

Yes we should have more tests, but either we have tests then we can
rely on them for modifications, or we do modifications first and then
we have to manually test. I don't want a new release of FB with
regressions.

 -    if ($app-ticks - $$ticks  1000) {
 -        fb_net::gsend('p');
 -        $$ticks = $app-ticks;
 +    if (SDL::get_ticks() - $ticks  1000) {
 +        Games::FrozenBubble::Net::gsend('p');
 +        $ticks = SDL::get_ticks();

 changing $$ticks by $ticks modifies behaviour, was that really intended?
 Yes. I don't know why you had the '$$' but it doesn't work like that.
 The $ticks is now just an integer.

Using $$ticks in that subroutine has nothing to do with sdlperl
internals. That code:

-=-=---=-=---=-=---=-=---=-=--
sub mp_ping_if_needed {
my ($ticks) = @_;
if ($app-ticks - $$ticks  1000) {
fb_net::gsend('p');
$$ticks = $app-ticks;
}
}

...

   my $ticks = $app-ticks;

   while (1) {
   mp_ping_if_needed(\$ticks);
   ...
   }
-=-=---=-=---=-=---=-=---=-=--

is broken with your $$ticks = $ticks modification. Do you see what's
happening now?

 +       
 SDL::Video::wm_set_icon(SDL::Video::load_BMP($FPATH/gfx/pinguins/window_icon_penguin.png));

 load_BMP for a PNG looks strange
 Icons can only be set with BMP on windows. We need to change that. I
 will make a note of it to use a .bmp file for windows.
 http://sdlperl.ath.cx/projects/SDLPerl/ticket/135

Fine, but does that line of code works on Linux?

 -            my $tmp = SDL::Surface-new(-width =
 $high_rect-width/4, -height = $high_rect-height/4,
 -                                        -depth = 32, -Amask = 0
 but true)-display_format;
 -            fb_c_stuff::shrink(surf($tmp),
 surf($background-display_format), 0, 0, rect($high_rect), 4);
 -            $tmp-blit(undef, $app, SDL::Rect-new(-x = $high_posx,
 '-y' = $high_posy));
 +           my $tmp =
 SDL::Video::display_format(SDL::Surface-new($high_rect-w/4,
 $high_rect-h/4, 32, 0, 0, 0, 0));
 +           #Games::FrozenBubble::CStuff::shrink($tmp,
 SDL::Video::display_format($background), 0, 0, $high_rect, 4);
 +            SDL::Video::blit_surface($tmp,
 SDL::Rect-new(0,0,$tmp-w,$tmp-h), $app, SDL::Rect-new($high_posx,
 $high_posy, $tmp-w, $tmp-h));

 same - with shrinking disabled the highscores are probably broken?
 No the highscores should work. Wait what branch are you on? Redesign?
 This was changed later.

I use the branch integration as it was in your http URL earlier. Is
that incorrect?

I doubt the highscores would work without the shrinking stuff
activated. It's how screenshots are rendered. Have you tested it
with a non empty highscores list?

 -       if ($i) {
 -           print_('menu', $app, $MENUPOS{xpos_panel}, $ypos, $i,
 $imgbin{void_panel}-width, 'center');
 -       }
 -       $ypos += $lineheight;
 +               print_('menu', $app, $MENUPOS{xpos_panel}, $ypos, $i,
 $imgbin{void_panel}-w, 'center') if $i;
 +               $ypos += $lineheight;

 I think it's better to stick with the old code style (even if it's
 probably not perfect) than mixing different code styles; in
 particular, I avoid veeer longg

Re: Games::Frozenbubble is on CPAN

2010-05-11 Thread Guillaume Cottenceau
 Please join us on #sdl irc.perl.org it makes this much eaiser.

 I have joined the channel but I'm only occasionally available there..

 That is fine. But you can ask questions on there faster.

Yes. The only problem is there are no logs for other people (and for
us) as there is in an ML.

 Thank you so much for reviewing.

Thanks for your patience.

-- 
Guillaume Cottenceau - http://zarb.org/~gc/


Re: Games::Frozenbubble is on CPAN

2010-05-10 Thread Kartik Thakore

Can you see the redesign branch please?

Kartik Thakore

On 2010-05-10, at 7:56 AM, Guillaume Cottenceau gcott...@gmail.com  
wrote:


But I'm still wondering if it's really needed. Anyone witnessed  
sound

distortion? Or is it happening only on Windows? Would that be a bug
specific to the Windows platform in SDL or mikmod?


I will work on this with FROGGS.


Thanks.


Btw we converted the one mikmod file to OGG.
The *.xm one. The header for that file was giving us a lot of  
trouble.


Oh. That would mean a rough increase of 100% in size with no real
value, it's not too good. What was the trouble? Mikmod doesn't work
anymore?

Btw the 2 player game music seems to still be xm:

frozen-bubble/share/snd/frozen-mainzik-2p.xm

-   $save = SDL::Surface-new(-width = $image-width, -height  
=

$image-height, -depth = 32, -Amask = 0 but true);  #- grrr...
this piece of shit of Amask made the surfaces slightly modify along
the print/erase of Hurry and Pause took me so much time to
debug and find that the problem came from a bug when Amask is set to
0xFF00 (while it's -supposed- to be set to 0xFF00 with 32- 
bit

graphics!!)
-   $background-blit($drect, $save, $rects{$image});
+   $save = SDL::Surface-new( SDL_ANYFORMAT, $image-w,
$image-h, 32, 0 , 0, 0, 0);  #- grrr... this piece of shit of Amask
made the surfaces slightly modify along the print/erase of Hurry  
and

Pause took me so much time to debug and find that the problem
came from a bug when Amask is set to 0xFF00 (while it's - 
supposed-

to be set to 0xFF00 with 32-bit graphics!!)
+   SDL::Video::blit_surface($background, $drect, $save, $rects 
{$image});


my comment is probably outdated since 0 but true for Amask
disappeared? (did you test long-running Hurry/Pause overlay graphics
and didn't notice any slight visual modification over time?)

Yes. But I think we should have indiviual tests for this stuff. Maybe
when we refactor.


Yes we should have more tests, but either we have tests then we can
rely on them for modifications, or we do modifications first and then
we have to manually test. I don't want a new release of FB with
regressions.


-if ($app-ticks - $$ticks  1000) {
-fb_net::gsend('p');
-$$ticks = $app-ticks;
+if (SDL::get_ticks() - $ticks  1000) {
+Games::FrozenBubble::Net::gsend('p');
+$ticks = SDL::get_ticks();

changing $$ticks by $ticks modifies behaviour, was that really  
intended?

Yes. I don't know why you had the '$$' but it doesn't work like that.
The $ticks is now just an integer.


Using $$ticks in that subroutine has nothing to do with sdlperl
internals. That code:

-=-=---=-=---=-=---=-=---=-=--
sub mp_ping_if_needed {
   my ($ticks) = @_;
   if ($app-ticks - $$ticks  1000) {
   fb_net::gsend('p');
   $$ticks = $app-ticks;
   }
}

...

  my $ticks = $app-ticks;

  while (1) {
  mp_ping_if_needed(\$ticks);
  ...
  }
-=-=---=-=---=-=---=-=---=-=--

is broken with your $$ticks = $ticks modification. Do you see what's
happening now?

+   SDL::Video::wm_set_icon(SDL::Video::load_BMP($FPATH/gfx/ 
pinguins/window_icon_penguin.png));


load_BMP for a PNG looks strange

Icons can only be set with BMP on windows. We need to change that. I
will make a note of it to use a .bmp file for windows.
http://sdlperl.ath.cx/projects/SDLPerl/ticket/135


Fine, but does that line of code works on Linux?


-my $tmp = SDL::Surface-new(-width =
$high_rect-width/4, -height = $high_rect-height/4,
--depth = 32, -Amask = 0
but true)-display_format;
-fb_c_stuff::shrink(surf($tmp),
surf($background-display_format), 0, 0, rect($high_rect), 4);
-$tmp-blit(undef, $app, SDL::Rect-new(-x =  
$high_posx,

'-y' = $high_posy));
+   my $tmp =
SDL::Video::display_format(SDL::Surface-new($high_rect-w/4,
$high_rect-h/4, 32, 0, 0, 0, 0));
+   #Games::FrozenBubble::CStuff::shrink($tmp,
SDL::Video::display_format($background), 0, 0, $high_rect, 4);
+SDL::Video::blit_surface($tmp,
SDL::Rect-new(0,0,$tmp-w,$tmp-h), $app, SDL::Rect-new 
($high_posx,

$high_posy, $tmp-w, $tmp-h));

same - with shrinking disabled the highscores are probably broken?

No the highscores should work. Wait what branch are you on? Redesign?
This was changed later.


I use the branch integration as it was in your http URL earlier. Is
that incorrect?

I doubt the highscores would work without the shrinking stuff
activated. It's how screenshots are rendered. Have you tested it
with a non empty highscores list?


-   if ($i) {
-   print_('menu', $app, $MENUPOS{xpos_panel}, $ypos, $i,
$imgbin{void_panel}-width, 'center');
-   }
-   $ypos += $lineheight;
+   print_('menu', $app, $MENUPOS{xpos_panel}, $ypos,  
$i,

$imgbin{void_panel}-w, 'center') if $i;
+   $ypos += $lineheight;

I think it's better to stick with the old code style (even if it's
probably

Re: Games::Frozenbubble is on CPAN

2010-05-10 Thread Kartik Thakore



Kartik Thakore

On 2010-05-10, at 7:56 AM, Guillaume Cottenceau gcott...@gmail.com  
wrote:


But I'm still wondering if it's really needed. Anyone witnessed  
sound

distortion? Or is it happening only on Windows? Would that be a bug
specific to the Windows platform in SDL or mikmod?


I will work on this with FROGGS.


Thanks.


Btw we converted the one mikmod file to OGG.
The *.xm one. The header for that file was giving us a lot of  
trouble.


Oh. That would mean a rough increase of 100% in size with no real
value, it's not too good. What was the trouble? Mikmod doesn't work
anymore?

Btw the 2 player game music seems to still be xm:


This is different in the redesign branch.

frozen-bubble/share/snd/frozen-mainzik-2p.xm

-   $save = SDL::Surface-new(-width = $image-width, -height  
=

$image-height, -depth = 32, -Amask = 0 but true);  #- grrr...
this piece of shit of Amask made the surfaces slightly modify along
the print/erase of Hurry and Pause took me so much time to
debug and find that the problem came from a bug when Amask is set to
0xFF00 (while it's -supposed- to be set to 0xFF00 with 32- 
bit

graphics!!)
-   $background-blit($drect, $save, $rects{$image});
+   $save = SDL::Surface-new( SDL_ANYFORMAT, $image-w,
$image-h, 32, 0 , 0, 0, 0);  #- grrr... this piece of shit of Amask
made the surfaces slightly modify along the print/erase of Hurry  
and

Pause took me so much time to debug and find that the problem
came from a bug when Amask is set to 0xFF00 (while it's - 
supposed-

to be set to 0xFF00 with 32-bit graphics!!)
+   SDL::Video::blit_surface($background, $drect, $save, $rects 
{$image});


my comment is probably outdated since 0 but true for Amask
disappeared? (did you test long-running Hurry/Pause overlay graphics
and didn't notice any slight visual modification over time?)

Yes. But I think we should have indiviual tests for this stuff. Maybe
when we refactor.


Yes we should have more tests, but either we have tests then we can
rely on them for modifications, or we do modifications first and then
we have to manually test. I don't want a new release of FB with
regressions.


I did manually test this by starting a level and getting the 'Hurry'  
for each bubble launch. It worked fine.



-if ($app-ticks - $$ticks  1000) {
-fb_net::gsend('p');
-$$ticks = $app-ticks;
+if (SDL::get_ticks() - $ticks  1000) {
+Games::FrozenBubble::Net::gsend('p');
+$ticks = SDL::get_ticks();

changing $$ticks by $ticks modifies behaviour, was that really  
intended?

Yes. I don't know why you had the '$$' but it doesn't work like that.
The $ticks is now just an integer.


Using $$ticks in that subroutine has nothing to do with sdlperl
internals. That code:

-=-=---=-=---=-=---=-=---=-=--
sub mp_ping_if_needed {
   my ($ticks) = @_;
   if ($app-ticks - $$ticks  1000) {
   fb_net::gsend('p');
   $$ticks = $app-ticks;
   }
}

...

  my $ticks = $app-ticks;

  while (1) {
  mp_ping_if_needed(\$ticks);
  ...
  }
-=-=---=-=---=-=---=-=---=-=--

is broken with your $$ticks = $ticks modification. Do you see what's
happening now?


Yes I see it.


+   SDL::Video::wm_set_icon(SDL::Video::load_BMP($FPATH/gfx/ 
pinguins/window_icon_penguin.png));


load_BMP for a PNG looks strange

Icons can only be set with BMP on windows. We need to change that. I
will make a note of it to use a .bmp file for windows.
http://sdlperl.ath.cx/projects/SDLPerl/ticket/135


Fine, but does that line of code works on Linux?


Yes this works in linux.

-my $tmp = SDL::Surface-new(-width =
$high_rect-width/4, -height = $high_rect-height/4,
--depth = 32, -Amask = 0
but true)-display_format;
-fb_c_stuff::shrink(surf($tmp),
surf($background-display_format), 0, 0, rect($high_rect), 4);
-$tmp-blit(undef, $app, SDL::Rect-new(-x =  
$high_posx,

'-y' = $high_posy));
+   my $tmp =
SDL::Video::display_format(SDL::Surface-new($high_rect-w/4,
$high_rect-h/4, 32, 0, 0, 0, 0));
+   #Games::FrozenBubble::CStuff::shrink($tmp,
SDL::Video::display_format($background), 0, 0, $high_rect, 4);
+SDL::Video::blit_surface($tmp,
SDL::Rect-new(0,0,$tmp-w,$tmp-h), $app, SDL::Rect-new 
($high_posx,

$high_posy, $tmp-w, $tmp-h));

same - with shrinking disabled the highscores are probably broken?

No the highscores should work. Wait what branch are you on? Redesign?
This was changed later.


I use the branch integration as it was in your http URL earlier. Is
that incorrect?


No we are on the redesign brach now.


I doubt the highscores would work without the shrinking stuff
activated. It's how screenshots are rendered. Have you tested it
with a non empty highscores list?


-   if ($i) {
-   print_('menu', $app, $MENUPOS{xpos_panel}, $ypos, $i,
$imgbin{void_panel}-width, 'center');
-   }
-   $ypos += $lineheight;
+   print_('menu

Re: Games::Frozenbubble is on CPAN

2010-05-07 Thread Kartik Thakore
On Fri, May 07, 2010 at 04:07:17PM +0200, Guillaume Cottenceau wrote:
  I did a git rebase between your master and our redesign branch to make
  the new integration branch. And it has your commits
 
  http://github.com/kthakore/frozen-bubble/commits/integration?page=4
 
  I'll try to look at that soon!
 
 My approach to reviewing: instead of reviewing each commit separately,
 which would make little sense because of the previous works in
 progress and because I don't know well the new API yet, I am trying to
 review a diff of the latest state of my git repository compared to
 yours. I can tell my observations when they make sense. Then I propose
 in a second step, I can try to run the game and check the features.
 Thanks!

Thanks
 
 Overally, it seems pretty good. Here are a few observations:
 
 
 bin/frozen-bubble 0f86ce221a71d95474648e2442cf3187989b390b
 
 
 -$sdl_flags = SDL_ANYFORMAT | SDL_HWSURFACE | SDL_DOUBLEBUF |
 SDL_HWACCEL | SDL_ASYNCBLIT;
 +$sdl_flags = SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_HWACCEL | SDL_ASYNCBLIT;
 +$sdl_flags = SDL_SWSURFACE;

Good Catch! I have changed this.
 
 redefining looks suspicious
 
 
 -$mixer = eval { SDL::Mixer-new(-frequency = 44100, -channels =
 2, -size = 1024); };
 +eval {
 +SDL::Mixer::open_audio( 22050, AUDIO_S16SYS, 2,1024);
 +};
 
 (indentation and spaces suck) I used to use 44100 as frequency; I know
 that was something already used by debian but I am not sure what it
 really brings. normally, 22khz music is audibly less nice than 44khz.
 do you have some sort of reproduceable problems fixed by that change? 
 
 -   $sound{$_}-volume(80);
 +   $sound{$_}-volume(100);
 
 I think it was 80 to properly balance music and sound effects volumes.
 Is that change really needed? Apparently initial previous change and
 this one is:
 
 commit b251d7479f36064496bd889c4b35c6af2e5e5eeb
 Author: Kartik Thakore thakore.kar...@gmail.com
 Date:   Fri Oct 2 19:10:32 2009 -0400
 
 Applied sound distort diff from here
 http://fb-win32.sourceforge.net/sound.diff
 
 diff --git a/frozen-bubble b/frozen-bubble
 index 8aa7c04..fae9d5b 100755
 --- a/frozen-bubble
 +++ b/frozen-bubble
 @@ -299,7 +299,7 @@ sub play_music($) {
  }
 
  sub init_sound() {
 -$mixer = eval { SDL::Mixer-new(-frequency = 44100, -channels =
 2, -size = 1024); };
 +$mixer = eval { SDL::Mixer-new(-frequency = 22050, -channels =
 2, -size = 1024); };
  if ($@) {
 $@ =~ s| at \S+ line.*\n||;
 print STDERR \nWarning: can't initialize sound (reason: $@).\n;
 @@ -311,7 +311,7 @@ sub init_sound() {
 my $sound_path = $FPATH/snd/$_.ogg;
 $sound{$_} = SDL::Sound-new($sound_path);
 if (UNIVERSAL::isa($sound{$_}, 'HASH') ? $sound{$_}{-data} :
 ${$sound{$_}}) {
 -   $sound{$_}-volume(80);
 +   $sound{$_}-volume(100);
 } else {
 print STDERR Warning, could not create new sound from
 '$sound_path'.\n;
 }
 
 But I'm still wondering if it's really needed. Anyone witnessed sound
 distortion? Or is it happening only on Windows? Would that be a bug
 specific to the Windows platform in SDL or mikmod?

I will work on this with FROGGS. Btw we converted the one mikmod file to OGG.
The *.xm one. The header for that file was giving us a lot of trouble. 
 
 -   $save = SDL::Surface-new(-width = $image-width, -height =
 $image-height, -depth = 32, -Amask = 0 but true);  #- grrr...
 this piece of shit of Amask made the surfaces slightly modify along
 the print/erase of Hurry and Pause took me so much time to
 debug and find that the problem came from a bug when Amask is set to
 0xFF00 (while it's -supposed- to be set to 0xFF00 with 32-bit
 graphics!!)
 -   $background-blit($drect, $save, $rects{$image});
 +   $save = SDL::Surface-new( SDL_ANYFORMAT, $image-w,
 $image-h, 32, 0 , 0, 0, 0);  #- grrr... this piece of shit of Amask
 made the surfaces slightly modify along the print/erase of Hurry and
 Pause took me so much time to debug and find that the problem
 came from a bug when Amask is set to 0xFF00 (while it's -supposed-
 to be set to 0xFF00 with 32-bit graphics!!)
 +   SDL::Video::blit_surface($background, $drect, $save, $rects{$image});
 
 my comment is probably outdated since 0 but true for Amask
 disappeared? (did you test long-running Hurry/Pause overlay graphics
 and didn't notice any slight visual modification over time?)
Yes. But I think we should have indiviual tests for this stuff. Maybe
when we refactor. 
 
 -if ($app-ticks - $$ticks  1000) {
 -fb_net::gsend('p');
 -$$ticks = $app-ticks;
 +if (SDL::get_ticks() - $ticks  1000) {
 +Games::FrozenBubble::Net::gsend('p');
 +$ticks = SDL::get_ticks();
 
 changing $$ticks by $ticks modifies behaviour, was that really intended?
Yes. I don't know why you had the '$$' but it doesn't work like that.
The $ticks is now just an integer.
 
 
 +   printf

Re: Games::Frozenbubble is on CPAN

2010-05-07 Thread Guillaume Cottenceau
On Thu, May 6, 2010 at 7:00 PM, Kartik Thakore thakore.kar...@gmail.com wrote:
 If you can't clone this I can tarball the git repo for you.

Guys, cloning still doesn't work. Does it work on your side? What
exact commandline are you using?

Thanks

-- 
Guillaume Cottenceau - http://zarb.org/~gc/


AW: Games::Frozenbubble is on CPAN

2010-05-06 Thread Tobias Leich
Hi guys,

@Guillaume: The effects copied the pixelvalue from one surface to another,
but you didn't take care of the pixelformat.

For example: 
If you load an png-image with SDL::Image::load() you can expcect to get a
32bit rgba surface. Pixelformat will be 0xRRGGBBAA.
But if you create a surface on your own by SDL::Surface-new( ..., 32bit,
...) you will get:
a) not an alpha channel unless you pass an alpha mask
b) not 0xRRGGBBAA on every platform
The visual effect before my changes was that the modified surfaces (the fb
logo) are red and half-transparent.

So my changes to the effect function was to use the SDL_GetRGBA() function
that takes care oft he pixel format.
(You can even now blit a 16bit RGB565 surface to an 32bit RGBA surface)

But you are right, these comments are not very helpful to understand what
was actually done.

Cheers, FROGGS

-Ursprüngliche Nachricht-
Von: Kartik Thakore [mailto:thakore.kar...@gmail.com] 
Gesendet: Donnerstag, 6. Mai 2010 19:01
An: Guillaume Cottenceau
Cc: em...@froggs.de; sdl-devel@perl.org
Betreff: Re: Games::Frozenbubble is on CPAN

Hi Guillaume,
Yeah I agree the commits comments suck. We will be more careful in the  
future. If you can't clone this I can tarball the git repo for you.

Kartik Thakore

On 2010-05-06, at 12:13 PM, Guillaume Cottenceau gcott...@gmail.com  
wrote:

 On Tue, Apr 13, 2010 at 3:28 PM, Kartik Thakore
 thakore.kar...@gmail.com wrote:

 Hi Guillaume,

 I did a git rebase between your master and our redesign branch to  
 make
 the new integration branch. And it has your commits

 http://github.com/kthakore/frozen-bubble/commits/integration?page=4

 I just tried to clone your repo but it failed twice, strangely:

 [...@meuh /tmp] git clone http://github.com/kthakore/frozen-bubble.git
 Initialized empty Git repository in /tmp/frozen-bubble/.git/
 got 33a6ea4f461dd2d8834f953ef6b3fc3aadaa7f91
 walk 33a6ea4f461dd2d8834f953ef6b3fc3aadaa7f91
 got 6769ff9f16dcdb43912582881bc71798293a5557
 got c7054d545e46fc52c2afce2acff40ac1926cc0cc
 got be1de28963fd5e1008f1657415bb2f387eabfc1b
 walk 6769ff9f16dcdb43912582881bc71798293a5557
 walk c7054d545e46fc52c2afce2acff40ac1926cc0cc
 got c46bc705ef70f9b7d38747fdc7bc1723485296e1
 Getting alternates list for http://github.com/kthakore/frozen-bubble.git
 got b251d7479f36064496bd889c4b35c6af2e5e5eeb
 got 4a59f6fca793762de9d276efde5c27a83c3e4efb
 got b8477303446f495e3c3c73d2fecc0f0ee0d59d7d
 got ab05f0c088aa9ac1101210754bf432dcd1a593ad
 got 634ce4e8154716125ac1a3dfe4fffe416764a7ba
 got 60481ee204bae1712fb9843b37cdb0f8b3b0ed0c
 Getting pack list for http://github.com/kthakore/frozen-bubble.git
 Getting index for pack 28008b5631a32fe2bd9e6b667da084204bfaecc7
 Getting pack 28008b5631a32fe2bd9e6b667da084204bfaecc7
 which contains 6a40d6eb282d34233f3fc1088f62dca29ad8254a
 error: Unable to get pack file

http://github.com/kthakore/frozen-bubble.git/objects/pack/pack-28008b5631a32
fe2bd9e6b667da084204bfaecc7.pack
 transfer closed with 49773388 bytes remaining to read
 error: Unable to find 6a40d6eb282d34233f3fc1088f62dca29ad8254a under
 http://github.com/kthakore/frozen-bubble.git
 Cannot obtain needed commit 6a40d6eb282d34233f3fc1088f62dca29ad8254a
 while processing commit c7054d545e46fc52c2afce2acff40ac1926cc0cc.
 fatal: Fetch failed.

 [...@meuh /tmp] git clone http://github.com/kthakore/frozen-bubble.git
 Initialized empty Git repository in /tmp/frozen-bubble/.git/
 got 33a6ea4f461dd2d8834f953ef6b3fc3aadaa7f91
 walk 33a6ea4f461dd2d8834f953ef6b3fc3aadaa7f91
 got 6769ff9f16dcdb43912582881bc71798293a5557
 walk 6769ff9f16dcdb43912582881bc71798293a5557
 got c7054d545e46fc52c2afce2acff40ac1926cc0cc
 got be1de28963fd5e1008f1657415bb2f387eabfc1b
 walk c7054d545e46fc52c2afce2acff40ac1926cc0cc
 got c46bc705ef70f9b7d38747fdc7bc1723485296e1
 Getting alternates list for http://github.com/kthakore/frozen-bubble.git
 got b251d7479f36064496bd889c4b35c6af2e5e5eeb
 got 4a59f6fca793762de9d276efde5c27a83c3e4efb
 got b8477303446f495e3c3c73d2fecc0f0ee0d59d7d
 got 634ce4e8154716125ac1a3dfe4fffe416764a7ba
 got ab05f0c088aa9ac1101210754bf432dcd1a593ad
 got 60481ee204bae1712fb9843b37cdb0f8b3b0ed0c
 Getting pack list for http://github.com/kthakore/frozen-bubble.git
 Getting index for pack 28008b5631a32fe2bd9e6b667da084204bfaecc7
 Getting pack 28008b5631a32fe2bd9e6b667da084204bfaecc7
 which contains 6a40d6eb282d34233f3fc1088f62dca29ad8254a
 error: Unable to get pack file

http://github.com/kthakore/frozen-bubble.git/objects/pack/pack-28008b5631a32
fe2bd9e6b667da084204bfaecc7.pack
 transfer closed with 49853388 bytes remaining to read
 error: Unable to find 6a40d6eb282d34233f3fc1088f62dca29ad8254a under
 http://github.com/kthakore/frozen-bubble.git
 Cannot obtain needed commit 6a40d6eb282d34233f3fc1088f62dca29ad8254a
 while processing commit c7054d545e46fc52c2afce2acff40ac1926cc0cc.
 fatal: Fetch failed.

 I'll try tomorrow again, maybe that's just github getting mad? For the
 record, I use git 1.6.4.4 on Linux.

 In the meantime I have had

Re: Games::Frozenbubble is on CPAN

2010-04-29 Thread Guillaume Cottenceau
Sorry I did not reply sooner, I was very busy.

On Tue, Apr 13, 2010 at 3:28 PM, Kartik Thakore
thakore.kar...@gmail.com wrote:

 Hi Guillaume,

 I did a git rebase between your master and our redesign branch to make
 the new integration branch. And it has your commits

 http://github.com/kthakore/frozen-bubble/commits/integration?page=4

I'll try to look at that soon!

 Also is there a test suite that you use for frozen-bubble? I would help
 us get frozen-bubble to production faster.

No, there's none, sorry.

 Moreover are you open to allow us to refactor the frozen-bubble file.
 It is huge and hard to maintain. We would like to make the SDL, game logic,
 networking code less coupled. If you had plans for this let us know. We
 are like blind rats in this. :)

Why not. I had no plans for this. The main problem would be newly
introduced bugs, mainly because you've little experience with that
pile of sh^Hcode. So if you could do that in small verifiable
patchsets, each of them not introducing regressions, it would in the
end be easier to identify if any regression/bug would be found. I was
happy to see it's probably already your mindset, e.g. The workflow I
am using for this is to keep running frozenbubble and fix each break.
in a commit log.

 Also I would like you to meet Tobias Liech (FROGGS). He is the other
 lead on this project.

_o/

 Oh and one off our dev has had some success in bringing our CPAN fb to
 MacOSX.

great!

 http://skitch.com/edenc/n614c/fullscreen

 Right now windows and linux are working but we have to port a lot
 before a good production release.

Ok.

Thanks for your work!

-- 
Guillaume Cottenceau - http://zarb.org/~gc/


Re: Games::Frozenbubble is on CPAN

2010-04-28 Thread Kartik Thakore


On 2010-04-28, at 8:07 AM, Guillaume Cottenceau gcott...@gmail.com  
wrote:



Sorry I did not reply sooner, I was very busy.

On Tue, Apr 13, 2010 at 3:28 PM, Kartik Thakore
thakore.kar...@gmail.com wrote:


Hi Guillaume,

I did a git rebase between your master and our redesign branch to  
make

the new integration branch. And it has your commits

http://github.com/kthakore/frozen-bubble/commits/integration?page=4


I'll try to look at that soon!


Great thanks.


Also is there a test suite that you use for frozen-bubble? I would  
help

us get frozen-bubble to production faster.


No, there's none, sorry.


Froggs has a module SDLx::Test that compares surfaces.



Moreover are you open to allow us to refactor the frozen-bubble file.
It is huge and hard to maintain. We would like to make the SDL,  
game logic,
networking code less coupled. If you had plans for this let us  
know. We

are like blind rats in this. :)


Why not. I had no plans for this. The main problem would be newly
introduced bugs, mainly because you've little experience with that
pile of sh^Hcode. So if you could do that in small verifiable
patchsets, each of them not introducing regressions, it would in the
end be easier to identify if any regression/bug would be found. I was
happy to see it's probably already your mindset, e.g. The workflow I
am using for this is to keep running frozenbubble and fix each break.
in a commit log.


Yup. Right now we are just trying to keep the code as is an get fb  
working on Debian. Once that is done we will refactor in TDD fashion.  
Unit test a component ( using SDLx::Test see github.com/FROGGS ) then  
refactor.


Currently we have single player working on windows and Linux. See the  
redesign branch in github.com/kthakore/frozen-bubble.



Also I would like you to meet Tobias Liech (FROGGS). He is the other
lead on this project.


_o/

Oh and one off our dev has had some success in bringing our CPAN fb  
to

MacOSX.


great!


http://skitch.com/edenc/n614c/fullscreen

Right now windows and linux are working but we have to port a lot
before a good production release.


Ok.

Thanks for your work!

Np.


--
Guillaume Cottenceau - http://zarb.org/~gc/


Re: Games::Frozenbubble is on CPAN

2010-04-13 Thread Kartik Thakore

I think so. Let me try this today.

Kartik Thakore

On 2010-04-13, at 4:10 AM, Guillaume Cottenceau gcott...@gmail.com  
wrote:



can you merge changes from master repository from after your cloning,
which seems to date a little? for example

commit 9253c759f56e63237cf582460d629467491177ec
Author: Guillaume Cottenceau gcott...@gmail.com
Date:   Thu Oct 22 09:37:07 2009 +0200

   do not shutdown socket if socket wasn't even created (DNS lookup
failure, for example)

is not in your repo

On Tue, Apr 13, 2010 at 2:33 AM, Kartik Thakore
thakore.kar...@gmail.com wrote:


Hi,

So we released a dev version of Frozenbubble on CPAN.
http://search.cpan.org/%7Ekthakore/Games-FrozenBubble-0.001_1/lib/Games/FrozenBubble.pm

We still have work to do but I would love your thoughts.

Our repo is on http://github.com/kthakore/frozen-bubble . The  
branch is

redesign.

Regards,
Kartik Thakore





--
Guillaume Cottenceau - http://zarb.org/~gc/


Games::Frozenbubble is on CPAN

2010-04-12 Thread Kartik Thakore


Hi,

So we released a dev version of Frozenbubble on CPAN. 
http://search.cpan.org/%7Ekthakore/Games-FrozenBubble-0.001_1/lib/Games/FrozenBubble.pm

We still have work to do but I would love your thoughts.

Our repo is on http://github.com/kthakore/frozen-bubble . The branch  
is redesign.


Regards,
Kartik Thakore


Re: HELP:Constants.pm breaks frozenbubble

2009-08-18 Thread Kartik Thakore
This is fixed now!!! Get it fresh on my master branch! More cleanups and I
think we have a new release!!

On Mon, Aug 17, 2009 at 6:16 PM, David Goehrig d...@nexttolast.com wrote:

 The black magic is perl5 typeglob programming 101. GV in the perl
 internals pods. As for the behavior change there was a reason. But I don't
 remember what it was. :)

 I will take a look when my kid is asleep.

 Dave

 -=-=- d...@nexttolast.com -=-=-


 On Aug 17, 2009, at 1:04 PM, Kartik Thakore thakore.kar...@gmail.com
 wrote:

  Ok I need some help with the black magic in lib/SDL/Constants.pm @EXPORT.
 Right now the constants can be accessed in a script that doesn't do
 Package whutever;
 SDL:: needs to be appended. Any help will be great.

 Kartik Thakore




Re: HELP:Constants.pm breaks frozenbubble

2009-08-18 Thread Kartik Thakore

How is the fix by arodland on the repo?

Kartik Thakore

On 18-Aug-09, at 2:23 AM, JusTiCe8 justi...@orange.fr wrote:


Hi everyone,

I'm not really back to SDL devlopment yet, but I have made a little  
script to use new constants design between the two SDL releases.
It's just a matter of replacing all use of constants by sub call.  
It's work with OpenGL examples but I never tried on the big   
Frozen Bubble (it was broken in debian since a long time after a sdl- 
perl package upgrade and AFAIK was never fixed).


Kartik, I'll send you what I've done, feel free to do it whatever  
you want.


Best regards.

David Goehrig a écrit :
The black magic is perl5 typeglob programming 101. GV in the perl  
internals pods. As for the behavior change there was a reason. But  
I don't remember what it was. :)

I will take a look when my kid is asleep.
Dave
-=-=- d...@nexttolast.com -=-=-
On Aug 17, 2009, at 1:04 PM, Kartik Thakore  
thakore.kar...@gmail.com wrote:
Ok I need some help with the black magic in lib/SDL/Constants.pm  
@EXPORT. Right now the constants can be accessed in a script that  
doesn't do

Package whutever;
SDL:: needs to be appended. Any help will be great.

Kartik Thakore


HELP:Constants.pm breaks frozenbubble

2009-08-17 Thread Kartik Thakore
Ok I need some help with the black magic in lib/SDL/Constants.pm  
@EXPORT. Right now the constants can be accessed in a script that  
doesn't do

Package whutever;
SDL:: needs to be appended. Any help will be great.

Kartik Thakore


Re: HELP:Constants.pm breaks frozenbubble

2009-08-17 Thread Kartik Thakore

This is in the v2.2.1 branch.

Kartik Thakore

On 17-Aug-09, at 1:04 PM, Kartik Thakore thakore.kar...@gmail.com  
wrote:


Ok I need some help with the black magic in lib/SDL/Constants.pm  
@EXPORT. Right now the constants can be accessed in a script that  
doesn't do

Package whutever;
SDL:: needs to be appended. Any help will be great.

Kartik Thakore