Forged Alliance Forever Forged Alliance Forever Forums 2017-12-15T11:41:58+02:00 /feed.php?f=53&t=15565 2017-12-15T11:41:58+02:00 2017-12-15T11:41:58+02:00 /viewtopic.php?t=15565&p=158024#p158024 <![CDATA[Re: Random Map Generator - How to hook it into the game?]]> make a few heightmap tiles, generate them randomly with a few rules and then load it into the editor with photoshop RAW, let a mapper do the rest :P

Statistics: Posted by biass — 15 Dec 2017, 11:41


]]>
2017-12-15T11:18:48+02:00 2017-12-15T11:18:48+02:00 /viewtopic.php?t=15565&p=158022#p158022 <![CDATA[Re: Random Map Generator - How to hook it into the game?]]>
lets say you have map confirmators or w.e.
these guys can either hit the generate button 10 times and when a good one comes up they say yeah its good.
or they can be given a choice of 10 generated maps and have to pick the best one.


given enough time and effort, the task of creating a map (just like many other tasks) can be subdivided into smaller more manageable things. creating such a project could be extremely cool because it could also create a set of mapping tools for the community to use in hand made maps. im not aware of what we have already but things i could see happening is:

basic texture painting based on cliff slope, water, and such
more intelligent reclaim/tree placement based on zones designated and not placing them on cliffs and such,
decal placement again based cliff slope, water edge, manually defined boundaries, ect.
"prettification" of cliff heightmaps and whatnot

with even more effort, since the above would be procedural you could make them more parametric and allow redefining boundaries and such, with the decals/whatever being redrawn to match.

would be an interesting but difficult project i would say.

Statistics: Posted by Exotic_Retard — 15 Dec 2017, 11:18


]]>
2017-12-15T05:26:50+02:00 2017-12-15T05:26:50+02:00 /viewtopic.php?t=15565&p=158016#p158016 <![CDATA[Re: Random Map Generator - How to hook it into the game?]]>
It will not be easy to generate good maps. For example: if we tried to divide a map, let's say Hrungdaks Canyon, into rooms and paths it would looks something like this:

Image

Team games would be difficult to balance how many mexes and mass each player would have, but as always, symmetry is our friend. It would be a lot easier to generate 1v1 maps. In hindsight, I should have done this to a 1v1 map instead :lol:

Statistics: Posted by Sllypper — 15 Dec 2017, 05:26


]]>
2017-12-15T04:31:33+02:00 2017-12-15T04:31:33+02:00 /viewtopic.php?t=15565&p=158015#p158015 <![CDATA[Re: Random Map Generator - How to hook it into the game?]]>
Morax wrote:
I'm not really a coder beyond some simple sensors and motor control, but would this not be extraordinarily huge AI-level effort to make something that is NOT as simple as some of the GW maps?


It's actually fairly easy to randomly generate something that doesn't look like natural terrain.

The GW map generator makes maps using realistic terrain generation. This approach i'm proposing would do the opposite, create the gameplay elements first.

For example, you first get an empty map and set the height levels to maximum. Then you sculpt out the map by generating "rooms" and setting paths between them. We could generate like 8 rooms per side and interconnect them so it doesn't look like a Voodoo map. You could have different types of paths like a lake, mountain, cliff; and different types of rooms, like a mass reclaim field, forest, plateau, second expansion...
Then you could make a second pass finding the empty area between paths and rooms and smooth it out.

It'd work kinda like the level generator from Spelunky (http://tinysubversions.com/spelunkyGen/) but less tile-y.
Edit: Or an oldschool roguelike map generation

