Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add font

  • Loading branch information...
commit 0e4e4f70883e58827965b5c5f7ca9d4ba366822a 1 parent e139fc5
@digitaltom authored
View
10 TODO
@@ -1,11 +1,17 @@
- die animation
- iphone fullscreen
- sounds + preload
-- font
- theme initializer
- avoid double jumps
- License
- vertical scroll?
-- different background colors
+- different background colors (image)
+- startscreen image
+- factor out sprite mapping
+- invisible steps
+- geeko exit
+
+- release! blog entry
+
View
10 css/game.css
@@ -1,6 +1,16 @@
+@font-face {
+ font-family: edunline;
+ src: url('../font/edunline.eot');
+ src: url('../font/edunline.ttf') format('truetype');
+font-weight: normal;
+font-style: normal;
+}
+
+
html, body {
margin: 0;
padding: 0;
+ font-family: edunline, sans-serif;
}
body {
View
BIN  font/edunline.eot
Binary file not shown
View
BIN  font/edunline.ttf
Binary file not shown
View
6 js/game.js
@@ -3,7 +3,7 @@ var ticks = 0;
var spriteMap = new Image;
var actors;
var items;
-var debug = false;
+var debug = true;
// default theme and level
var theme = 'snoop'
@@ -577,7 +577,7 @@ function updateElements() {
function drawControls() {
if (debug) {
var actor = actors[0];
- ctx.font = '12px sans-serif'
+ ctx.font = '12px edunline'
if (actor) {
ctx.fillText("Player: x/y: " + Math.round(actor.pos.x) + "/" + Math.round(actor.pos.y) +
", speed x/y: " + Math.round(actor.speed.x) + "/" + Math.round(actor.speed.y), size.tile.target.w, size.tile.target.h + 20);
@@ -586,7 +586,7 @@ function drawControls() {
ctx.fillText("Objects: " + (collisionMap.length + items.length), size.tile.target.w, size.tile.target.h + 60);
ctx.fillText("Fps: " + (1000 / frameTime).toFixed(1), size.tile.target.w, size.tile.target.h + 80)
}
- ctx.font = 'bold 14px sans-serif'
+ ctx.font = 'bold 14px edunline'
ctx.fillText("Score: " + score, size.tile.target.w, size.tile.target.h);
}
Please sign in to comment.
Something went wrong with that request. Please try again.