The code

This is a beta version of Breaking The Ice online. I'd welcome any feedback: mail me at graham@catchyourhare.com.

I'm originally a C++ programmer. A major reason behind writing this program was to teach myself JavaScript, PHP and Ajax. So, although the code isn't bad, it does look like JavaScript written by a C++ programmer, and you're bound to find mistakes and inelegancies. When you do, please do let me know.

There are some known issues with the code: for example, it's not defensive enough and the XML fetching isn't efficient. I'll probably fix these at some point. Right now, though, I'd like to work on other projects, so the code is presented as is.

I would welcome people using and expanding this code for other projects, but please get in touch first: graham@catchyourhare.com.

All images in this game, however - those listed in the "images" column below - are public domain. They were drawn by me in Microsoft Paint (I know, I know), except for the red rose image, the original photograph of which was originally taken by Peggy Greb. That, as a work of the United States government, is also, as I understand, public domain.

Graham

The database

btidatabase.sql is an empty version of the database.

You will also need dbaccess.php, which you should put in the include path specified in include.php, below.

The rest of the code and the images

Client side Server side Images

beforegame.htm

beforegame1.htm

beforegame2.htm

beforegame3.htm

betweendates.htm

charactername.htm

colour.htm

conflict.htm

date.htm

datebackup.htm

dateinc.js

endgame.htm

epilogue.htm

include.js

index.htm

inviteusers.htm

linktest.htm

name.htm

next.htm

selectname.htm

startgame.htm

switch.htm

traits.htm

wordweb.htm

rollconflictdice.php

addwebitem.php

agreeswitch.php

respondinvitation.php

awardattractiondice.php

awardbonusdie.php

code.php

deletegameinc.php

enddate.php

endgame.php

rerollpermanencedie.php

getbetweendatestate.php

getdatestate.php

getenddatestate.php

getepiloguestate.php

getgameinfo.php

getswitch.php

getuserinc.php

getusers.php

getweb.php

htmlheader.php

include.php

increaseattraction.php

nextdate.php

nextturn.php

nextturninclude.php

rollcompatibilitydice.php

proposecompatibility.php

proposeconflict.php

putcolour.php

putcompatibility.php

putconflict.php

putname.php

putswitch.php

puttraits.php

registeruser.php

rerolldie.php

rolldice.php

xmlheader.php

rollpermanencedice.php

showsource.php

AnotherTemporaryAttraction.gif

BlueDie1.gif

BlueDie2.gif

BlueDie3.gif

BlueDie4.gif

BlueDie5.gif

BlueDie6.gif

BlueDieFailure1.gif

BlueDieFailure2.gif

BlueDieFailure3.gif

BlueDieFailure4.gif

BlueDieGiving.gif

BlueDieReroll1.gif

BlueDieReroll2.gif

BlueDieReroll3.gif

BlueDieReroll4.gif

BlueDieRoll.gif

BlueDieRolling.gif

BlueDieSuccess5.gif

BlueDieSuccess6.gif

BlueDieUnrolled.gif

WhiteDie2.gif

OldTemporaryAttraction.gif

WhiteDie3.gif

PermanentAttraction.gif

RedDie1.gif

RedDie2.gif

RedDie3.gif

RedDie4.gif

RedDie5.gif

RedDie6.gif

RedDieFailure1.gif

RedDieFailure2.gif

RedDieFailure3.gif

RedDieFailure4.gif

RedDieSuccess5.gif

RedDieSuccess6.gif

RedDieUnrolled.gif

Rose1.jpg

WhiteDie4.gif

TemporaryAttraction.gif

ThreeSmallRedDice.gif

WhiteDie5.gif

ThreeSmallRedDicePropose.gif

ThreeSmallRedDiceRoll.gif

ThreeSmallRedDiceWaiting.gif

TwoSmallRedDicePropose.gif

TwoSmallRedDiceRoll.gif

TwoSmallRedDiceWaiting.gif

WhiteDie1.gif

WhiteDie6.gif

WhiteDieBlank.gif

girlfriend.gif

Return to the game