<commit_before># Asshault

![Screenshot](http://i.imgur.com/lzGBXrD.png)

Asshault is an in-browser action game created to play around with [game feel](https://www.youtube.com/watch?v=AJdEqssNZ-U), or [juice](https://www.youtube.com/watch?v=Fy0aCDmgnxg). Juice, among other things, comprises effects such as camera shake, particles, and sounds.

As such, the code is hacked together, and should really be refactored from the current prototypal inheritance into an entity-component system.

Some of the more interesting features and optimisation techniques I've used/experimented with here include:

* Flexible upgrade system with constraints, along with a flexbox UI for available upgrades
* 3D camera shake; affects UI (CSS)
* Double canvases, one for decals and one for drawing
* Proper HTML canvas resizing based off window size
* Simple spatial hash for faster collision detection
* Simple sound system for playing sounds, with an audio compressor attached
* Dirty detection of text for rendering on canvases (big perf hit)
* Waves/levels
* Simple sprite management and rendering system
* Sprite-based effects
* Highlighting in-canvas objects on hover of HTML elements

## Running locally
1. Clone
2. Open `index.html` in a browser<commit_msg>Mention JSON-based asset loading in readme<commit_after># Asshault

![Screenshot](http://i.imgur.com/lzGBXrD.png)

Asshault is an in-browser action game created to play around with [game feel](https://www.youtube.com/watch?v=AJdEqssNZ-U), or [juice](https://www.youtube.com/watch?v=Fy0aCDmgnxg). Juice, among other things, comprises effects such as camera shake, particles, and sounds.

As such, the code is hacked together, and should really be refactored from the current prototypal inheritance into an entity-component system.

Some of the more interesting features and optimisation techniques I've used/experimented with here include:

* Flexible upgrade system with constraints, along with a flexbox UI for available upgrades
* 3D camera shake; affects UI (CSS)
* Double canvases, one for decals and one for drawing
* Proper HTML canvas resizing based off window size
* Simple spatial hash for faster collision detection
* JSON-based asset loading
* Simple sound system for playing sounds, with an audio compressor attached
* Simple sprite management and rendering system
* Dirty detection of text for rendering on canvases (big perf hit)
* Waves/levels
* Sprite-based effects
* Highlighting in-canvas objects on hover of HTML elements

## Running locally
1. Clone
2. Open `index.html` in a browser
{'fraction_non_alphanumeric': 0.06784313725490196, 'fraction_numerical': 0.003137254901960784, 'mean_word_length': 5.0738095238095235, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3969135', 'n_tokens_mistral': 713, 'n_tokens_neox': 686, 'n_words': 323}