Statistics: Posted by Sllypper — 15 Dec 2017, 04:31


]]>
2017-12-13T21:21:27+02:00 2017-12-13T21:21:27+02:00 /viewtopic.php?t=15565&p=157994#p157994 <![CDATA[Re: Random Map Generator - How to hook it into the game?]]> Statistics: Posted by Morax — 13 Dec 2017, 21:21


]]>
2017-12-09T22:51:11+02:00 2017-12-09T22:51:11+02:00 /viewtopic.php?t=15565&p=157827#p157827 <![CDATA[Re: Random Map Generator - How to hook it into the game?]]>
You could use much code from duck and ozonex who both published their code. How will you implement this? Easiest for me would be c# cos I'm good at it and all the preceding work is in c#. Then it would be harder to integrate with Linuxy systems. Could always host yourself and have a web service.

Statistics: Posted by nine2 — 09 Dec 2017, 22:51


]]>
2017-12-09T20:28:22+02:00 2017-12-09T20:28:22+02:00 /viewtopic.php?t=15565&p=157820#p157820 <![CDATA[Re: Random Map Generator - How to hook it into the game?]]>
And since Galactic War has its own backend + API + client, you can use it as a way of testing randomly generated maps without the need to make changes in the "normal" FAF server/client.

See: /viewforum.php?f=50

Statistics: Posted by Katharsas — 09 Dec 2017, 20:28


]]>
2017-12-09T18:22:13+02:00 2017-12-09T18:22:13+02:00 /viewtopic.php?t=15565&p=157816#p157816 <![CDATA[Re: Random Map Generator - How to hook it into the game?]]>
Anihilnine wrote:
I used to share this dream.

Faf client can generate maps easily enough.

Duck got map gen working, I have played on his maps. He did a good job and broke through lots of barriers.

Twin rivers and Loki are interesting in a way that random won't be. Random isn't good, careful design and craftsmanship is good.

I personally would play random maps, but id have low expectations.

Random maps could fine tuned manually by real mappers


You're right, but I also feel that Duck went to a different direction I would. He generated asymmetrical topological maps and tried to fit them to be playable on FAF. I would go the opposite way: generate a map through its gameplay elements first (spawn area, expansion, reclaim pools, valleys, mesas, rivers, lakes), make the negative area unplayable and make it symmetrical. Not undermining Duck's work, which is fantastic and pioneering, but I'd like to see this approach and I think it would work for better playability.

Edit: What I would look for in a random map generator is for it to be capable to generate from 1v1 to team games and 8P Phantom games, for it to be fair, not mattering how bad the map is for everyone (like 1 mex flat maps, or tiny island maps), and for it to have several different map types (topographical) and skins (texture, color and lighting wise).
I feel that this approach would be able to fulfill this with more ease.

Statistics: Posted by Sllypper — 09 Dec 2017, 18:22


]]>
2017-12-09T11:10:40+02:00 2017-12-09T11:10:40+02:00 /viewtopic.php?t=15565&p=157806#p157806 <![CDATA[Re: Random Map Generator - How to hook it into the game?]]>
Faf client can generate maps easily enough.

Duck got map gen working, I have played on his maps. He did a good job and broke through lots of barriers.

Twin rivers and Loki are interesting in a way that random won't be. Random isn't good, careful design and craftsmanship is good.

I personally would play random maps, but id have low expectations.

Random maps could fine tuned manually by real mappers

Statistics: Posted by nine2 — 09 Dec 2017, 11:10


]]>
2017-12-09T05:19:43+02:00 2017-12-09T05:19:43+02:00 /viewtopic.php?t=15565&p=157801#p157801 <![CDATA[Re: Random Map Generator - How to hook it into the game?]]> Then it could even have replay working and wouldn't polute the Vault or anything. Like, the generator options would be saved into FAF the replay overhead and the client would generate the temporary map before launching it.

There it goes my dream of it having it with map options inside the lobby for seed, map type, etc... like the one on AoE 2. That's the downside, setting the player number outside the lobby. It wouldn't be that bad if it is used for 1v1, though.


Another question then, what would be the best implementation of it by design? Not considering if it's possible or how easy is to do it, but how would it work and be integrated the best? What would have to change for it to be possible that way?

Thanks everyone for answering and thanks CookieNoob for linking the old generator for GW. I'll check it out :)

