| 1 |
-- SDL-Ball -- |
| 2 |
- A DX-Ball/MegaBall/Breakout clone for linux+friends (and windows) |
| 3 |
with pretty graphics. |
| 4 |
|
| 5 |
-- Index -- |
| 6 |
1.0 SDL-Ball Info and License |
| 7 |
1.1 Objective |
| 8 |
1.2 Controls and Keys |
| 9 |
1.2.1 Keyboard Controls |
| 10 |
1.2.2 Mouse Controls |
| 11 |
1.2.3 WiiMote Controls |
| 12 |
1.2.4 Joystick Controls |
| 13 |
1.3 Saving and Loading |
| 14 |
1.4 Configuration |
| 15 |
1.4.1 Mouse |
| 16 |
1.4.2 Keyboard |
| 17 |
1.4.3 Digital Joystick |
| 18 |
1.4.4 Analog Joystick |
| 19 |
1.4.5 WiiMote |
| 20 |
1.4.6 Config options explained |
| 21 |
|
| 22 |
2.0 Compiling |
| 23 |
2.1 Without sound |
| 24 |
2.2 With WiiMote support |
| 25 |
2.3 For system-wide installation |
| 26 |
|
| 27 |
3.0 Themes |
| 28 |
3.1 How to use a diffrent theme |
| 29 |
3.2 How to make your own theme |
| 30 |
|
| 31 |
4.0 Contributors and Credits |
| 32 |
|
| 33 |
5.0 Frequently Asked Questions (FAQ) |
| 34 |
|
| 35 |
------------------------------------ |
| 36 |
|
| 37 |
1.0 SDL-Ball Info |
| 38 |
Author: Jimmy Christensen |
| 39 |
Project page: https://github.com/DusteDdk/SDL-Ball |
| 40 |
Web site: http://sdl-ball.sourceforge.net/ |
| 41 |
|
| 42 |
License: |
| 43 |
Code, Graphics, Levels, Sound are GPLv3 |
| 44 |
See themes/default/font/COPYING for font licenses. |
| 45 |
|
| 46 |
2020: |
| 47 |
SDL-Ball was a hobby project of mine, it was my first computer game, |
| 48 |
and I did learn a lot from it. Lots of things are done wrong here, because, |
| 49 |
at the time, I didn't know any better. So don't use this as an example |
| 50 |
of how to do a game. That being said, it WORKS, and I'm not going to |
| 51 |
rewrite it, or majorly refactor it to make it more "right". |
| 52 |
I'm also not going to hide it out of shame, I'm actually proud that I managed |
| 53 |
to make it back when I did.. As far as I recall, I wrote most of it in Kate. |
| 54 |
So, I'm keeping it up, it's actually a nice game and people would miss it if |
| 55 |
I take it down. I'll also try and maintain it a bit better than I've done the |
| 56 |
past.. Many years. Other than that, I've nothing to add :) |
| 57 |
|
| 58 |
200? |
| 59 |
SDL-Ball is my hobby project, I'm using it to learn C++ and |
| 60 |
how not to design software, I learn by trial and error, thats |
| 61 |
what makes it fun for me, so please, spare me the lessons. |
| 62 |
If you want to clean it up, I'll gladly accept your patches. |
| 63 |
|
| 64 |
------------------------------------ |
| 65 |
|
| 66 |
1.1 Objective |
| 67 |
The objective of the game is to control the paddle in order to keep |
| 68 |
the ball from falling down, by precise controlling you are able to |
| 69 |
reflect the ball into bricks. Hitting bricks gives points and powerups. |
| 70 |
Collecting powerups make the game easier or harder depending on the type. |
| 71 |
Powerups gives you "coins" (you never now exactly how many coins you have), |
| 72 |
and you can spend them on... Powerups :D |
| 73 |
When all breakable bricks are destroyed, the level ends, and next level is on. |
| 74 |
When all levels are completed, game start from level1 again, but with twice the score. |
| 75 |
|
| 76 |
------------------------------------ |
| 77 |
|
| 78 |
1.2 Controls and keys |
| 79 |
There are several ways to control the paddle, the preferred is using the mouse |
| 80 |
but you can also use your keyboard, joystick or wiimote (wiimote, see 1.4.5 2.0 and 2.2) |
| 81 |
|
| 82 |
1.2.1 Keyboard controls |
| 83 |
w - Bring up wiimote connection dialog (only if compiled with wiiuse) |
| 84 |
s - Take Screenshot (saves in ~/.config/sdl-ball/screenshots/) |
| 85 |
u - Turn off screen clearing (gives some really cool/weird effects if background is turned off) |
| 86 |
p - Pause |
| 87 |
Pause -Pause |
| 88 |
ESC - Pause and Show Menu |
| 89 |
F1 - Show titlescreen |
| 90 |
F11 - Toggle Fullscreen |
| 91 |
c - Show/Hide clock (Shows what time it is) |
| 92 |
|
| 93 |
v - Select Powerup (Next) |
| 94 |
b - Buy selected Powerup |
| 95 |
n - Select Powerup (Previous) |
| 96 |
|
| 97 |
Arrow Up - Shoot/Launch ball |
| 98 |
Arrow Left and Right - Move paddle left or right (See 1.4.2) |
| 99 |
|
| 100 |
|
| 101 |
1.2.2 Mouse controls |
| 102 |
Button1 - Shoot/Launch ball |
| 103 |
Button2(Right Click) - Buy Powerup. |
| 104 |
Mouse Down/Up - Select Powerup to buy. |
| 105 |
X axis - Move Paddle |
| 106 |
|
| 107 |
1.2.3 WiiMote controls |
| 108 |
Button 1 - Buy Item. |
| 109 |
Button 2 - Shoot/Launch ball |
| 110 |
+ left and right - Select powerup to buy. |
| 111 |
Tilt left or right to move paddle. |
| 112 |
|
| 113 |
1.2.4 Joystick controls |
| 114 |
Button1 - Shoot/Launch ball |
| 115 |
Button2 - Buy powerup. |
| 116 |
X axis - Move Paddle |
| 117 |
Y axis - Selevt powerup to buy. |
| 118 |
|
| 119 |
------------------------------------ |
| 120 |
|
| 121 |
1.3 Saving and Loading |
| 122 |
To save your game, press ESC, and click the save-button in the menu |
| 123 |
choose a slot and enter a name for the savegame, |
| 124 |
then press enter to save. |
| 125 |
Saving only saves the game as it is in the START of the level. |
| 126 |
You can't save in level 1... Obviously, since you made no progress :) |
| 127 |
|
| 128 |
To load a game, press ESC and click the load-button in the menu |
| 129 |
then choose a game. |
| 130 |
|
| 131 |
------------------------------------ |
| 132 |
|
| 133 |
1.4 Configuration |
| 134 |
~/ means your home-directory. |
| 135 |
The game saves its configuration in ~/.config/sdl-ball/settings.cfg |
| 136 |
If you choose an unsupported resolution you can correct it in that file, see 1.4.6. |
| 137 |
If you want to clear the highscores list, delete ~/.config/sdl-ball/highscores.txt |
| 138 |
If you want to clear savegames, delete ~/.config/sdl-ball/savegame.sav |
| 139 |
Edit this file with any text-editor to change options that are not reached from the menu. |
| 140 |
|
| 141 |
1.4.1 Mouse |
| 142 |
The mouse have no configuration options, you might want to adjust |
| 143 |
your mousespeed from your window-manager. |
| 144 |
|
| 145 |
1.4.2 Keyboard |
| 146 |
Use the arrow keys to control the paddle, up to shoot and launch the ball. |
| 147 |
You can change theese in the config file with the options: |
| 148 |
leftkey, rightkey and shootkey however, you have to use SDLK numbers (see link in 1.4.6.) |
| 149 |
You might want to tweak controlmaxspeed, controlaccel and controlstartspeed, |
| 150 |
which are also explained in 1.2.6. |
| 151 |
|
| 152 |
1.4.3 Digital Joystick |
| 153 |
A digital joystick is a stick connected to 4 buttons, therefore it provides |
| 154 |
very poor control, ie. its either ON or OFF, therefore, if you use such a joystick |
| 155 |
be sure to choose "Digital Joystick" in the joystick options menu. You can tweak |
| 156 |
tweak controlmaxspeed, controlaccel and controlstartspeed. (explained in 1.4.6.) |
| 157 |
|
| 158 |
1.4.4 Analog Joystick |
| 159 |
A analog joystick provides accurate control, if you use a analog joystick you |
| 160 |
need to choose "Analog Joystick" in the joystick options menu, then make sure |
| 161 |
the stick is centered, press "Callibrate", push joystick button shortly,then |
| 162 |
push the stick left, press button shortly, and finally push the stick right and press |
| 163 |
button shortly. |
| 164 |
You can tweak controlmaxspeed (explained in 1.4.6.) it acts as sensitivity. |
| 165 |
Callibration values are saved to config so you won't need to callibrate again. |
| 166 |
|
| 167 |
1.4.5 WiiMote |
| 168 |
You need to compile sdl-ball with support for libwiiuse, read more about this under 2.2. |
| 169 |
You need to connect the wiimote every time you start the game. |
| 170 |
To connect the wiimote simply press "w" then press 1 and 2 on the WiiMote. |
| 171 |
You can run sdl-ball from a terminal to see some debugging message from libwiiuse. |
| 172 |
You can tweak controlmaxspeed (explained in 1.4.6) it acts as sensitivity. |
| 173 |
|
| 174 |
1.4.6 Config options explained |
| 175 |
clearscreen [0/1] - clears the scene before drawing (looks pretty funny if you dont) |
| 176 |
eyecandy [0/1] - turns on nice particle effects and trails, saves a few cpu cycles to turn it off |
| 177 |
resx - horizontal resolution |
| 178 |
resy - vertical resolution |
| 179 |
showbg [0/1] - show the background image |
| 180 |
fullscreen [0/1] - use full-screen mode |
| 181 |
particlecollide [0/1] - use collision detection for particles, looks nice but might a cpu hog |
| 182 |
sound [0/1] - use sound effects (sound effects will allways be loaded) (requires compiled with sound support) |
| 183 |
stereo [0/1] - use stereo, some people don't like stereo, might save a few cpu cycles to turn it off |
| 184 |
controlmaxspeed - the max speed the paddle can travel with when using non-mouse controllers. |
| 185 |
10 is VERY fast, this acts as sensitivity for WiiMote and analog joystick. |
| 186 |
controlaccel - the acceleration that the paddle gains when using digital joystick or keyboard for controlling. |
| 187 |
controlstartspeed - the starting speed (the "lowest" speed) of the paddle when using digital joystick or keyboard. |
| 188 |
rightkey - SDLK number of the key that makes the paddle travel right |
| 189 |
leftkey - same as above, but left. |
| 190 |
nextkey - Select next powerup. |
| 191 |
buykey - Buy selected powerup. |
| 192 |
prevkey - Select previous powerup. |
| 193 |
shootkey - the key that makes the guns shoot and releases the ball. |
| 194 |
Check this site for sdl key numbers: http://kobesearch.cpan.org/htdocs/SDL_Perl/SDL/Constants.pm.html#SDLK_0- |
| 195 |
joyisdigital [0/1] - if this is 1, the joystick acts as a "dump"/digital joystick (behaving excatly like the keyboard) |
| 196 |
if this is 0, the joystick acts as a analog/precise joystick. |
| 197 |
joycal* - callibration values from the joystick callibration process. |
| 198 |
joyenabled [1/0] - if 1 then joystick is enabled (set to 0 if you experience random movement/controlling error) |
| 199 |
sndtheme - Case sensetive name of the sound-theme dir to use. |
| 200 |
gfxtheme - Case sensetive name of the gfx-theme dir to use. |
| 201 |
lvltheme - Case sensetive name of the level-theme dir to use. |
| 202 |
|
| 203 |
------------------------------------------------------------------------------------------------------------ |
| 204 |
|
| 205 |
2.0 Compiling |
| 206 |
The basic requirements for compiling sdl-ball is the following libs AND THEIR DEVELOPMENT FILES: |
| 207 |
OpenGL |
| 208 |
LibGLU |
| 209 |
SDL1.2 |
| 210 |
SDL-image1.2 |
| 211 |
SDL-ttf1.2 |
| 212 |
SDL-mixer1.2 |
| 213 |
Make, a working C++ compiler and stdlibc++6 |
| 214 |
|
| 215 |
To compile, extract the SDL-Ball tarball (since you're reading this I figure you allready did) and cd into the dir. |
| 216 |
Type make and press enter. |
| 217 |
|
| 218 |
If you get errors: error: SDL.h: No such file or directory |
| 219 |
And you're SURE you have dev libs installed, add -I/usr/include/SDL to CFLAGS in Makefile |
| 220 |
|
| 221 |
2.1 Without sound |
| 222 |
If you don't have a soundcard/have a very weak computer/don't have SDL-mixer you can compile without sound support. |
| 223 |
This removes SDL-mixer dependancy. |
| 224 |
To turn off sound support, you need to edit two files: |
| 225 |
Makefile: remove -lSDL_mixer |
| 226 |
main.cpp: remove #define WITH_SOUND |
| 227 |
|
| 228 |
2.2 With WiiMote support |
| 229 |
To enable WiiMote support you need to have a working installation of |
| 230 |
libwiiuse ( http://www.wiiuse.net/ ) I won't get into installing that. |
| 231 |
You also need a working blue-tooth dongle w/driver and all, if you can't run the |
| 232 |
example-program from wiiuse, you need to fix those problems before trying to compile sdl-ball. |
| 233 |
You need to have a systemwide install of wiiuse ( sudo make install in the wiiuse dir ). |
| 234 |
You need to edito two files to enable WiiMote support: |
| 235 |
Makefile: add -lwiiuse to LDFLAGS |
| 236 |
main.cpp: remove the // in front of #define WITH_WIIUSE |
| 237 |
|
| 238 |
2.3 For systemwide installation Because every linux dist is diffrent, |
| 239 |
I can't know where it would be nice to put the datafiles (themes) for sdl-ball, |
| 240 |
you might want to use a dir like /usr/local/share/sdl-ball |
| 241 |
In that case, make a directory there, and put |
| 242 |
the themes dir into it. Then compile with |
| 243 |
make -DDATADIR="/usr/share/sdl-ball/themes" |
| 244 |
|
| 245 |
------------------------------------ |
| 246 |
|
| 247 |
3.0 Themes |
| 248 |
Themes can, but don't have to, consist of several things, in SDL-Ball a theme can contain: |
| 249 |
levels - other levelsets are always nice. |
| 250 |
graphics - all the graphics in sdl-ball can be changed by the theme. |
| 251 |
sounds - you can customise sounds aswell. |
| 252 |
Themes can be stored in 2 diffrent places: Either in ~/.config/sdl-ball/themes/ |
| 253 |
or in sdl-balls own sdl-ball/themes folder. |
| 254 |
|
| 255 |
3.1 How to use a diffrent theme |
| 256 |
You can choose a theme from the options menu. |
| 257 |
You can mix sound, gfx and level thems in the settings file (see 1.4 and 1.4.6) |
| 258 |
|
| 259 |
3.2 How to make your own theme |
| 260 |
http://sdl-ball.sourceforge.net/?page=themes for more information on themes, it's really easy! ;) |
| 261 |
|
| 262 |
------------------------------------ |
| 263 |
|
| 264 |
4.0 Contributors and Credits |
| 265 |
People who have directly helped the SDL-Ball project, chronologically: |
| 266 |
Quinton "quin" Reeves - Windows Port. |
| 267 |
Ciddk - Website and Bugreports |
| 268 |
Evgeni Golov - Suggestions, comments, insight, Debian package |
| 269 |
"Dionos" - The dio-sound-theme. |
| 270 |
yugrotavele - The AUR package |
| 271 |
kfgz - Patching |
| 272 |
Yannickescu - AROS port |
| 273 |
|
| 274 |
|
| 275 |
------------------------------------ |
| 276 |
|
| 277 |
5.0 Frequently Asked Questions |
| 278 |
Q: The paddle moves around randomly, or is stuck in one of the sides? |
| 279 |
A: try disabling joystick support in the settings.cfg |