This repository has been archived by the owner on Oct 18, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
1,056 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"plugins": ["plugins/markdown"], | ||
"templates": { | ||
"systemName": "An Offline Life", | ||
"theme": "cosmo", | ||
"navType": "vertical", | ||
"inverseNav": true, | ||
"syntaxTheme": "dark", | ||
"search": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,15 @@ | ||
/** | ||
* Kontra is a small game engine written for JS13kGames contests. | ||
* | ||
* @external kontra | ||
* @see {@link https://straker.github.io/kontra/|kontra} | ||
*/ | ||
|
||
/** | ||
* In order to save some bytes, alias the global kontra object. | ||
* | ||
* @name k | ||
* @global | ||
* @alias kontra | ||
*/ | ||
window.k = window.kontra |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,51 @@ | ||
/** | ||
* Defines constants used on several places in this game. | ||
* However, since they are keys, they won't get minified. | ||
* I'm sorry for the unreadable names, but they are saving bytes... | ||
* | ||
* @namespace | ||
* @type object | ||
* @property { object } constants - Holding different values for the game. | ||
* @property { string } constants.a - Basename of the sound file. | ||
* @property { string } constants.ae - Filename of the sound file. | ||
* @property { string } constants.g - Name of the ground layer used for tiles. | ||
* @property { string } constants.t - Basename of the tileset file. | ||
* @property { string } constants.te - Filename of the tileset file. | ||
* @property { number } constants.h - Height of a tile in px. | ||
* @property { number } constants.w - Width of a tile in px. | ||
* @property { number } constants.r - Number of tiles in a row of the canvas. | ||
* @property { number } constants.c - Number of tiles in a col of the canvas. | ||
* @property { number } constants.u - ID of the tile not in the tileset. | ||
* @property { number } constants.m - ID of the modem tile. | ||
* @property { number } constants.p - ID of the pc tile with wire to top. | ||
* @property { number } constants.b1 - 1st ID of button/switch tile (active). | ||
* @property { number } constants.b2 - 2nd ID of button/switch tile (neutral). | ||
* @property { number } constants.b3 - 3rd ID of button/switch tile (inactive). | ||
* @property { number } constants.s1 - 1st ID of server tile (pos ok, num ok). | ||
* @property { number } constants.s2 - 2nd ID of server tile (pos ok, num nok). | ||
* @property { number } constants.s3 - 3rd ID of server tile (pos nok, num nok). | ||
*/ | ||
const constants = { | ||
// Assets | ||
a: 'd', // audio (dial-up) | ||
ae: 'd.mp3', // audio with extension | ||
g: 'g', // ground layer | ||
t: 't', // tileset | ||
te: 't.png', // tileset with extension | ||
a: 'd', | ||
ae: 'd.mp3', | ||
g: 'g', | ||
t: 't', | ||
te: 't.png', | ||
|
||
// World | ||
h: 32, // height of a tile | ||
w: 32, // width of a tile | ||
r: 9, // tiles in a row | ||
c: 9, // riles in a column | ||
h: 32, | ||
w: 32, | ||
r: 9, | ||
c: 9, | ||
|
||
u: 0, // unset tile id | ||
m: 16, // modem id | ||
p: 12, // personal computer id | ||
b1: 13, // button in active position | ||
b2: 14, // button in neutral position | ||
b3: 15, // button in deactive position | ||
s1: 9, // server with correct position and value | ||
s2: 10, // server with correct position, but wrong value | ||
s3: 11 // server with neither correct position nor value | ||
u: 0, | ||
m: 16, | ||
p: 12, | ||
b1: 13, | ||
b2: 14, | ||
b3: 15, | ||
s1: 9, | ||
s2: 10, | ||
s3: 11 | ||
} | ||
|
||
export default constants |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.