GithubHelp home page GithubHelp logo

porridge / bambam Goto Github PK

View Code? Open in Web Editor NEW
69.0 7.0 35.0 4.91 MB

keyboard mashing and doodling game for babies and toddlers

License: GNU General Public License v3.0

Python 57.67% Roff 36.56% Makefile 1.94% Shell 3.83%
baby game toddler hacktoberfest

bambam's Introduction

Bambam

Build Status Translation Status

Bambam is a simple baby keyboard (and gamepad) masher application that locks the keyboard and mouse and instead displays bright colors, pictures, and sounds. While OSX has great programs like AlphaBaby, the original author couldn't find anything for Linux and having wanted to learn Python for a while, Bambam was his excuse.

Bambam screenshot

Installation

From a distribution package

First, see if your distribution has a bambam package already. This way takes care of dependencies, translated program messages, .desktop files and manual pages.

For example:

sudo apt install bambam
man bambam

Manual installation

If not, you can install it manually as follows.

Before installing this application, ensure you have the following installed:

Then:

  1. Download the bambam-1.3.0.zip or bambam-1.3.0.tar.gz file.
  2. Unzip bambam-1.3.0.zip or tar zxvf bambam-1.3.0.tar.gz to create the bambam-1.3.0 directory.
  3. Change into the bambam-1.3.0 directory
cd bambam-1.3.0

Then you can read the documentation with:

man ./bambam.6

If you would like to take advantage of the recommended way to start the game (see the next section) do the following:

sed -i -e "s,/usr/games/bambam,`pwd`/bambam.py," bambam-session.desktop
sudo mkdir -p /etc/X11/sessions
sudo cp bambam-session.desktop /etc/X11/sessions/

For an alternative way to start the game from your applications menu, do the following:

sed -i -e "s,/usr/games/bambam,`pwd`/bambam.py," bambam.desktop
mkdir -p ~/.local/share/applications
cp bambam.desktop ~/.local/share/applications/

Usage

Once installed, there are two ways to run the game:

  1. Recommended: as a dedicated graphical session.

    When logging into your system, look for a gear icon, which opens a drop-down menu of available session types. Select BamBam and log in.

    This way only the game is launched, and the user is logged out as soon as the game quits. Thanks to this, a child is not able to cause any damage even if he or she somehow manages to quit the game.

    This way is safer, but more cumbersome.

  2. Alternative: Directly from a terminal, or applications menu.

    Select the game from your applications menu, or to run the game from a terminal window, type bambam if you installed from a distribution package, or ./bambam.py if you installed manually.

    Why this way is not recommended:

    This way the program runs as part of a regular session. The game tries to grab the keyboard and mouse pointer focus in order to prevent a child from exiting the game or switching away from it. However it is not 100% bulletproof, depending on the exact environment.

    This way is easier, but potentially more risky. Take care when leaving your child unattended with the game.

Exiting

To exit, just directly type the command mentioned in the upper left-hand corner of the window. In the English locales, this is:

quit

Extensions

Extensions are a way to change how Bambam behaves. They are supported since version 1.3.0, currently as an experimental feature.

Extensions are directories containing media files as well as a file describing how the game should behave when a certain event happens. Anyone can create an extension, it does not require programming skills.

Currently there is only a single extension bundled with the game:

  • alphanumeric-en_US - this extension makes the program play recordings of American English pronounciation of letters and digits when the corresponding keys are pressed.

To use an extension:

  1. Make sure the extension directory is located in one of the extension base directories, that is:

    • extensions/ in the same directory as the bambam program,
    • $HOME/.local/share/bambam/extensions/,
    • /usr/share/bambam/extensions/ - if the program is installed from your distribution's package.
  2. Pass the --extension option followed by the name of the extension on program invocation.

    For example ./bambam.py --extension alphanumeric-en_US.

See separate documentation on creating extensions if you would like to create your own extension or change an existing one.

More information

More information is in the manual page. To view it, type:

man ./bambam.6

Comments or suggestions? Any feedback is appreciated, please send it to the bambam-users forum.

Translations for this game are done on Weblate. Please help translating for your mother tongue!

History

This project was moved from its code.google.com location in April 2015, since that site was about to be shut down.

Note that changes (as of 2010-08-17) from the launchpad bambam fork had been merged back to this project in February 2014.

The sounds for the alphanumeric-en_US extension were copied from https://github.com/porridge/bambam-media and are distributed under the terms of the GNU General Public License.

bambam's People

Contributors

