Ideahack 2001 - Allegro Battle Pinball Simulator - by Elias Pschernig (networm)

http://www.hot.ee/ideahack

All the odd things in this game are because of the crazy rules implied by
ideahack..
________________________________________________________________________________
C O M P I L A T I O N

All that should be required is a working installation of Allegro. The only
tested ports are mingw and BeOS from the list below. The others are only
supported by my guesswork, but don't panic (Yes, I just fulfilled another rule)
if allegro and libnet work on your platform, this game should also. I could
just tell this:

Install Allegro, install libnet, compile the .cpp files, and you're done.

But instead, you might have Allegro installed and do this:
 _
|_|mingw: type following in DOS-BOX to create pinball.exe:

fixming
make
 _ 
|_|MSVC: type following in DOS-BOX to create pinball.exe:

vcvars32
fixmsvc
 _ 
|_|BeOS: type following in a terminal to create pinball executable:

fixbeos.sh
make
 _ 
|_|DJGPP: type following in DOS-BOX to create pinball.exe:

fixdj
make
 _ 
|_|Linux/Unix/whatever: type this to create pinball executable:

Sorry, I really had planned on porting it, but I'm not able to do it now. If all
goes well, you can just download libnet, and install it. Then compile all the
.cpp files and link against allegro and libnet. I hope there are no similiar
problems like with djgpp, but it could of course be true as both is gcc.


Note: PLEASE DON'T USE DJGPP!
I just tested it, and this is a horror. The game does weired things which are
only explainable if djgpp doesn't understand some C++ constructs, and it is
slow as hell even on a 1GHz machine.

________________________________________________________________________________
Q U I C K S T A R T

Skip the intro by hitting Esc, then hit Return in the menu to start the game. On
a US-keyboard, control the left flipper with Z and X, the right flipper with INS
and DEL on the keypad. 

Hitting the ESC key several times should bail you out as long as there is no
crash.

________________________________________________________________________________
D O C U M E N T A T I O N


S T A R T I N G
 _ 
|_|The intro can be skipped by hitting Esc, Return or Space key.


M E N U
 _ 
|_|General
   In the menu, you can move up, down, left and right with the cursor keys.
   To select something, use the Return or Space key.
   To exit the progam, hit Esc.
   
   Everything will be saved into a file "battle.cfg" in the same directory,
   which you can hand-edit if you like. Of course adjusting highscores is
   considered cheating.. but as there's no way yet of transfering the data,
   there's no point..
 _ 
|_|Keyboard
   Game control keys can be assigned by selecting one of the 4 keyboard buttons
   (with enter or space), then hitting the wanted new key.
   
   You can also select an AI player to take over they keys for a side, but be
   warned, the AI plays quite good.
 _ 
|_|Internet
   To play an internet game, each of the 2 players has to enter the IP address
   of the other side in the address field. The program will listen on UDP port
   7777, and send data to the same port on the remote side.
   The Send-Rate is the number of updates made per second. My guesses about the
   maximum possible rates:
   
   14.4K modem         5
   28.8K modem         10
   33.6K modem         15         
   56K   modem         25
   64K   ISDN          30
   128K  ISDN          60
   T1                 100
   T3                 100
      
   10 mbit LAN        100
   100 mbit LAN       100
   
   But better go lower, as libnet is behaving weired, and has no real way to do
   any buffering. So if more data are received than handled, you'll get a nice
   crash.
   
   !WARNING! Internet play is completely untested and is likely to freeze/crash
   your system, as the alpha version of libnet (which is used) has been reported
   to do regularly.   
 _    
|_|Windowed / Fullscreen
   Change the display mode. The resolution is always 640 x 480. The color depth
   is the same as the desktop, but 8bit modes are not supported. If you have
   problems runnning it, you can send your system specifications and a request
   for a version with added support for it to: elias@users.sourceforge.net.
   
   !WARNING! Allegro has a tendency to completely freeze/crash your system
   when using windowed or fullscreen modes, so this is likely to happen if you
   run the program.
 _    
|_|Sound/Music Volume
   Use left and right cursor keys to adjust global mixer volume. Allegro might
   chage the mixer controls of your OS without restoring, so complain to the
   Allegro people not to me.
 _  
