Skip to content

Commit e22ccb4

Browse files
author
Will Farrell
committed
Add initial game setup.
1 parent e5650e3 commit e22ccb4

27 files changed

+588
-0
lines changed

app.coffee

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# roots v2.0.6
2+
3+
# Files in this list will not be compiled - minimatch supported
4+
ignore_files: ['_*', 'readme*', '.gitignore', '.DS_Store']
5+
ignore_folders: ['.git']
6+
7+
# Layout file config
8+
# `default` applies to all views. Override for specific
9+
# views as seen below.
10+
layouts:
11+
default: 'layout.jade'
12+
# 'special_view.jade': 'special_layout.jade'
13+
14+
# Locals will be made available on every page. They can be
15+
# variables or (coffeescript) functions.
16+
locals:
17+
title: 'Welcome to Roots!'
18+
title_with_markup: ->
19+
"<h1 class='title'>Welcome to Roots!</h1>"
20+
21+
# Precompiled template path, see http://roots.cx/docs/#precompile
22+
# templates: 'views/templates'

assets/css/_settings.styl

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// -------------------------------------------------------
2+
// Roots global settings variables
3+
// -------------------------------------------------------
4+
5+
// font options (add your own!)
6+
helvetica-neue = "Helvetica Neue", HelveticaNeue, Helvetica, Arial, sans-serif
7+
helvetica = "Helvetica Neue", Helvetica, Arial, sans-serif
8+
georgia = Georgia, Cambria, "Times New Roman", Times, serif
9+
lucidia-grande = "Lucida Grande", Tahoma, Verdana, Arial, sans-serif
10+
monospace = unquote("'Bitstream Vera Sans Mono', Consolas, Courier, monospace")
11+
verdana = Verdana, Geneva, sans-serif
12+
13+
// default font stack
14+
font-stack = helvetica-neue
15+
font-size = 15
16+
font-color = #555
17+
18+
// colors
19+
red = #B44326
20+
orange = #F2A34F
21+
yellow = #F8CA5C
22+
green = #7FC028
23+
light-blue = #52D7FE
24+
blue = #00a6fc
25+
purple = #8E48C2
26+
white = #fff
27+
black = #272727
28+
29+
// default color
30+
default-color = blue
31+
32+
// text hilight color
33+
hilight-color = blue
34+
35+
// vendor prefixes
36+
vendors = webkit moz o ms official
37+
38+
// custom image base path for roots mixins
39+
img-path = ''
40+
41+
// progressive internet explorer (http://css3pie.com/)
42+
pie-enabled = false
43+
pie-path = '/pie.htc'
44+
45+
// grid system settings (http://semantic.gs)
46+
column-width = 60px
47+
gutter-width = 20px
48+
columns = 12

assets/css/master.styl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
global-reset()

assets/favicon.ico

6.37 KB
Binary file not shown.

assets/img/noise.png

7.92 KB
Loading

assets/js/game/_index.coffee

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#= require "scenes/_loading"
2+
#= require "components/_balloon"
3+
#= require "components/_cloud"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
require ['jquery', 'lodash', 'crafty'], ($, _, C) ->
2+
3+
C.e('2D, DOM, Color, Twoway')
4+
.attr(x: 0, y: 0, w: 100, h: 100)
5+
.color('#F00')
6+
.twoway('5')
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
require ['jquery', 'lodash', 'crafty'], ($, _, C) ->
2+
3+
C.c "Cloud",
4+
init: ->
5+
@requires '2D, DOM, Color'
6+
@bind
7+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
require ['jquery', 'lodash', 'crafty'], ($, _, C) ->
2+
3+
window.C = C
4+
5+
C.init 500, 350, $('.game')[0]
6+
7+
C.viewport.clampToEntities = false
8+
C.background '#aaaaaa'

assets/js/main.coffee

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#= require "game/_index"
2+
3+
require.config
4+
paths:
5+
jquery: '//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.0/jquery.min'
6+
lodash: '//cdnjs.cloudflare.com/ajax/libs/lodash.js/2.2.1/lodash.min'
7+
crafty: '//cdnjs.cloudflare.com/ajax/libs/crafty/0.5.3/crafty-min'

0 commit comments

Comments
 (0)