{"id":16143326,"url":"https://github.com/midzer/sdl-ball","last_synced_at":"2025-04-06T19:25:20.769Z","repository":{"id":248705477,"uuid":"721352190","full_name":"midzer/sdl-ball","owner":"midzer","description":"Brick-breaking game like DX-Ball/Arkanoid ported for the web","archived":false,"fork":false,"pushed_at":"2024-07-16T13:40:40.000Z","size":4792,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-13T01:31:06.507Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://midzer.de/wasm/sdl-ball/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/midzer.png","metadata":{"files":{"readme":"README","changelog":"changelog.txt","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-20T22:07:15.000Z","updated_at":"2024-07-21T20:06:51.000Z","dependencies_parsed_at":"2024-07-16T16:54:23.799Z","dependency_job_id":null,"html_url":"https://github.com/midzer/sdl-ball","commit_stats":null,"previous_names":["midzer/sdl-ball"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midzer%2Fsdl-ball","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midzer%2Fsdl-ball/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midzer%2Fsdl-ball/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midzer%2Fsdl-ball/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/midzer","download_url":"https://codeload.github.com/midzer/sdl-ball/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247537123,"owners_count":20954889,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T00:08:57.897Z","updated_at":"2025-04-06T19:25:20.732Z","avatar_url":"https://github.com/midzer.png","language":"C++","funding_links":[],"categories":["Games"],"sub_categories":[],"readme":"-- SDL-Ball --\n - A DX-Ball/MegaBall/Breakout clone for linux+friends (and windows)\n   with pretty graphics.\n\n-- Index --\n1.0 SDL-Ball Info and License\n1.1 Objective\n1.2 Controls and Keys\n1.2.1 Keyboard Controls\n1.2.2 Mouse Controls\n1.2.3 WiiMote Controls\n1.2.4 Joystick Controls\n1.3 Saving and Loading\n1.4 Configuration\n1.4.1 Mouse\n1.4.2 Keyboard\n1.4.3 Digital Joystick\n1.4.4 Analog Joystick\n1.4.5 WiiMote\n1.4.6 Config options explained\n\n2.0 Compiling\n2.1  Without sound\n2.2  With WiiMote support\n2.3  For system-wide installation\n\n3.0 Themes\n3.1 How to use a diffrent theme\n3.2 How to make your own theme\n\n4.0 Contributors and Credits\n\n5.0 Frequently Asked Questions (FAQ)\n\n------------------------------------\n\n1.0 SDL-Ball Info\nAuthor: Jimmy Christensen\nProject page: https://github.com/DusteDdk/SDL-Ball\nWeb site: http://sdl-ball.sourceforge.net/\n\nLicense:\nCode, Graphics, Levels, Sound are GPLv3\nSee themes/default/font/COPYING for font licenses.\n\n2020:\nSDL-Ball was a hobby project of mine, it was my first computer game,\nand I did learn a lot from it. Lots of things are done wrong here, because,\nat the time, I didn't know any better. So don't use this as an example\nof how to do a game. That being said, it WORKS, and I'm not going to\nrewrite it, or majorly refactor it to make it more \"right\".\nI'm also not going to hide it out of shame, I'm actually proud that I managed\nto make it back when I did.. As far as I recall, I wrote most of it in Kate.\nSo, I'm keeping it up, it's actually a nice game and people would miss it if\nI take it down. I'll also try and maintain it a bit better than I've done the\npast.. Many years. Other than that, I've nothing to add :)\n\n200?\nSDL-Ball is my hobby project, I'm using it to learn C++ and\nhow not to design software, I learn by trial and error, thats\nwhat makes it fun for me, so please, spare me the lessons.\nIf you want to clean it up, I'll gladly accept your patches.\n\n------------------------------------\n\n1.1 Objective\nThe objective of the game is to control the paddle in order to keep\nthe ball from falling down, by precise controlling you are able to\nreflect the ball into bricks. Hitting bricks gives points and powerups.\nCollecting powerups make the game easier or harder depending on the type.\nPowerups gives you \"coins\" (you never now exactly how many coins you have),\nand you can spend them on... Powerups :D\nWhen all breakable bricks are destroyed, the level ends, and next level is on.\nWhen all levels are completed, game start from level1 again, but with twice the score.\n\n------------------------------------\n\n1.2 Controls and keys\nThere are several ways to control the paddle, the preferred is using the mouse\nbut you can also use your keyboard, joystick or wiimote (wiimote, see 1.4.5 2.0 and 2.2)\n\n1.2.1 Keyboard controls\nw   - Bring up wiimote connection dialog (only if compiled with wiiuse)\ns   - Take Screenshot (saves in ~/.config/sdl-ball/screenshots/)\nu   - Turn off screen clearing (gives some really cool/weird effects if background is turned off)\np   - Pause\nPause -Pause\nESC - Pause and Show Menu\nF1  - Show titlescreen\nF11 - Toggle Fullscreen\nc   - Show/Hide clock (Shows what time it is)\n\nv   - Select Powerup (Next)\nb   - Buy selected Powerup\nn   - Select Powerup (Previous)\n\nArrow Up - Shoot/Launch ball\nArrow Left and Right - Move paddle left or right (See 1.4.2)\n\n\n1.2.2 Mouse controls\nButton1 - Shoot/Launch ball\nButton2(Right Click) - Buy Powerup.\nMouse Down/Up - Select Powerup to buy.\nX axis - Move Paddle\n\n1.2.3 WiiMote controls\nButton 1 - Buy Item.\nButton 2 - Shoot/Launch ball\n+ left and right - Select powerup to buy.\nTilt left or right to move paddle.\n\n1.2.4 Joystick controls\nButton1 - Shoot/Launch ball\nButton2 - Buy powerup.\nX axis - Move Paddle\nY axis - Selevt powerup to buy.\n\n------------------------------------\n\n1.3 Saving and Loading\nTo save your game, press ESC, and click the save-button in the menu\nchoose a slot and enter a name for the savegame,\nthen press enter to save.\nSaving only saves the game as it is in the START of the level.\nYou can't save in level 1... Obviously, since you made no progress :)\n\nTo load a game, press ESC and click the load-button in the menu\nthen choose a game.\n\n------------------------------------\n\n1.4 Configuration\n~/ means your home-directory.\nThe game saves its configuration in ~/.config/sdl-ball/settings.cfg\nIf you choose an unsupported resolution you can correct it in that file, see 1.4.6.\nIf you want to clear the highscores list, delete ~/.config/sdl-ball/highscores.txt\nIf you want to clear savegames, delete ~/.config/sdl-ball/savegame.sav\nEdit this file with any text-editor to change options that are not reached from the menu.\n\n1.4.1 Mouse\nThe mouse have no configuration options, you might want to adjust\nyour mousespeed from your window-manager.\n\n1.4.2 Keyboard\nUse the arrow keys to control the paddle, up to shoot and launch the ball.\nYou can change theese in the config file with the options:\nleftkey, rightkey and shootkey however, you have to use SDLK numbers (see link in 1.4.6.)\nYou might want to tweak controlmaxspeed, controlaccel and controlstartspeed,\nwhich are also explained in 1.2.6.\n\n1.4.3 Digital Joystick\nA digital joystick is a stick connected to 4 buttons, therefore it provides\nvery poor control, ie. its either ON or OFF, therefore, if you use such a joystick\nbe sure to choose \"Digital Joystick\" in the joystick options menu. You can tweak\ntweak controlmaxspeed, controlaccel and controlstartspeed. (explained in 1.4.6.)\n\n1.4.4 Analog Joystick\nA analog joystick provides accurate control, if you use a analog joystick you\nneed to choose \"Analog Joystick\" in the joystick options menu, then make sure\nthe stick is centered, press \"Callibrate\", push joystick button shortly,then\npush the stick left, press button shortly, and finally push the stick right and press\nbutton shortly.\nYou can tweak controlmaxspeed (explained in 1.4.6.) it acts as sensitivity.\nCallibration values are saved to config so you won't need to callibrate again.\n\n1.4.5 WiiMote\nYou need to compile sdl-ball with support for libwiiuse, read more about this under 2.2.\nYou need to connect the wiimote every time you start the game.\nTo connect the wiimote simply press \"w\" then press 1 and 2 on the WiiMote.\nYou can run sdl-ball from a terminal to see some debugging message from libwiiuse.\nYou can tweak controlmaxspeed (explained in 1.4.6) it acts as sensitivity.\n\n1.4.6 Config options explained\nclearscreen [0/1] - clears the scene before drawing (looks pretty funny if you dont)\neyecandy [0/1] - turns on nice particle effects and trails, saves a few cpu cycles to turn it off\nresx - horizontal resolution\nresy - vertical resolution\nshowbg [0/1] - show the background image\nfullscreen [0/1] - use full-screen mode\nparticlecollide [0/1] - use collision detection for particles, looks nice but might a cpu hog\nsound [0/1] - use sound effects (sound effects will allways be loaded) (requires compiled with sound support)\nstereo [0/1] - use stereo, some people don't like stereo, might save a few cpu cycles to turn it off\ncontrolmaxspeed - the max speed the paddle can travel with when using non-mouse controllers.\n                  10 is VERY fast, this acts as sensitivity for WiiMote and analog joystick.\ncontrolaccel - the acceleration that the paddle gains when using digital joystick or keyboard for controlling.\ncontrolstartspeed - the starting speed (the \"lowest\" speed) of the paddle when using digital joystick or keyboard.\nrightkey - SDLK number of the key that makes the paddle travel right\nleftkey - same as above, but left.\nnextkey - Select next powerup.\nbuykey  - Buy selected powerup.\nprevkey - Select previous powerup.\nshootkey - the key that makes the guns shoot and releases the ball.\nCheck this site for sdl key numbers: http://kobesearch.cpan.org/htdocs/SDL_Perl/SDL/Constants.pm.html#SDLK_0-\njoyisdigital [0/1] - if this is 1, the joystick acts as a \"dump\"/digital joystick (behaving excatly like the keyboard)\n                     if this is 0, the joystick acts as a analog/precise joystick.\njoycal* - callibration values from the joystick callibration process.\njoyenabled [1/0] - if 1 then joystick is enabled (set to 0 if you experience random movement/controlling error)\nsndtheme - Case sensetive name of the sound-theme dir to use.\ngfxtheme - Case sensetive name of the gfx-theme dir to use.\nlvltheme - Case sensetive name of the level-theme dir to use.\n\n------------------------------------------------------------------------------------------------------------\n\n2.0 Compiling\nThe basic requirements for compiling sdl-ball is the following libs AND THEIR DEVELOPMENT FILES:\nOpenGL\nLibGLU\nSDL1.2\nSDL-image1.2\nSDL-ttf1.2\nSDL-mixer1.2\nMake, a working C++ compiler and stdlibc++6\n\nTo compile, extract the SDL-Ball tarball (since you're reading this I figure you allready did) and cd into the dir.\nType make and press enter.\n\nIf you get errors: error: SDL.h: No such file or directory\nAnd you're SURE you have dev libs installed, add -I/usr/include/SDL to CFLAGS in Makefile\n\n2.1 Without sound\nIf you don't have a soundcard/have a very weak computer/don't have SDL-mixer you can compile without sound support.\nThis removes SDL-mixer dependancy.\nTo turn off sound support, you need to edit two files:\nMakefile: remove -lSDL_mixer\nmain.cpp: remove #define WITH_SOUND\n\n2.2 With WiiMote support\nTo enable WiiMote support you need to have a working installation of\nlibwiiuse ( http://www.wiiuse.net/ ) I won't get into installing that.\nYou also need a working blue-tooth dongle w/driver and all, if you can't run the\nexample-program from wiiuse, you need to fix those problems before trying to compile sdl-ball.\nYou need to have a systemwide install of wiiuse ( sudo make install in the wiiuse dir ).\nYou need to edito two files to enable WiiMote support:\nMakefile: add -lwiiuse to LDFLAGS\nmain.cpp: remove the // in front of #define WITH_WIIUSE\n\n2.3 For systemwide installation Because every linux dist is diffrent, \nI can't know where it would be nice to put the datafiles (themes) for sdl-ball,\nyou might want to use a dir like /usr/local/share/sdl-ball\nIn that case, make a directory there, and put \nthe themes dir into it. Then compile with\nmake -DDATADIR=\"/usr/share/sdl-ball/themes\"\n\n------------------------------------\n\n3.0 Themes\nThemes can, but don't have to, consist of several things, in SDL-Ball a theme can contain:\nlevels - other levelsets are always nice.\ngraphics - all the graphics in sdl-ball can be changed by the theme.\nsounds - you can customise sounds aswell.\nThemes can be stored in 2 diffrent places: Either in ~/.config/sdl-ball/themes/\nor in sdl-balls own sdl-ball/themes folder.\n\n3.1 How to use a diffrent theme\nYou can choose a theme from the options menu.\nYou can mix sound, gfx and level thems in the settings file (see 1.4 and 1.4.6)\n\n3.2 How to make your own theme\nhttp://sdl-ball.sourceforge.net/?page=themes for more information on themes, it's really easy! ;)\n\n------------------------------------\n\n4.0 Contributors and Credits\nPeople who have directly helped the SDL-Ball project, chronologically:\nQuinton \"quin\" Reeves - Windows Port.\nCiddk - Website and Bugreports\nEvgeni Golov - Suggestions, comments, insight, Debian package\n\"Dionos\" - The dio-sound-theme.\nyugrotavele - The AUR package\nkfgz - Patching\nYannickescu - AROS port\n\n\n------------------------------------\n\n5.0 Frequently Asked Questions\nQ: The paddle moves around randomly, or is stuck in one of the sides?\nA: try disabling joystick support in the settings.cfg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmidzer%2Fsdl-ball","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmidzer%2Fsdl-ball","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmidzer%2Fsdl-ball/lists"}