|_|Exit exits the program.
 _
|_|Story displays the story (in hieroglyphs), so don't bother, it's only there
   to have that rule in.
   
G A M E P L A Y 

 _ 
|_|General
   This is a pinball simulation, but you can't play it alone, but play against
   another player. In a Deathmatch game, the other player can be on the same
   machine, or you can play over Network/Internet.
   
   The basic rule of any pinball game is to hit the ball with the flpper bars so
   it won't fall out. 
 _
|_|General Rules
   The game is over as soon as a player with no balls left loses the last ball
   of the game.
   
   If the player with more points or the player causing a gameover wins is up
   to you.
 _
|_|Scoring
   Turn Claustrophobic Ferret: 10 points
   Hit drugged sqirrel: 300 points
   Go through corner (up or down): 400 points
   Other player loses ball: 1000 points
   
   Game-Over score: The player who does not cause the-gameover gets rewarded
   with 300 points per remaining squirrel and 1000 poinst per ball left.
   
   Squirrel Invasion: If an invading squirrel reaches a flipper bar, half of the
   points of that flipper's owner are lost.
   
   Exra Ball score: On receaving an extra ball, there's a 100 points reward.
 _   
|_|Special rules
   Every time a ferret is completely turned around, the player on that side is
   rewarded an extra ball.
   
   When a ball goes through a corner, an additional ball is launched to the side
   of the ball owner, if there are less than 4 balls in the game.

________________________________________________________________________________
End of main document.

________________________________________________________________________________
T H A N K S
in no particular order:

_______
X-Viila

A reliable source for MIDI files during *hack competitions :)

______
entheh

Was helping with math stuff I used for the collision detection, and provided the
timer code used for the physics engine..

_______
deserel

Alpha-Tester

_____
lillo

Beta-Tester

_____
gfoot

Author of libnet, and he explained me some libnet stuff

________________________________
Other Current Allegro-Developers
e.g. Bob, E. Bocatzou, tjaden, L. Withers, H. Stokseth and others

They are making Allegro what it is, thus enabling us to create all those games
in the first place :)

________________
Shawn Hargreaves

The all time favorite credits entry of any true Allegator :)

_________________
Thrion, whitedoor

They are people from the official ideahack staff, so they are the culprits for
me coding like mad in the last 2 weeks before the next university season,
instead of studying like mad!!! Not sure if they should be on the credits list
for doing such evil things..

________________
G. A. Hankiewicz

Made a nice Allegro website.. but the real reason he is included is, this
website is the reason my name is among the Allegro Developers at the Sourceforge
Project - I even have CVS write access to the main code :P On the other hand,
this means I'll have to translate the complete Allegro docs for 4.0 >-o

_______
networm

hm, how desperate must one be to thanks himself..

________________________________________________________________________________
End of document.
________________________________________________________________________________
Warning: Nothing interesting following, just useless stuff I felt to write
there, and a version history which might be interesting for myself sometime in
the future.
________________________________________________________________________________ 
 
________________________________________________________________________________
T E C H N I C A L   A N D   L E G A L   S T U F F

Legal Disclaimer

I can take no responsibility for any data-loss of damage or anything else bad
resulting from the use of this, as far as law permits it. (If i would knowingly
distribute a virus i guess this disclaimer wouldn't help much, and otherwise,
it is implied anyway i hope) Ok, now you see that I have no idea about this, so
go on steal my stuff or sue me, but I have no money anyway :P



License

This game is freeware. You can do with it what you want, just not make money.
Recently I witnessed how a game progammer discovered that someone was

distributing his (freeware) game, with modified name and documentation claiming
he made it, and this of course was very bad. But that game is actually a quite
good game, so, honestly, I wouldn't even mind if someone claims he has written
this one :) Although I think it is forbidden by law in most countries, because
the right to claim that should stay at the creator until it is revoked.

I included a stripped down version of libnet, which might have a different
license, so please check this. If you find out that I'm not even allowed to
redistribute it, please tell me and I will remove it. In the meantime, YOU MAY
NOT REDISTRIBUTE the libnet source included in this package, or the package as
you got it. You have to remove the libnet subdirectory first.



