Bumble Bots Re-Pair

Bumble bots re pair


An action puzzle game that features the same bots as my earlier [Bumble Bots](https://gamebuino.com/creations/bumble-bots) creation, but is a completely different game. This one is a spin-off of this year's [Global Game Jam](https://globalgamejam.org/2020/games/robot-re-pair-3), where the theme was "repair". # Game play Extend the tracks so that the bots can be re-united (re-paired). You successfully complete a level by re-pairing all bots. You lose when the bots run out of track, you run out of time, or (in later levels) bots of different types meet.

Scoring:
You get points for every tile placed. At the end of each level, you get an extra live, or extra points if you are maxed out. You also get points for time remaining. However, you get points deducted for any remaining open ends.

Aborting:
Press MENU briefly to abort an ongoing attempt, for example when the bots are stuck and will never meet. Press MENU longer to abort the entire game.

Features

  • Mindless bots
  • Ten levels
  • Custom music track (made by my brother) - See instructions below on how to enable
  • 160x128 resolution - This is not supported by the above emulator. If you want to play it online, use this emulator instead
  • Juicy animations
  • Custom font
  • Fancy title screen
  • Help screen
  • Hi-score screen
  • Light effects

Playing tips

The tiles that you are offered are randomly selected.
However, you will always be offered tiles that fit somewhere on the grid.
Furthermore, the tiles on offer will be unique.
The order in which you place tiles and where you place them therefore matters.
Exploit this to increase the odds that you get favourable tiles.

It helps to hedge your bets.
Have a fallback plan in case you do not get tiles that match your perfect route.

At the start you may want to keep many open ends, so you can place “undesired” tiles somewhere.
Towards the end you may want to reduce the number of open ends, to increase the probability that you are offered the tiles that you still need to complete your route.

Installing music

To get the full experience, you should also download the two music tracks below and put them in the “BumbleBotsRePair” folder alongside the binary:

It’s really worth it! Also, I was very careful to leave enough CPU cycles available to play this music. It would be a shame to let that effort and those cycles go to waste :-). By the way, you can always disable the music (while keeping sound effects enabled) from the title screen.

History

Version 1.1

  • Improved music play-back (reduced sample rate to significantly lower CPU usage)
  • Note: This requires using the updated WAV files, available for download above

Version 1.0

  • Added hi-score tracking
  • Added hi-score screen
  • Various minor improvements

Version 0.2

  • Animated title screen
  • Added different bot types (and clashing of bots)
  • Added two new levels
  • Added light effects
  • Added ability to abort game
  • Reduced CPU usage when placing tiles

Version 0.1
Initial release

Feedback welcome

Let me know how you get on. What do you think of the difficulty? Did you manage to complete all levels?

See more

Game saw, i have to test it this evening and feed back next

I just released Version 1.0, which should be the final version. However, if it still contains bugs, let me know and I will try to fix those.

This version includes tracking of hi-scores. Can anyone beat my current score?
hi-scores

1 Like

Hello Eriban,
Il n’y a pratiquement plus rien au dessus de 7000Hz dans ta musique, donc peut être que si tu convertis ton wav à 8000Hz au lieu des 44100 actuels il y a moyen de gagner en perf ?
Je ne pense pas que le systeme de resitution sonore de la GB te permette de d’entendre une différence… A tester :slight_smile:

Hi gibs,
Thanks for your suggestion. It is indeed true that the music itself does not require 44.1 kHz. It originally was 22050 Hz and I had to actually convert it to a higher frequency.

The problem, however, is that as far as I know, the Gamebuino API only supports playing WAV files of 44.1 kHz (see to the sound play documentation). I assume that the sound hardware requires 44.1 kHz and the most efficient way to provide it is if the raw input matches that. Otherwise it still needs to be dynamically up-sampled.

If I am wrong though and there is a way to (efficiently) play WAV files with lower bit-rates, I’d be very interested to hear that. :slight_smile:

Hi back,
I am a newbie, but I already manage to play a 22050 Hz mono wav music on the gamebuino (I have just checked).

