genie-js / genie-rms Goto Github PK
View Code? Open in Web Editor NEWAge of Empires 2 random map script parser and evaluator for Node.js and the browser
Home Page: https://genie-rms.surge.sh
License: GNU General Public License v3.0
Age of Empires 2 random map script parser and evaluator for Node.js and the browser
Home Page: https://genie-rms.surge.sh
License: GNU General Public License v3.0
It would be nice to also view generated maps in-game. https://github.com/genie-js/genie-scx can not quite generate SCX files yet because awestruct doesn't support the same dynamic stuff for writing as it does for reading. Awestruct likely needs a major version bump to allow that. Then this script should be fairly simple to write (if a bit tedious).
This was low priority for me at first but I think it's quite important in order to make generated maps look decent. The terrains this project generates right now are very holey and jagged compared to the nice lumps generated by AoC.
this is fixed in UP 1.5 but can have a significant effect on maps before that. I think the commentDepth check in Parser.js#parseToken needs to be moved somewhere down.
🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.
adding things i remember off the top of my head, to be extended—
1.0c compat:
if LOW_RESOURCES
etcUP compat:
Primarily so the output of the land generator can be inspected.
const content = fs.readFileSync(require.resolve('./test/Arabia.rms'), 'utf8')
const parser = new Parser({})
parser.write(randomMapDef)
parser.write(content)
const parseResult = parser.end()
console.log(parseResult)
console.log(JSON.stringify(parseResult)) // json serialization
expect(parseResult).toMatchSnapshot() // jest snapshot testing
I wanted to experiment with adding some automated tests, but strictObject.js
Proxy seems to prevent me from doing any kind of serialization / snapshot testing:
TypeError: toJSON is undefined
6 | const val = target[prop]
7 | if (typeof prop === 'symbol' || whitelist.has(prop)) return val
> 8 | if (val === undefined) throw new TypeError(`${prop} is undefined`)
| ^
9 | return val
10 | }
11 | })
at Object.get (src/strictObject.js:8:36)
at JSON.stringify (<anonymous>)
at Object.stringify (src/test/Parser.test.js:16:20)
Or alternatively with jest:
PrettyFormatPluginError: $$typeof is undefined
6 | const val = target[prop]
7 | if (typeof prop === 'symbol' || whitelist.has(prop)) return val
> 8 | if (val === undefined) throw new TypeError(`${prop} is undefined`)
| ^
9 | return val
10 | }
11 | })
TypeError: $$typeof is undefined
at Object.get (src/strictObject.js:8:36)
at Object.<anonymous>.exports.test.val [as test] (node_modules/pretty-format/build/plugins/react_test_component.js:71:48)
at findPlugin (node_modules/pretty-format/build/index.js:318:22)
at printer (node_modules/pretty-format/build/index.js:330:18)
at printListItems (node_modules/pretty-format/build/collections.js:135:9)
at printComplexValue (node_modules/pretty-format/build/index.js:224:43)
at printer (node_modules/pretty-format/build/index.js:344:10)
at printObjectProperties (node_modules/pretty-format/build/collections.js:170:21)
at printComplexValue (node_modules/pretty-format/build/index.js:270:48)
at prettyFormat (node_modules/pretty-format/build/index.js:499:10)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.