ashleynewson / openra-map-generator

Experimental random map generation for OpenRA
MIT License
0 stars 0 forks source link

OpenRA Random Map Generator Prototype (unofficial)

This is a prototype random map generator for OpenRA. It is by no means complete, but can already generate playable maps. See the gallery.

This prototype is written in JavaScript and can run directly within a web browser.

Setting up locally (for development)

  1. Checkout the repository.

  2. Obtain a copy of https://github.com/OpenRA/OpenRA/blob/bleed/mods/ra/tilesets/temperat.yaml and save it to the root of the repository. (This is a GPL-licensed file and cannot be included in this project directly.)

  3. Run perl ./compile-tile-info.pl to generate temperat-info.json

  4. Serve the repo locally using a web server, e.g. python -m http.server -b 127.0.0.1 8000

  5. Open it in a browser!

License

The official license for this project is in the LICENSE file.

In order to maintain the more permissive MIT license for this software, it does not include any files from the OpenRA project, which uses the more restrictive (but still open source) GPL 3 license.

Whilst the MIT license is already fairly permissive, and may already be used in projects with more restrictive licenses, feel free to contact me (or open an issue) if you would like explicit relicensing for inclusion within your own project.

Q&A

Are the generated maps copyrighted or restricted by a license?

No. All maps generated by this software are in the public domain.

Note that this may apply in whole or in part even to maps created using relicensed derivatives of the map generation software. Copyright laws usually state that computer-generated works without sufficient human input are inelligible for copyright protection. There are nuances here which I am not qualified to discuss. (I am not a copyright lawyer! This is not legal advice!)

Does this use generative AI?

This project does not and will never make use of machine learning/generative AI.

I have an ambition that my work could eventually make it into upstream OpenRA or otherwise be run on player's computers to generate maps in reasonable time.

This isn't to say that there wouldn't be advantages to using generative AI, and it could potentially be an interesting accademic project. That's just not what I'm going for, though.

Why doesn't this project use a GPL license like OpenRA?

The MIT license is more permissive than GPL. This allows it to be used in GPLed works as well as non-GPLed works. This could be important if the map generation project were to be included in something other than the OpenRA project itself.

OpenRA isn't necessarily the only project which could benefit from this work. There are other C&C/RA communities outside of OpenRA which, to my knowledge, also have no viable random map generators.

Another aspect to consider, even within the realm of OpenRA, is that many users create and release maps under various licenses, including ones which do not allow derivative works. In future, parts of the map generation project could potentially be integrated into scripts in these maps. Maps generally don't use GPL, and may use an incompatible license. (In fact, people often don't even bother to specify a license for their maps.)

More permissive licenses can also encourage contributions from additional developers. (Though it can also discourage others.) Part of it comes down to personal taste.

Ultimately, this is presently a prototype written in JavaScript, which doesn't make sense for direct inclusion in other projects anyway. My primary goal here is to explore, demonstrate, and offer up algorithms that could later be re-written properly for a target project.

Your code is a mess

Yeah, sorry. It's a prototype! I optimized for experimentation.

I might focus instead on documenting the algorithms before cleaning up the code.