Comments (4)
My ideas:
Javascript:
braces should be on their own lines whenever possible
lines should not be longer than 80 characters
When creating objects, use closures to hide as much object data as possible
camel-case all identifiers
operators should have one space on either side
indentation is to be done with tab characters (reccommend width of 4 characters to ease reading and staying under the 80 character limit)
The global scope is not to be used except for our top-level object "dd" Everything should be a subelement of dd.
HTML:
No javascript code should be present in an .html file. put them in their own files
javascript files should be included through script tags at the bottom of the html page.
CSS:
Every attribute should be on it's own line.
compound attributes are allowed.
No spaces between attribute names, ":", values, and ";"
{ / } on their own lines
from deathdeath.
Javascript files should be included in the tag as is common convention.
No javascript is run outside of what begins inside the window.onload() function to ensure everything has loaded first.
from deathdeath.
No block-level or inline elements outside of (this means we have to move your "Press arrow keys to move" into the )
from deathdeath.
All code blocks should have curly braces, including what would normally be short-ifs and next-line functions.
e.g.,
if (x=1)
{
x++;
}
from deathdeath.
Related Issues (20)
- Player movement HOT 2
- Player object HOT 1
- HTML span manipulation HOT 2
- Sprite display HOT 3
- Integrate control JS into dd object
- Add spell casting interface HOT 1
- add fireball spell
- Entity prototype object HOT 1
- Enema AI
- Maps: Clipping
- Maps: Next sector
- Separate entities into own global object
- Add hit points to entities
- remove entities when hp <= 0
- Fireball animation
- Fireball sprite HOT 1
- Draw different types of sprites on different z-indicies HOT 1
- fork Entity into Characters and Sprites
- Add coordinate accessors to Entity
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deathdeath.