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-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/