Added README, rescue from missing demo file, add .gitignore.

This commit is contained in:
2019-02-17 21:22:40 -06:00
parent 8d83901237
commit 874d934606
3 changed files with 17 additions and 1 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*.dat

15
README.md Normal file
View File

@@ -0,0 +1,15 @@
# I-MIC FPS
An endeavor to create a multiplayer first-person-shooter in pure Ruby; Using C extensions only for Rendering, Sound, and Input. ([Gosu](https://libgosu.org) and [opengl-bindings](https://github.com/vaiorabbit/ruby-opengl/))
## Using
Requires a Ruby runtime that supports the gosu and opengl-bindings C-extensions (truffleruby 1.0.0-rc12 did not work when tested. Rubinus was not tested.)
* Clone or download this repo
* `bundle install`
* `bundle exec ruby i-mic-fps.rb [options]`
### Options
* `--native` - Launch in fullscreen using primary displays resolution
* `--debug` - Set $debug variable to true (defaults to false)
* `--profile` - Run ruby-prof profiler
* `--savedemo` - Record camera movement and key events to playback later *(alpha-quality feature)*
* `--playdemo` - Plays the previously recorded demo *(alpha-quality feature)*

View File

@@ -31,7 +31,7 @@ class IMICFPS
Light.new(x: 0, y: 100, z: 0, diffuse: Color.new(1.0, 0.5, 0.1), game_state: self)
if ARGV.join.include?("--playdemo")
@demo_data = File.read("./demo.dat").lines
@demo_data = File.exist?("./demo.dat") ? File.read("./demo.dat").lines : ""
@demo_index= 0
@demo_tick = 0