<commit_before>SocketCluster Phaser Sample
======

This is an IO game engine built using SocketCluster and Phaser.
It is designed to scale across multiple processes to make use of all CPU cores on a machine.

The game world is divided into cells which will be distributed across available SC worker processes.
Basic initial tests indicate that this engine can scale linearly across available CPU cores - We've found that doubling
the number of worker processes allowed us to handle approximately double the number of bots whilst maintaining the average CPU ratio
per worker process at 50%.

Each cell in the world has its own instance of a cell controller (`cell.js`) - Ideally, this is where you should put all your back end game logic.
If you follow some simple structural guidelines, your code should automatically scale.
With this approach, you should be able to build very large worlds which can host many players.

If you've built a game using this engine, feel free to contribute back to this repo.
Also, feel free to get in touch with me directly by email (in my GitHub profile) if you'd like to chat, have feedback,
need advice or need help with a project.

Special thanks to the Percepts and Concepts Laboratory at Indiana University (http://cognitrn.psych.indiana.edu/) for sponsoring this project.

Jon

<img alt="Screen recording" src="master/public/img/sc-phaser.gif" title="IO Grid" />

### Developing

The front-end code is in `public/index.html`, the back-end code is in `worker.js` and `cell.js`.
Read the comments in the code for more details about how it all works.
<commit_msg>Fixed README image<commit_after>SocketCluster Phaser Sample
======

This is an IO game engine built using SocketCluster and Phaser.
It is designed to scale across multiple processes to make use of all CPU cores on a machine.

The game world is divided into cells which will be distributed across available SC worker processes.
Basic initial tests indicate that this engine can scale linearly across available CPU cores - We've found that doubling
the number of worker processes allowed us to handle approximately double the number of bots whilst maintaining the average CPU ratio
per worker process at 50%.

Each cell in the world has its own instance of a cell controller (`cell.js`) - Ideally, this is where you should put all your back end game logic.
If you follow some simple structural guidelines, your code should automatically scale.
With this approach, you should be able to build very large worlds which can host many players.

If you've built a game using this engine, feel free to contribute back to this repo.
Also, feel free to get in touch with me directly by email (in my GitHub profile) if you'd like to chat, have feedback,
need advice or need help with a project.

Special thanks to the Percepts and Concepts Laboratory at Indiana University (http://cognitrn.psych.indiana.edu/) for sponsoring this project.

Jon

<img alt="Screen recording" src="public/img/sc-phaser.gif" title="IO Grid" />

### Developing

The front-end code is in `public/index.html`, the back-end code is in `worker.js` and `cell.js`.
Read the comments in the code for more details about how it all works.

{'fraction_non_alphanumeric': 0.05165936130244208, 'fraction_numerical': 0.0012523481527864746, 'mean_word_length': 4.415254237288136, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4116424', 'n_tokens_mistral': 798, 'n_tokens_neox': 761, 'n_words': 496}