A JavaScript implementation of the Blicblock game from The Sims 4.
CSS CoffeeScript Ruby ApacheConf HTML JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app Fix bug with filtering by a single country Dec 24, 2015
bin Add Rails app Sep 30, 2014
client Simplify instructions by using preinstall, postinstall with npm Dec 23, 2015
config service_static_files to fix deprecation warning Dec 23, 2015
db Add responders gem Dec 23, 2015
lib Add Rails app Sep 30, 2014
log Add Rails app Sep 30, 2014
public Replace moneypenny with cheshire137 Dec 23, 2015
spec Keep track of failing examples with new RSpec Dec 24, 2015
vendor/assets Add Rails app Sep 30, 2014
.bowerrc Add initial AngularJS app Sep 20, 2014
.editorconfig Add initial AngularJS app Sep 20, 2014
.gitattributes Add initial AngularJS app Sep 20, 2014
.gitignore Keep track of failing examples with new RSpec Dec 24, 2015
.jshintrc Add initial AngularJS app Sep 20, 2014
.rspec Simplify gems, flesh out Ruby tests Oct 1, 2014
.ruby-version Bump Ruby version to 2.1.4 Dec 23, 2015
.travis.yml Add initial AngularJS app Sep 20, 2014
Gemfile Update some gems Dec 24, 2015
Gemfile.lock Update some gems Dec 24, 2015
LICENSE.txt Add about page and license Sep 20, 2014
Procfile Build in public, use Thin, more gem cleaning Oct 1, 2014
README.md Move screenshot up in readme Jun 23, 2016
Rakefile Add Rails app Sep 30, 2014
blicblockjs-screenshot-1.png Add BlicblockJS screenshots to README Sep 27, 2014
blicblockjs-screenshot-2.png Add BlicblockJS screenshots to README Sep 27, 2014
blicblockjs-screenshot-3.png Add BlicblockJS screenshots to README Sep 27, 2014
config.ru Add Rails app Sep 30, 2014
deploy.sh Add deploy.sh again Oct 1, 2014

README.md

BlicblockJS

Blicblock is a game your Sims in The Sims 4 can play on the computer. I thought it would be fun to recreate the game. Our Sims shouldn't have all the fun!

BlicblockJS gameplay

BlickblockJS is built using AngularJS, Bower, Yeoman, and Twitter Bootstrap.

Blicblock Notes from The Sims 4

  • Looks like Tetris meets Bejeweled: colored blocks fall down. Combine them into a tetromino and the tetromino disappears.
  • Disappearing tetrominos cause blocks on top of them to fall, which can cause cascades of disappearing tetrominos.
  • If the screen fills up and no more blocks can fall, game over.
  • Five blocks across, seven tall
  • Colors: magenta, yellow, green, blue. Note: since the game board is five blocks wide, to make the game have any challenge at all, there need to be >5 colors of blocks.
  • Preview of next two blocks shown

How to Run

You need Ruby, RubyGems, Bundler, Node.js, and PostgreSQL.

  1. bundle
  2. Create a blicblockjs role in PostgreSQL:

    % psql
    psql (9.2.1)
    Type "help" for help.
    
    sarah=# CREATE USER blicblockjs WITH PASSWORD 'password';
    CREATE ROLE
    sarah=# ALTER USER blicblockjs WITH SUPERUSER;
    ALTER ROLE
    

    Or via command line: createuser -P -s -e blicblockjs

  3. bundle exec rake db:create db:migrate db:seed

  4. cd client/
  5. npm install
  6. npm install -g bower
  7. bower install
  8. npm install -g grunt-cli
  9. grunt serve to watch for file changes and to launch the Rails server.

How to Test

Rails API

  1. RAILS_ENV=test bundle exec rake db:create db:migrate
  2. RAILS_ENV=test bundle exec rspec

AngularJS

  1. cd client/
  2. npm install
  3. grunt test

How to Deploy to Heroku

  1. Create a new Heroku app in your browser.
  2. git remote add heroku git@heroku.com:yourherokuapp.git
  3. heroku config:add BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-ruby.git
  4. git push heroku master
  5. heroku addons:add heroku-postgresql
  6. heroku addons:add pgbackups
  7. heroku run rake db:migrate
  8. heroku ps:scale web=1
  9. heroku config:add NODE_ENV=production

How to Backup Heroku PostgreSQL Database

heroku pg:backups capture
curl -o latest.dump `heroku pg:backups public-url`

To load the dump file locally:

pg_restore --verbose --clean --no-acl --no-owner -h localhost -U blicblockjs -d blicblockjs_development latest.dump

BlicblockJS Mentions

Blicblock in The Sims 4

Video of my Sim playing Blicblock

The Sims 4 Blicblock play

The Sims 4 Blicblock game over

Screenshots of BlicblockJS

BlicblockJS paused

BlicblockJS game over