Coder Social home page Coder Social logo

Comments (10)

detrumi avatar detrumi commented on April 27, 2024 1

A good starting point would be parsing the .rms files which generate the random maps (they can be found in the Random folder in the original game folder). Most of the commands used there could be extended to infinite maps, though we obviously want normal maps to work as well. I'd like to gradually implement the commands found in the .rms files, and compare the resulting maps with the original game.

We now have a perlin noise generator in python, and the RNG in c++. Where should the map generation itself live? Maybe parse the .rms files in python, and generate the map itself in c++?

Some other points:

  • There are some resources on random map generation in AOE2, but that's mainly on the scripting aspect, and not how the game uses these scripts to generate the map. Does anyone know of more documentation on the map generation?
  • If we want to extend the random map scripts with new commands, we might want to create our own format for it, but I'm not sure we'd need that. Also, if we get our own format, I'd prefer for the game to be able to still read .rms files, and not forcing the script maker to convert it first somehow, to make it easier for script makers.
  • For easy map generation testing, it would be very nice to be able to get a screenshot of the map without starting the game, but this is probably very hard. The original game also has a (kinda bad) full-map-screenshot utility with Control+F12.

So, let me recap my main questions:

  • Where should the code go? Parsing in python, and generation in c++?
  • Any known documentation on AOE2 map generation? (Edit: there's a lot!)

from openage.

janisozaur avatar janisozaur commented on April 27, 2024

keep in mind that system-provided rand() are not portable in a sense that each system can provide it's own (p)rng. implementation of own prng would likely be required. have a look at lcamtuf's paper for inspiration: http://lcamtuf.coredump.cx/oldtcp/tcpseq.html

from openage.

mic-e avatar mic-e commented on April 27, 2024

A deterministic random number generator that is synced across all multiplayer clients is absolutely essential, of course. De-syncs were the main issue during age2's development. Map seeds and game session seeds would be an essential step.

from openage.

franciscod avatar franciscod commented on April 27, 2024

RNG here #191

from openage.

franciscod avatar franciscod commented on April 27, 2024

Maybe we could generate a random map in AoE2, then save the game, and after thta load the terrain data from the savegame. These guys could help us in "decompiling" (I'm not sure if we need this) the running binary so we can get more info about the generation.

from openage.

detrumi avatar detrumi commented on April 27, 2024

We don't really need to exactly replicate the original generation, it just has to be at least as good, if not better.

edit: I misunderstood your comment. Yeah, looking at the savegame would help if it wasn't clear what is being generated, but I expect that just looking at the map with fog of war turned off will be enough.

from openage.

TheJJ avatar TheJJ commented on April 27, 2024

http://exupero.org/hazard/post/islands/
https://github.com/exupero/islands

from openage.

TheJJ avatar TheJJ commented on April 27, 2024

https://flafla2.github.io/2014/08/09/perlinnoise.html

from openage.

simonsan avatar simonsan commented on April 27, 2024

Pretty interesting stuff how to generate fair map seeds while staying with the so loved randomness of AoE.

Dire Straits is built using a different process than a typical AoE2 map in order to generate unpredictable geography while validating each map with a computer program to keep things fair for both teams. For more information about how to create maps like this, including the source code for all the programs used, see this guide:

https://web.archive.org/web/20200418033040/https://docs.google.com/document/d/1E_Si9iXmzUqFuptkW-8F6XdmoxDXNUG36XIhnh86krU/edit

Dire Straits & creating random RM maps.pdf

from openage.

simonsan avatar simonsan commented on April 27, 2024

Documentation and utilities for writing Age of Empires II: DE random map scripts
https://github.com/hungarian-notation/rms-toolkit

from openage.

Related Issues (20)

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.