I also just tried, but it does not work for me. When I save the WAVs at 22050 Hz, they play twice as fast on the Gamebuino. Here are the tracks at 22050 Hz:
bb-track1-intro-22050.wav
bb-track1-loop-22050.wav
You need to remove the “-22050” postfix if you want to try using these in my game. Should I somehow save them differently?

Ok I don’t remember exactly how I did but I have used this link : https://gamebuino.com/fr/community/topic/jouer-du-son

Note: I haven’t modified gamebuino.h

For direct result you can use audacity and resample the music to 22 or 11KHz and when you save, you need to save in 8bits.
I just did it. That works :slight_smile:

But… The music will sound a bit downgraded…

I still have a music that I have converted I don’t know how, but it sounds very clear and without 8Bits artefact. Excellent quality. I remember the online converter was working around 1 month ago, maybe I have used it.
The result : https://www.youtube.com/watch?v=MctYQcx424M

I still have the music converted, that I can send you.

I need to investigate how I did that, but it’s sad the online converter is not there anymore.

edit : oh, ok… I just notice that your original track is already noisy.
edit2: the audio converter still work: https://audio.online-convert.com/convert-to-wav

Via the first link you sent I discovered that you also need to redefine the SOUND_FREQ setting in config-gamebuino.h. After doing that, the music plays at normal speed, and CPU usage indeed seems decreased :slight_smile:

Unfortunately, it also impacts the sound effects. These now play faster, if at all. They also do not play reliably. Some sound effects sometimes do not make a sound at all. So something is wrong there. This will therefore require some further investigation before I can enable it.

Update: I made some progress. After fixing a bug in the Gamebuino library, the sound effects play at normal speed, also at 22 kHz. Also, the sound effects play reliably again after I restored the sound buffer size to its default. I still want to investigate why changing it caused problems at 22 kHz, while it works fine at 44 kHz.

I don’t know if I was clear enough, but for me (without any fix), I get it works by loading a music in audacity, reducing the frequency at 11 or 22KHz et saving as 8Bits.

Hi gibs. Yes, that was clear to me. I also used audacity to convert the sound track to 22 kHz and 8 bits, but need to change SOUND_FREQ to ensure it played at the correct speed. Strange…

Anyway, I am now diving into the Gamebuino Sound FX library, and think I can make some improvements there so that it works. In fact, it may even fix some problems with sounds when the default buffer size and sample rate is used.

I am hopeful that I can get it all working without too much problems. Fingers crossed… :slight_smile:

Update: I managed to refactor the sound FX generation, and it all seems to work fine now. So expect a new version of the game with better music and sound FX in the near future. After further polishing my changes, I will also offer my changes via a Pull Request to the Gamebuino library. Let’s see if they then get accepted.

2 Likes

It’s out of subject of your Bumble Bots Re-Pair but thanks to works ond Sound FX library. Playing music generated is alot better for games but i never understood how to play my sequences. I had played note but it was old school mehod and thee was cool mechanics to play sequences of music but no good tutorial to use it. If you works on it, i’m sure you’ll explain your improvments and how to use it fine :wink:

Yes, maybe we can continu in the existing link I have provided ?
Anyway, I have checked my config-gamebuino.h and I have nothing related with sound.
I just start to play the music with gb.sound.play(“music.wav”); in void setup()

Just released Version 1.1, with improved music and sound effects.

@gibs, not sure why it works for you, but it does not really matter, as I got it to work as desired. The size of the files is reduced, CPU usage is significantly lower, and I can use a larger buffer to mitigate delays when reading WAV files. :slight_smile:

@jicehel, my improvements to the Sound FX library are only to the implementation. It does not change the API, so it will not be easier to create sound effects, I’m sorry to say. :frowning:

Hum, maybe you’ll understand and make it enough clear to be able to use it. Nobody use it (or near) atm because nobody understand how to use it for music for example.

possible to use atmlib on gb ? https://www.youtube.com/watch?v=m1ub6Ye711c

I can’t really answer as i’m not good enough but i have wrote what i known in other post for not change subject of this subject on Bumble Bots Re-Pair