Inf is a project mainly written in JAVASCRIPT and SHELL, it's free.
∞
A simple side-scroller game engine with a huge, randomly generated world.
A UNIX shell
This project uses shell scripts to make work easier. They should work fine on a Mac and in Linux environments. It's still possible to work on this project on a Windows machine, of course, but you need to do some extra manual work.
Clone the repository:
$ git clone http://github.com/blixt/inf.git
Run the compile script:
$ cd inf
$ ./compile
This will get the latest Closure Library, calculate dependencies and set up
the out/
directory. In this directory you will find demo.html
and
demo.js
, a compiled demo project that you can open in your browser.
There is a demo.debug.html
file for running the aforementioned demo project
in debug mode. This means that it will run the source code uncompiled and with
additional debugging messages (printed in the browser console). Running the
demo in debug mode will not work until the compile
script has been run.
This project does not in any way try to be compatible with all browsers out there. It has been written with modern browser technologies in mind, and focus should be put on them, not backwards compatibility.
The browsers/platforms known to work properly are:
The code should adhere to guidelines that have been agreed upon by the developer community. This means that the code should validate when run through JSLint, and the Google Closure Compiler should not generate any warnings or errors.
General code style should follow the Google JavaScript Style Guide.
Running JSLint without any additional options will generate errors for the code of this project. The rationale for suppressing those errors will be explained here.
Implied globals.
This code is written to run in a browser, which means it expects some global variables to be available. JSLint option declarations have been added for them. Additionally, the
console.log
function is expected to exist in code built withinf.DEBUG = true
.
The body of a for in
should be wrapped in an if
statement to filter
unwanted properties from the prototype.
This rule should be followed, even if the warning has been disabled. The warning has been disabled so that the
if
statement can be skipped in certain cases.The only current case is when looping through a plain object (
{}
). Theif
statement is avoided since thisfor
loop is run very often.As the code for this project has not been written with interoperability with other libraries in mind, we can assume that
Object.prototype
has not been compromised.
This project is licensed under an MIT license.
http://www.opensource.org/licenses/mit-license.php
Copyright © 2011 Andreas Blixt [email protected]