Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Multiplayer browser game, set in the stone age
Ruby
tree: 6bf80c00bc
Failed to load latest commit information.
doc first commit
images first commit
.gitignore first commit
.htaccess first commit
README added licence
admin.cgi first commit
chat.cgi first commit
cronjobs first commit
crons-ap.rb first commit
crons-day.rb first commit
crons-hunger.rb first commit
data.rb first commit
data_guide first commit
dbtemplate.sql added db template
edit-map.cgi first commit
faq.html first commit
functions-html.rb first commit
functions-mysql.rb first commit
functions.rb first commit
game.cgi first commit
game_display.rb first commit
ideas first commit
importdb.rb first commit
index.cgi added test.rb
index.html first commit
map.cgi first commit
markov.cgi first commit
mondo.cgi first commit
mysql-connect.rb added test.rb
profile.cgi first commit
rankings.cgi first commit
settle.cgi first commit
settlement.cgi first commit
shintolin.css first commit
signup.cgi first commit
skills.cgi first commit
suggestions first commit
techtree first commit
terrain.cgi first commit
test.rb added test.rb
world.cgi first commit

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/>.
Something went wrong with that request. Please try again.