Statistics: Posted by Sllypper — 09 Dec 2017, 05:19


]]>
2017-12-08T17:49:29+02:00 2017-12-08T17:49:29+02:00 /viewtopic.php?t=15565&p=157762#p157762 <![CDATA[Re: Random Map Generator - How to hook it into the game?]]>
uzurpator wrote:
Unless the forged alliance process locks the entire game directory tree.
uzurpator wrote:
It is possible to invoke an executable from a game lua scripts?
The game engine restricts access to all files, except the game.prefs file from the ingame code. There is no way around that. The reason for this is to prevent malicious code being executed from mods/maps (viruses...).

Blackheart wrote:
Couldnt you do it for ladder? Once you have found an opponent, the server creates a map, sends it to both players and then the game starts. Also with the map being unexplored at start please! :>
that is possible (except for the unexplored part, I know it was implemented in the original sup com game, but FA doesnt contain it afaik).

Statistics: Posted by CookieNoob — 08 Dec 2017, 17:49


]]>
2017-12-08T17:25:36+02:00 2017-12-08T17:25:36+02:00 /viewtopic.php?t=15565&p=157761#p157761 <![CDATA[Re: Random Map Generator - How to hook it into the game?]]>
Blackheart wrote:
Couldnt you do it for ladder? Once you have found an opponent, the server creates a map, sends it to both players and then the game starts. Also with the map being unexplored at start please! :>


I was actually wanting to create a random generator ( disclosure, I am a programmer and have made topographics generators before ) for this reason only. In perfect world before any match a set of, say, five maps would be created and opponets would negotiate which one they want to duke it out.

This would make it impossible to 'patent' a map.

Statistics: Posted by uzurpator — 08 Dec 2017, 17:25


]]>
2017-12-08T17:23:02+02:00 2017-12-08T17:23:02+02:00 /viewtopic.php?t=15565&p=157760#p157760 <![CDATA[Re: Random Map Generator - How to hook it into the game?]]>
Does the game load the scmap first, and then runs the scenario scripts, or vice-versa? It is possible to invoke an executable from a game lua scripts?

If the script files are run first, then it should be possible to run a map script which invokes a seperate process to generate the scmap and preview there. Unless the forged alliance process locks the entire game directory tree.

Moreover - the lobby of FAF is different then in vanilla game, so I persume there are chagnes there that should allow to transfer seeds when the host triggers a map change - rating and games playes are, after all.

Transferring random maps through the Vault seems very inefficient :)

Statistics: Posted by uzurpator — 08 Dec 2017, 17:23


]]>
2017-12-08T17:19:02+02:00 2017-12-08T17:19:02+02:00 /viewtopic.php?t=15565&p=157759#p157759 <![CDATA[Re: Random Map Generator - How to hook it into the game?]]> Statistics: Posted by Blackheart — 08 Dec 2017, 17:19


]]>
2017-12-08T17:02:45+02:00 2017-12-08T17:02:45+02:00 /viewtopic.php?t=15565&p=157758#p157758 <![CDATA[Re: Random Map Generator - How to hook it into the game?]]>
uzurpator wrote:
If the generator is correctly created, it can create maps on the fly in the lobby. All that needs to be done is to share a seed with all players and they will generate an exact copy of the map. Plenty of games to that.

A scenario file might also contain a seed for generation, so anyone who has it will generate the same map, all of the time.


no, thats not true. The game engine restricts file access for game code after launching the lobby (the initialization file is a slightly different story, but it is also not suitable) to the game.prefs file. However, to create a playable map, you need to generate the .scmap file of that map. The commands to manipulate the map from the LUA code are basically non-existant.

Sure a generator can be created as a deterministic function that generates always the same result from a seed. The problem is not the generation of the map, but the restrictions of the engine functions that prevent modification on the map files.

Statistics: Posted by CookieNoob — 08 Dec 2017, 17:02


]]>