albanobattistella avatar alfredoprades avatar booniepepper avatar brammeleman avatar comradekingu avatar dasistdaniel avatar dependabot[bot] avatar hekkup avatar jakubfabijan avatar josprachi avatar maronghappy avatar marsoft avatar mgodlewski avatar mrdon2 avatar nathanbnm avatar nicolasbrailo avatar porridge avatar pre-commit-ci[bot] avatar realpixelcode avatar sbgodin avatar shtrom avatar stephengeorgewest avatar technologyclassroom avatar weblate avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bambam's Issues

SyntaxWarning about "is" operator

Hi. When I try to run bambam on my ArchLinux system with python3, I get the following error:

/usr/bin/bambam:100: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if colorkey is -1:
Traceback (most recent call last):
  File "/usr/bin/bambam", line 23, in <module>
    import pygame
ModuleNotFoundError: No module named 'pygame'

If I change the header of the file to python2, however, everything works. That means that it's some code that needs to be ported to python3, am I correct? Can you please do that (or temporarily revert to python2)?

Thanks for the project again!

not getting the binary to run from downloaded zip

downloaded bambam-master.zip

$ ./bambam.desktop 
kf.service.services: KApplicationTrader: mimeType "x-scheme-handler/file" not found

and then the .desktop file opens in my text editor

I'm using KDE Neon

Run from any directory

Bambam cannot be ran from the gnome panel.  It should be able to
auto-detect its base directory


Original issue reported on code.google.com by [email protected] on 22 Apr 2008 at 1:50

bambam hardcodes resolution

bambam currently hardcodes the display resolution to 800x600. this is not 
necessary or optimal.

attached is a patch to have bambam use the resolution the display is currently 
set at.

Original issue reported on code.google.com by [email protected] on 3 Aug 2010 at 5:12

Attachments:

My baby can easily escape this program with XFCE shortcuts

Observed behavior:

My baby has successfully pressed the following XFCE shortcuts, which have inadvertently escaped this game:

  • Super key (opens the XFCE whisker menu)
  • Alt+space (opens the window's context menu)

These shortcuts are very easy to access, especially since they are both near the bottom of the keyboard, which is basically all my baby can reach from my chair.

Expected behavior:

Window manager keyboard shortcuts are expected to be disabled until the game is exited.

Alternatively, the program is expected to be able to be run directly from a TTY and start a display server like gamescope or something like that on its own, so that no window manager keyboard shortcuts are available.

Additional fluff:

Thanks for this FOSS. I have been looking for something like this, that allows my baby to just bash the keyboard and see what happens. My dad wrote a game in the 80s for DOS called "funkeys" for me and my brother to bash the keyboard way back then that drew random-colored and random-sized shapes on the screen, and played a random PC speaker tone with each keystroke, but he unfortunately lost the source code for that. Now that I have a kid, I wanted to give the same kind of introduction to computer keyboards.

I wish there was sound in it. Even a random-pitch super short beep with each keystroke would be cool. Obviously no pressure though. It's FOSS, after all. Edit: Apparently I was experiencing an easyeffects + pipewire issue that prevented all sound the first time I tried this program. Excuse me. There is sound!

Commands don't match with non-us keyboard

I default to Dvorak keyboard, and the the letters show up as expected, but the commands don't work. I typed the commands as if I were using a QWERTY layout, and they work.

Feature to show small in-app help text

Currently Bambam doesn't show any in-app help text. When I started the program the first time, I was confused about how to quit the program. Didn't read the manual... And it shouldn't be a requirement for the user to first read the manual. This a usability issue. If the user doesn't know how to switch to console and kill the program (that's what I needed to do), there's a serious risk the user might lose important unsaved work, for example, when (s)he cannot turn off the program by any other way than rebooting.

To fix this, I suggest there could be a little text showing the most important commands, e.g. "Commands: quit, mute, unmute". If the text is in dim color and in e.g. upper left corner it won't get in the way.

Unable to exit with non-Latin keyboard layouts

After the latest release I tried bambam with a Greek keyboard layout. Greek letters appear, nice. But as the user is now unable to type 'quit' (the program reads ";θιτ"), she/he would need to kill it from a tty.
-*-
I know a couple of kids that had a good time mashing my keyboard. Thanks for this game!

Blocking [CTRL-]Alt-Fx ?

Hi,

My toddler has been thoroughly enjoying BamBam on his own computer while daddy is working on his.

But of late, he has managed to switch to a different VTY.

I didn't find any immendiate solution (read: I was lazy and didn't search thoroughly if at all possible), but I wonder if this can be blocked at all?

(Sorry for crossposting in the google-group as well)

Nicer images and sounds

I'm sure children would appreciate some nice animal images and sounds such as the one contributed in #30 - however these lack license information so I'm reluctant to accept them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.