Multiplayer browser game, set in the stone age
Ruby CSS Shell
Switch branches/tags
Nothing to show
Pull request Compare This branch is 69 commits ahead of IsaacLewis:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc
images
.gitignore
.htaccess
README
admin.cgi
admin_mapview.cgi
animal_infospawn.cgi
chat.cgi
contacts.cgi
cronjobs
crons-ap.rb
crons-day.rb
crons-hunger.rb
data.rb
data_guide
dbtemplate.sql
edit-map.cgi
edit-region.cgi
faq.html
functions-html.rb
functions-mysql.rb
functions-tick.rb
functions.cgi
game.cgi
game_display.rb
ideas
importdb.rb
index.cgi
index.html
map.cgi
markov.cgi
mondo.cgi
mysql-connect.cgi
profile.cgi
rankings.cgi
regionprint.cgi
screenshot.html
settle.cgi
settlement.cgi
shintolin.css
signup.cgi
skills.cgi
suggestions
techtree
terrain.cgi
terrainprint.cgi
test.rb
world.cgi

README

So, you want to set up your own version of Shintolin?

Shintolin runs as a bunch of CGI scripts, so it should work on any server with Apache, Ruby (1.8) and MySQL installed.

You'll find a database template in dbtemplate.sql. You'll need to create a MySQL database called 'shintolin'; the command to import the data should be something like 'mysql -p shintolin < dbtemplate.sql'. If you want to check the import worked, open the MySQL prompt and type 'show tables;' - you should see 12 table names.

Getting Ruby to talk to MySQL is annoying. Really annoying. Follow the instructions on http://tmtm.org/en/mysql/ruby/ and see how you get on. It took me almost a whole day to get it to work (!) but that's because I'm a noob and used a package called XAMPP instead of installing Apache and MySQL seperately. The file 'mysql-connect.rb' handles the database connection for Shintolin, so make sure you change the settings there; in particular, 'root' should be changed for your username and '' with your password.

Shintolin isn't the best example of Ruby code; in particular, it's not very object-oriented, because I didn't properly understand object-orientation when I began working on version II of the game. There's probably a few other things I'd do differently now - still, you should see the orginal PHP version.

The file test.rb might include a few failing tests; this doesn't neccesarily mean the game is broken. It's quite brittle in regards to the database (this is something that Ruby on Rails manages to fix, more or less, but it's method is complicated). Test coverage is also not very high, because I didn't start writing tests until very late into the project. Improving the testing framework might be a good way to get your head around the code base.

If your changes are good, I'm not averse to adding them to the master version of Shintolin. E-mail me at: allthatyousee AT gmail DOT com and I'll see what I can do.

Happy hacking!

- - - - -

    Shintolin - persistent browser-based multiplayer game
    Copyright (C) 2010 Isaac Lewis

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as
    published by the Free Software Foundation, either version 3 of the
    License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.