danzel / mmomatch3

The code that ran massivematch.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Install instructions:

npm install
npm install -g webpack webpack-dev-server

Offline dev:
Replace online script tags with:
<script type="text/javascript" src="node_modules/phaser/build/custom/phaser-arcade-physics.js"></script>
<script type="text/javascript" src="node_modules/webfontloader/webfontloader.js"></script>


Linux server install:
wget https://deb.nodesource.com/setup_6.x
sudo -s
bash setup_6.x
apt-get install nodejs unzip build-essential
DD_API_KEY={Your Datadog Key} bash -c "$(curl -L https://raw.githubusercontent.com/DataDog/dd-agent/master/packaging/datadog-agent/source/install_agent.sh)"
echo "#! /bin/sh" > /etc/network/if-up.d/nodefirewall
echo "iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8091" >> /etc/network/if-up.d/nodefirewall
echo "iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8092" >> /etc/network/if-up.d/nodefirewall
chmod 755 /etc/network/if-up.d/nodefirewall
sh /etc/network/if-up.d/nodefirewall
exit
mkdir a


After putting the code on the server:
populate a/serverconfig.json

then, run this one time:
sudo npm run-script install-service
npm install --only=prod
touch dist/bundle.css.map
touch dist/bundle.js.map
sudo service mmomatch start



Creating a new Victory/Failure Type.

Add to the enum.
Create a detector in Simulation/Levels/Detectors
 Add to allDetectors.ts
 Add to gameEndDetector.ts
Create a display in Scenes/SimParts/DetectorDisplays
 Add to detectorDisplayFactory.ts
Add any special code to defaultLevelAndSimulationProvider
Add a scoreTracker to Simulation/Scoring and defaultLevelAndSimulationProvider.createScoreTracker
Add a sync test to syncDetectorsSpec.ts

Add to LevelDefFactoryDynamic1 - victoryTypes, failureTypes, generateLevelFromType
Create a behaviour in Bot/ and add to Bot/bot
Add to Scenes/SimParts/initialZoomCalculator getZoomInTarget

About

The code that ran massivematch.io

License:GNU Affero General Public License v3.0


Languages

Language:TypeScript 71.6%Language:JavaScript 17.9%Language:HTML 5.2%Language:PLSQL 2.8%Language:CSS 2.4%Language:Batchfile 0.1%Language:Shell 0.0%