Giter Club home page Giter Club logo

genie-rms's Introduction

genie-rms

Age of Empires 2 Random Map Script parser for Node and the browser.

This library aims to be as compatible with AoE2 as possible. This means that its implementation imitates all the quirks of the AoE2 parser, too. It does not use an AST and does not have separate lexing and parsing steps. If you need a parser for a subset of all valid RMS code, but that returns an AST that you can manipulate, try the mangudai library.

Status - Install - Usage - Credits - License: GPL-3.0

Status

Parsing is roughly complete.

Terrain generation more or less works, as does object generation. Both are probably inaccurate compared to AoC, though. Object generation does not support civilization bonuses.

Land positioning and generation is buggy. While lands are placed, sometimes they are placed outside the map, crashing the generator. Lands of enemy players may be placed directly next to each other instead of on near-opposite sides of the map. Team-based placement is not yet implemented.

Cliff generation more or less half-works. Cliff generation does two things: change the terrain and place cliff objects. The terrain update part is implemented, but cliff objects are not. It does not correctly avoid player lands, so cliffs may be placed near or underneath town centers and the like.

Elevation generation has some implementation but whether it works is unclear.

Connections between player lands are not implemented.

UserPatch and HD Edition commands are not implemented. The goal is to first finish 1.0c semi-compatibility. Ideally, compatibility modes for UP and HD could be introduced later. As such, Zip-RMS from UserPatch 1.5 are also not implemented, although there is a utility class for reading files from them without requiring a full zip library in src/ZipRMS.js.

Install

npm install genie-rms

Usage

const { Parser, CRandom } = require('genie-rms')
const fs = require('fs')
const source = fs.readFileSync('./my-script.rms', 'utf-8')

const seed = 32767
const parser = new Parser({
  // Omit for a random seed
  random: new CRandom(seed)
})

parser.write(source)

const result = parser.end()
console.log(result)

Credits

Most of this is made possible by the reverse engineering work by Yvan-Burrie, JustTesting123 and others in genie-reverse.

License

GPL-3.0

genie-rms's People

Contributors

goto-bus-stop avatar hszemi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.