About the things in this game

The code is handcoded by me.

Most of the graphics are rendered with the Persistence Of Vision Raytracer
(Pov-Ray) version 3.5.

The big font is a standard windows font (Century Gotic, probably by MicroSoft)
The small font is the Allegro default font.
The hieroglyph font is drawn by me, in PSP. Being clever, I only saved it as
bitmap (after applying some filters) - so it basically is lost - but I won't
ever need a hieroglyph font again I guess.

The Allegro 4.0 splash screen at the end of the intro also comes with Allegro,
and it also includes the logo of the Allegro website.

The Guybrush is from a screenshot of the MonkeyIsland-1 game which I found
somewhere on the net. But I also own that game on my Amiga. I think it was from
LucasArts or LucasGames or something.. not sure if they still exist.

The wood sound is recorded from hitting on this table.
The metal sound is recorded from hitting a coke bottle. (Hitting on the PC case
contained too much noise from the fan, so the bottle had to do)
The squirrel dying sound is my voice, with only the pitch increased and some
filter applied

The explosion sound is from my speedhack game, it was the only sample used
there :) No idea how I created it, but I think it is just noise with a lot of
filters applied to it.

The launcher sound again is my voice and modified a bit.

I have one completely and one half broken speaker.. so I myself never really
could hear the sounds I guess.. so I reduced the quality quite a lot (as there
was no difference for me.. maybe a bad idea)

The short midi is directly taken from Allegro.

The in-game midi was donated by X-Viila. For some reason, it only sounds good
in windows.. I have absolutely no idea whatsoever about midi / music, but it
might be that midi uses predefined samples, and my windows version provides
better samples than BeOS (the other OS i have access to).



Version History

I didn't write anything down, but in the first week I made some screenshots, and
I can remember when I the most things. Of course I coded a bit everyday, there
are always lots of bugs and improvements taking tons of time, but here is a
general overview:

Planning Phase (before 15.9):

My design and schedule. This is a picture taken with a really old camera.
It shows the divided pinball board, with the ball launcher in the middle, and
some basic ideas I noted.. as well as a schedule I wrote down.

	http://www.elias.f2s.com/ideahack/design.jpg

15.9 Fr: Coded a basic menu

   http://www.elias.f2s.com/ideahack/ideahack1.jpg
   
16.9 Sa: Coded the collision detection and ball physics, as well as basic network
   code. This was the most productive coding day I guess.

   http://www.elias.f2s.com/ideahack/ideahack2.jpg
	http://www.elias.f2s.com/ideahack/ideahack3.jpg
	
17.9 Su: Worked on a background picture and messed with network code.

	http://www.elias.f2s.com/ideahack/ideahack4.jpg
	http://www.elias.f2s.com/ideahack/ideahack5.jpg

18.9 Mo: Finished the background, worked on game graphics, and messed with
   network code.

	http://www.elias.f2s.com/ideahack/ideahack6.jpg
	http://www.elias.f2s.com/ideahack/ideahack7.jpg
	
19.9 Di: Created animals and added more graphics and messed with network code.

	http://www.elias.f2s.com/ideahack/ideahack8.jpg
	http://www.elias.f2s.com/ideahack9.jpg
	
	This screenshot shows that obviously I was rewriting a better DRS:
	
	http://www.elias.f2s.com/ideahack10.jpg
	
20.9 Mi: This looks quite finished. I also rewrote the network code from scratch
   by that time I think.

	http://www.elias.f2s.com/ideahack11.jpg

21.9 Do: The last screenshot I can find. It looks almost like the final version.
   Messed with the network code.

	http://www.elias.f2s.com/ideahack12.jpg

22.9 Fr: This was planned to be the finish date, but it was extended by a week.
   Had a break :)
   
23.9 Sa - 29.9 Fr:   
   I fixed some bugs, added the hieroglyphs, and tried to get the makefiles
   working. I realized that this is the last week before classes start again at
   university.. so I hadn't that much time.
   
Elias Pschernig, 28. 9. 2001. NOO I can't be that old already!!!!!!!!!!!!!!!!!!!