4Kanabalt

I also got the high score bug . I think it has something to do with subsequent plays . I played like 5 times, and every time I restarded, things were a little crazier, with the score/ speed bar flickering between 0 and one of my previous scores

http://img8.imageshack.us/img8/5540/kanalpemba.png

after a few more plays, in the middle of the game I see a title screen flickering and some of my clicks don’t register. I’m almost sure that there are 2 (or more) instances of the game running on top of each other, and some of my clicks are registered in one instance and one in another .

I think you can reproduce it playing 7-8 times in a row .

@ java 1.6_021 - Firefox

It’s probably that the thread that updates the (previous) applet is not stopped, leaving multiple applets or multiple threads in the background, drawing to the same (native) surface.

I use a isActive() check to stop that. It’s actually more likely the thread that spawned to handle uploading a highscore - are you skipping adding your name? If so, thats a bug at the moment. Fixed next update.

Kev

Updated:

http://dl.dropbox.com/u/1668516/fourkay/kanabalt.html

  • Fixed threading issue (hopefully)
  • Added keyboard control - any key to jump
  • Added ceilings to some buildings
  • Added falling buildings

Kev

oh brilliant, falling buildings and ceilings really add a whole new layer to the gameplay, its much more challenging and enjoyable now :slight_smile:

The score still jumps when I dismiss the dialog. Is it a sequence thing - you bring up the dialog before doing a repaint with the final score? I notice that it’s not repainting anything except the parallax background while the dialog is open.

PS Ceilings IMO are the only problem the original game had.

nice little game … 3760 (my fingers were faster than brain and my eyes were outta control, thx for that experience )

Updated again:

http://dl.dropbox.com/u/1668516/fourkay/kanabalt.html

  • Should have that score bug fixed.

Kev

High scores fixed again.

Can’t reproduce the highscore offset bug any more.

Still plenty of room to add more features.

Kev

Can’t reproduce the bug any more either. Now to wait and see whether my score shows up on the leaderboard as 3170, which is what it displayed on the applet.

There it is, on the scoreboard, congratulations on top :slight_smile:

Kev

Ok, music seems to be out (the dataline type stuff just sounds too rough to me). I have some space left, what should I add? Suggestions thus far are:

  • Breaking glass
  • More defined birds
  • More background detail
  • The spacecraft that zoom in and drop bombs

Anyone got any other ideas?

Kev

+1 :slight_smile:

could just be a black line that breaks into 4/5 small lines.

If you’re interested in how I did it…


      try
      {
         AudioFormat af = new AudioFormat(sampleRate, 16, 1, true, true);
         DataLine.Info info = new DataLine.Info(SourceDataLine.class, af);
         SourceDataLine source = (SourceDataLine) AudioSystem.getLine(info);
         source.open(af);

         // increase master gain to 75%
         Type type = FloatControl.Type.MASTER_GAIN;
         FloatControl fc = (FloatControl) source.getControl(type);
         fc.setValue(fc.getMaximum() * 0.75f);

         source.start();

         while (this.isActive())
         {
              // stuff

              source.write(raw, 0, raw.length);
         }

         // adds 20 bytes :o(
         source.drain();
         source.stop();
         source.close();
      }
      catch (Exception e)
      {
         // System.out.println(e);
      }

Easy enough to feed some noise in the audio line, when the buildings crumble.

I tried out Alan_W sample from last years contest, while it played nice music it just sounds a bit wierd for the game.

Kev

Updated:

http://dl.dropbox.com/u/1668516/fourkay/kanabalt.html

  • Added breaking glass when you exit buildings

3724 bytes

Kev

hi

does not work on my mac 10.6 firefox…?
i only see ‘click mouse…’ but nothing happens
after clicking

regards

Works on 10.6 here on safari and chrome.

Will get firefox tomorrow to test.

Kev

works with safari but not firefox and firefox now!

yeaH! i played this on iphone :slight_smile:

Awesome! :smiley: