Netris
A downloadable game for Windows, macOS, Linux, and Android
# Netris
A Simple tetris game written in modern JavaScript
## About
Blazing fast as source code is optimized to maximum !
No warnings or errors !
Object Oriented design !
Time based rendering. Faster the CPU the better !
Written in modern JavaScript.
## Extras
- index.html : Default
- mobile.html : For mobile devices
- ai.html : Watch AI player
- ai-fast.html : Watch Super fast AI player
- ai-many.html : Watch Many AI players
- play-ai.html : Play against AI. First to 100 lines wins !
- tune.html : Create your own network from nothing
- simple.html : Just Netris
## Keys
- wasd / Arrows : Block Movement
- SpaceBar : Block Drop
- Escape : Quit
- Touch : Mobile devices
## Usage as a component
Simply add these to your website.
You can add as many Netris as you like.
```
<body>
...
<canvas id="mygame"></canvas>
<script src="netris.js"></script>
<script>
window.netris({id: "mygame",
width: 12,
height: 17,
cell: 37,
difficulty: 35,
mode: "Standard"});
</script>
...
</body>
```
## Options
These are given as object to `window.netris({...})`
- id (idCanvas) : Canvas element for Netris.
- width (10) : Cells vertical.
- height (20) : Cells horizontal.
- cell (35) : Cell size.
- ghostBlock (true) : Activate ghost block.
- difficulty (15) : For human play only. ( 0 -> 100 )
- player (Human) : [ AI, Human ]
- aiSpeed (0.05) : 0 -> 1.0
- goal (false) : Goal to lines
- bg (true) : Use live background
- sounds (true) : [ true, false ]
- text ("") : Extra info text
- net (...) : Your own network (from tune.html)
- mode (Standard) : - Standard : Normal tetris
- Max3 : 3 blocks
- Random : Randomized blocks
- Dot/T/I/L/O/Z/X : Extra blocks
## Requirements
Only browser w/ JavaScript.
Works on any OS + mobile devices !
## Usage
Unzip the netris package.
Then just click one of these: `index.html`, `ai.html`, `ai-fast.html`, `play-ai.html`,
`ai-many.html`, `simple.html`, `mobile.html` or `tune.html`.
## License
Personal use or for you own website
Purchase
In order to download this game you must purchase it at or above the minimum price of $5 USD. You will get access to the following files: