-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial code commit, from 'machineball-src-1.0-1.tar.gz'
- Loading branch information
Showing
45 changed files
with
11,587 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
Machine Ball Version 1.0 | ||
By Benny Kramek | ||
[email protected] | ||
http://benny.kramekweb.com | ||
|
||
This is the source code of Machine Ball. Prepare to compile... | ||
This is going to be difficult. I recommend that you download | ||
the generic Machine Ball binary from: | ||
http://benny.kramekweb.com/machineball | ||
|
||
But if you're using a different architecture, or are just one | ||
of those paranoid people who only compile software from source, | ||
then read on... | ||
|
||
First of all, we need to install the libraries that Machine Ball | ||
needs: | ||
|
||
|
||
----------------------------------------------- | ||
1) Allegro | ||
----------------------------------------------- | ||
http://alleg.sourceforge.net | ||
|
||
You'll need at least version 4.0.2 | ||
I recommend the stable release. There is an "Allegro End-User" | ||
download. I'm not sure if this will work. I don't recommend it | ||
|
||
./configure | ||
make | ||
su | ||
make install | ||
|
||
|
||
----------------------------------------------- | ||
2) AllegroGL | ||
----------------------------------------------- | ||
http://allegrogl.sourceforge.net | ||
|
||
You'll need at least version 0.1.12 | ||
|
||
./configure | ||
make | ||
su | ||
make install | ||
|
||
|
||
----------------------------------------------- | ||
3) DUMB | ||
----------------------------------------------- | ||
http://dumb.sourceforge.net | ||
|
||
You'll need at least version 0.9.1 | ||
(These build instructions might not work for later versions. | ||
Read the DUMB docs if this doesn't work) | ||
|
||
./fix.sh unix | ||
./makeall.sh | ||
su | ||
./makeall.sh | ||
|
||
|
||
----------------------------------------------- | ||
4) ODE | ||
----------------------------------------------- | ||
http://www.q12.org/ode | ||
|
||
You'll need at least version 0.35 (This hasn't been released yet. | ||
Until the release, you must use CVS: | ||
|
||
When prompted for a password, enter "anonymous" (without the quotes) | ||
|
||
cvs -d:pserver:[email protected]:/cvsroot login | ||
cvs -z3 -d:pserver:[email protected]:/cvsroot co ode | ||
|
||
) | ||
|
||
cp config/user-settings.example config/user-settings | ||
!!! Edit the file config/user-settings, make sure that the settings are correct | ||
(The defaults should be fine) | ||
make ode-lib | ||
su | ||
cp -r include/ode /usr/local/include | ||
cp lib/libode.a /usr/local/lib | ||
|
||
|
||
----------------------------------------------- | ||
--------- THAT'S IT! -------------------------- | ||
----------------------------------------------- | ||
|
||
After you set up all those libraries. Enter the Machine Ball | ||
directory and type: | ||
|
||
make | ||
|
||
During the build, you will see this message | ||
|
||
I don't know how to do constructor functions on this platform, so you must | ||
call fixup_datafile() before using this data! (after setting a video mode). | ||
|
||
You can ignore it. | ||
The supplied Makefile should work without changes for pretty much any unix | ||
based system. You may have to change the "gcc" command in line 4 to your linker | ||
|
||
If you want to install the game system wide: | ||
|
||
su | ||
cp machineball /usr/local/bin | ||
(You can copy it to any other directory in your PATH) | ||
|
||
And there you go! Just type machineball at the prompt, find a friend | ||
and start playing! | ||
|
||
If you have any problems, please email me at [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
all : machineball | ||
|
||
machineball : main.o window.o intro.o menu.o game.o text.o timer.o controls.o ball.o glode.o camera.o render.o court.o machine.o powerup.o explosion.o models.o mbdata.o options.o mbdata.o | ||
gcc main.o window.o intro.o menu.o game.o text.o timer.o controls.o ball.o glode.o camera.o render.o court.o machine.o powerup.o explosion.o models.o mbdata.o options.o -o machineball -laldmb -ldumb -lagl `allegro-config --libs` -lGL -lGLU -lode | ||
|
||
main.o : main.cpp | ||
|
||
window.o : window.cpp | ||
|
||
intro.o : intro.cpp | ||
|
||
menu.o : menu.cpp | ||
|
||
game.o : game.cpp | ||
|
||
text.o : text.cpp | ||
|
||
timer.o : timer.cpp | ||
|
||
controls.o : controls.cpp | ||
|
||
ball.o : ball.cpp | ||
|
||
glode.o : glode.cpp | ||
|
||
camera.o : camera.cpp | ||
|
||
render.o : render.cpp | ||
|
||
court.o : court.cpp | ||
|
||
machine.o : machine.cpp | ||
|
||
powerup.o : powerup.cpp | ||
|
||
explosion.o : explosion.cpp | ||
|
||
models.o : models.cpp | ||
|
||
options.o : options.cpp | ||
|
||
mbdata.o : mbdata.s | ||
|
||
mbdata.s : mbdata.dat | ||
dat2s mbdata.dat -o mbdata.s -h mbdata.h -p mb | ||
|
||
clean : | ||
rm machineball main.o window.o intro.o menu.o game.o text.o timer.o controls.o ball.o glode.o camera.o render.o court.o machine.o powerup.o explosion.o models.o options.o mbdata.o | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
Machine Ball Version 1.0 | ||
By Benny Kramek | ||
[email protected] | ||
http://benny.kramekweb.com | ||
|
||
Machine Ball is a futuristic sport with amazing 3D graphics and realistic | ||
physics with very simple rules: Get the ball into your opponents goal. You | ||
can use your machine to push the ball in, or you can collect powerups such | ||
as missles and blast the ball into the goal. Be creative. | ||
|
||
|
||
Navigating the Menus | ||
-------------------- | ||
|
||
When you first start Machine Ball, you will be presented with a menu | ||
|
||
Human vs Human - Play a game against a friend on the same computer | ||
Human vs Comp - Not available | ||
Options - Configure the game options | ||
Quit - Exit | ||
|
||
After selecting Human vs Human, you will be asked to select a court size. | ||
After this, you will be asked to select a ball. All the balls are | ||
different in size and physical properties. | ||
|
||
You will then be presented with Match Options menu | ||
|
||
Match Type - Whether the match ends after a time or goal limit | ||
# Of Minutes/Goals - The Time/Goal limit of the match | ||
Nuke Stuck Ball - If the ball gets stuck, whether to nuke it | ||
Powerups - Powerups Enabled in the match or not | ||
Frequency - How often a Powerup appears | ||
Turbo - The likelihood of a Turbo Powerup Appearing | ||
Shield - The likelihood of a Shield Powerup Appearing | ||
Mines - The likelihood of a Mines Powerup Appearing | ||
Missle - The likelihood of a Missle Powerup Appearing | ||
Emp - The likelihood of an Emp Powerup Appearing | ||
|
||
The match will then begin! | ||
|
||
|
||
If you select the Options menu from the main menu you will get | ||
|
||
Controls - Adjust the controls for the players | ||
Audio - Adjust audio options | ||
Video - Adjust video options | ||
|
||
To set the controls: | ||
Move the selection to the key you want to change. Press enter. Press the | ||
key or joystick button that you want to use | ||
|
||
|
||
How to Play | ||
----------- | ||
|
||
Your goal is to get the ball into your opponets goal. | ||
Player 1 tries to get the ball into the right goal. | ||
Player 2 tries to get the ball into the left goal. | ||
You can drive around your machine and use your kicker with the "Kick" | ||
control. You can use a powerup with the "Fire" control. | ||
|
||
Turbo (Blue) - A speed boost | ||
Shield (Green) - A shield around you that protects you from explosions | ||
and Emp blasts | ||
Mines (Pink) - Lay down mines that will explode when something touches | ||
them | ||
Missle (Yellow) - Fire a Missle that will explode when it hits something | ||
and send it flying | ||
Emp (Gray) - Fire an Emp blast. If this hits your opponent then he | ||
will be disabled for a while | ||
|
||
There are many different strategies for the many match types. With practice | ||
you will be a Machine Ball expert! | ||
|
||
Enjoy! | ||
|
||
|
||
Bugs | ||
---- | ||
|
||
- Rare physical explosions. These are rare, and may be fixed with | ||
improvements to ODE. Sometimes the ball flys away. Sometimes a Machine | ||
explodes | ||
- Setting Player 1's Forward Control to the Down key or setting the | ||
Reverse Control to the Up key can cause problems | ||
- On 1 test system, the "Intro Movie" had graphical bugs | ||
- Problems with multi-tasking under Windows | ||
- Possible memory leaks causing disapearing Powerups and funny projectile | ||
acceleration | ||
|
||
|
||
Credits | ||
------- | ||
|
||
Programming & Graphics: Benny Kramek | ||
|
||
The game uses: | ||
ODE (physics library) - http://www.q12.org/ode | ||
DUMB (music library) - http://dumb.sourceforge.net | ||
Allegro (gamedev library) - http://alleg.sourceforge.net | ||
OpenGL (graphics library) - http://www.opengl.org | ||
|
||
|
||
Thanks to | ||
--------- | ||
|
||
Russel Smith, for ODE | ||
Shawn Hargreaves, for Allegro | ||
Ben Davis, for helping me out with DUMB and other stuff | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
// Machine Ball | ||
// By Benny Kramek | ||
// [email protected] | ||
// http://benny.kramekweb.com | ||
// | ||
// | ||
// Source Code is released under the GPL | ||
// | ||
|
||
#define ALLEGRO_STATICLINK | ||
#include "ball.h" | ||
|
||
extern dWorldID world; | ||
|
||
Ball ball; | ||
|
||
void Ball::init(int type) | ||
{ | ||
body = dBodyCreate(world); | ||
if(type==0) | ||
{ | ||
radius=5; | ||
mass=10; | ||
mu=5000; | ||
bounce=0.7; | ||
friction=4; | ||
} | ||
if(type==1) | ||
{ | ||
radius=8; | ||
mass=50; | ||
mu=20000; | ||
bounce=0.2; | ||
friction=15; | ||
} | ||
if(type==2) | ||
{ | ||
radius=7; | ||
mass=3; | ||
mu=2000; | ||
bounce=0.5; | ||
friction=0.5; | ||
} | ||
if(type==3) | ||
{ | ||
radius=4; | ||
mass=8; | ||
mu=3000; | ||
bounce=0.6; | ||
friction=3; | ||
} | ||
if(type==4) | ||
{ | ||
radius=10; | ||
mass=25; | ||
mu=6000; | ||
bounce=0.4; | ||
friction=10; | ||
} | ||
if(type==5) | ||
{ | ||
radius=11; | ||
mass=5; | ||
mu=2000; | ||
bounce=0.8; | ||
friction=1; | ||
} | ||
dMass m; | ||
dMassSetSphere(&m, 1, radius); | ||
dMassAdjust(&m, mass); | ||
dBodySetMass(body, &m); | ||
dBodySetPosition(body, 0, 0, radius+30); | ||
|
||
geom = dCreateSphere(0, radius); | ||
dGeomSetBody(geom, body); | ||
|
||
reset(); | ||
} | ||
|
||
void Ball::destroy(void) | ||
{ | ||
dGeomDestroy(geom); | ||
dBodyDestroy(body); | ||
} | ||
|
||
void Ball::reset(void) | ||
{ | ||
dBodySetPosition(body, 0, 0, radius+30); | ||
dBodySetLinearVel(body, 0, 0, 0); | ||
dBodySetAngularVel(body, 0, 0, 0); | ||
|
||
dBodySetLinearVel(body, 0, (rand()%2000)/100.0-10, 75); | ||
} | ||
|
Oops, something went wrong.