Triplea: Add capability to launch Map Creator from within TripleA

Created on 17 May 2017  ·  28Comments  ·  Source: triplea-game/triplea

Originally raised here:

So for the map creator, I'd like to be able to launch it from TripleA. Essentially have a button probably on the main menu that would open it so its more integrated and obvious that we have map creation tools.

The Map Creator source is currently hosted in the triplea-maps/Project repo (v1, v2). However, there is currently no mechanism to build and release this tool in some form that can be easily downloaded by TripleA. Implementing the feature described in this issue will probably require defining a mechanism for building and releasing Map Creator from that repo.

Note that triplea_maps.yaml currently contains an entry for a version of Map Creator that was built manually and hosted on SourceForge:

- mapName: TripleA Map Creator
  url: http://downloads.sourceforge.net/project/tripleamaps/developer%20resources/map%20makers/TripleA_Map_Creator.zip
  version: 1
  mapType: MAP_TOOL

However, downloading this tool from the Download Maps window simply places the archive in the user's maps folder. The user is then required to manually unpack the archive and launch the tool from outside TripleA. The implementation of the feature described in this issue should not require any similar manual intervention on the part of the user (other than the initial download) to launch Map Creator.

Discussion

Most helpful comment

Wow, this brings back memories. 😃

I'm the one who built the early map makers, and have been out of the TripleA loop for a very long time. I haven't actually been playing it in that time, however my dad and younger brother play it frequently (like every couple days), so it's been nice to see the game continue to get updates here on Github. (and it's a much nicer platform than Source Forge)

I agree that the map makers are pretty bugged, and that a re-architecting would be good. I'm pleased to see that @veqryn added a new version to replace the "Part 1" from earlier, and that the "Part 2" was streamlined and made accessible from the game itself. (it's since been removed, I think because it still had some unfixed bugs, but it was neat to see the map creation process integrated somewhat into the main game -- hopefully we can have that again for a future, non-buggy version)

Ironically, I did not encounter any breaking bugs in it (when opening an existing map) except for the last step, where it crashed when I tried previewing/closing the HTML docs. 😅 (which would be enraging for a person if they didn't save up to that point!)

Anyhow, I don't have much to add since I'm currently working on other projects (mainly https://debatemap.live), but just wanted to say hello again to the community I first started making public projects for; it was a lot of fun.

I might come back at some point and try working on a full-fledged AI again. If I could reach back in the past and give myself one tip last time I tried, it would be: unit testing!!! That is, get a collection of like 300 various scenarios that the AI might find itself in, and hard-code in acceptable ranges of attack amounts and directions based on the feedback of expert players. Then just have the AIs do their processing in those scenarios, and see which ones they chose incorrectly on; then examine what led them to that mistake, and correct it, being able to measure their improvement as you make your modifications.

(This was a major annoyance the first attempts I made; I would make a change and get it working well in one scenario, but then I'd find that in doing so I weakened it's behavior somewhere else. With unit-testing, this will be much easier to catch early on and deal with, and provides a way for the community to track the AI's development/improvement -- plus gives a clear goal to pursue: get 100% of the unit-tests to pass, and the AI is ready!)

All 28 comments

@ssoloff
Just to understand it, this is about another map creator than the ones we can launch from TripleA?
tra

@panther2 Yes, sorry for not making that clear. The "map creators" referred to in this issue are tools that I believe were produced by the community sometime in the past but are not included with the engine (i.e. they are not managed in the triplea-game/triplea repo).

The v1 tool is a .NET application with no source provided (only Windows binaries are stored in the repo). The v2 tool is a Java app with source. I'm not sure of their histories, so don't know what the relationship between the two is.

Currently, the v1 tool is available for download via the Download Maps window under the Tools tab, but, as stated above, is not directly usable from within TripleA.

@ssoloff
I see, thanks for explaining. Are you sure (or better: do you know if) they contain something different from those pictured above (apart from the code basis)?

@panther2 Sorry, I do not.

@ssoloff
Neither do I, I am afraid. I seem to remember from the past that there have been "stand alone" tools that had been included into the engine once, represented by the above image.

Might be related to http://tripleadev.1671093.n2.nabble.com/Map-Creator-1-0-1-5-Released-tp4760274.html

My recalls are too vague, to draw any conclusion regarding this issue, unfortunately.

I hope that someone else knows better...

@ssoloff Might be best to post on the forum about the old map creator to get feedback from map makers to see if they believe its potentially useful or if it should just be retired.

The above stated thread on tripleadev (started early 2010!) implies that the functions had been included into TripleA 1.6.1.4 at the end of 2012.
Also @DanVanAtta stated there in June 2016 that he had included an "old C++ map maker tool" into the "next release",

Still I am not sure that this is all about the same old tools. I think some map makers might still use those stand alone tools - probably not being aware of the inclusion into the engine or for other reasons, that I might not be aware of or simply do not remember...

@ron-murhammer Will do. I need to set up an environment so I can play with them first so I know what I need to ask.

Thanks for digging up that old thread, @panther2. That definitely sounds like it's talking about the "v1" tool currently in the repo. I followed the links to the archived Google Code site and found the source. It does indeed look like it was the predecessor to a lot of the tools available from the in-game map creation tools. And it looks like the "v2" tool was produced by the same author and hosted on Google Code, as well.

@panther2 While prepping to post on the forum, I captured several screenshots of these two tools, which I've attached below.

From the v2 tool's credits, it looks like @veqryn was involved in the development, so maybe Chris can confirm if the in-game map creators are indeed direct ports of these two standalone tools.

TripleA Map Creator 1.0.1.5

Part 1

part-1

Part 2

part-2

About

about

Resizer and Shifter

resizer-and-shifter

TripleA Map Creator 2.0.0.2

Main Menu

main-menu

Walkthrough

walkthrough

About

about

Interesting, thanks for sharing, @ssoloff .

At least what you posted about 1.0.1.5 looks very familiar compared to the tools actually included.
The functionalities of 1.0.1.5 part 1 (and even more) appear to be available when hitting Run the Map creator . 1.0.1.5 part 2 appears to be available when hitting [Beta ] Run the Map creator .
The Resizer and Shifter is obviously not available in the current tools (at least I did not find it and never have been aware of it before).

TripleA Map Creator 2.0.0.2 appears to be a different approach.

Response to forum question by Frostion on 2017-05-19T04:38:

I don’t use them, but I did use them for the first few maps. They are pretty bugged, but besides that, they were also super nice and user friendly. I think Wisconsin really had a flair for user friendlyness.

I really liked that it was a step by step all-in-one process and that one could “go back” to previous steps. Also the ability to make units and unit stats was nice. As I remember, the map work could also be saved in some sort of bundle, or exported as playable game files.

A user friendly tool like this, updated and supporting all aspects of the game and the various XML possibilities, would be optimal.

My latest few maps have been made with the tools of the (non-beta) Map Creator in TripleA preferences. Plus a whole lot of manual file file structure building and file editing.

The question about how map makers might use the standalone map creation tools was posted to the forum 15 days ago. Based on the two responses received, it doesn't appear that the active map makers are using the standalone tools.

However, RogerCooper recently requested help to download the standalone map creator available via Download Maps, so there may be some map makers still using it. I asked RogerCooper to comment on the original forum question, but to this date, no post has been made.

@ron-murhammer What do you think? Should we continue to pursue adding the capability to launch the existing standalone map creation tools from within the game? Or should we simply remove the TripleA Map Creator entry from triplea_maps.yaml and update the web site to point interested map makers to the standalone tools either in the triplea-maps/Project repo or on the Google Code archive?

The two standalone tools were written in visual basic and only run on Windows OS (edit: actually the first was C# while the second was java, but was never finished).

I have wanted to get rid of them and port/redo/re-write/re-architect their functionality for a very long time, and the map creator that comes with TripleA is an attempt at that. Not just because they aren't cross platform, but also because they are old and do not really work well with how maps now work (even 3-4 years ago they didn't really match, and now they match even less).

Unfortunately, it was never totally finished.

Thanks for the information, @veqryn.

Just to be sure we're talking about the same standalone tools here... The version 1 tool I referenced above was written in C#, while the version 2 tool was written in Java. Are there other standalone tools written in VB that I didn't cover in this issue?

Nope, just my old memory.

@ron-murhammer Bumping this comment in light of #1860.

@ron-murhammer Bumping this comment again. Build 5335 failed while validating the TripleA Map Creator map due to an intermittent SourceForge error:

Execution failed for task ':validateYamls'.
> http://downloads.sourceforge.net/project/tripleamaps/developer%20resources/map%20makers/TripleA_Map_Creator.zip: error requesting map resource (Connect to gigenet.dl.sourceforge.net:443 [gigenet.dl.sourceforge.net/69.65.16.142] failed: Connection timed out)

My local build fails a few times a week when validating this map (albeit mostly due to the invalid cert on one of the mirrors causing a TLS handshake failure). After all the discussion we've had here and in #1860, it doesn't seem like there's much value keeping this map in triplea_maps.yaml.

@ssoloff I'm fine with removing the download link for it while we investigate and determine the best path forward on all the map creators.

Wow, this brings back memories. 😃

I'm the one who built the early map makers, and have been out of the TripleA loop for a very long time. I haven't actually been playing it in that time, however my dad and younger brother play it frequently (like every couple days), so it's been nice to see the game continue to get updates here on Github. (and it's a much nicer platform than Source Forge)

I agree that the map makers are pretty bugged, and that a re-architecting would be good. I'm pleased to see that @veqryn added a new version to replace the "Part 1" from earlier, and that the "Part 2" was streamlined and made accessible from the game itself. (it's since been removed, I think because it still had some unfixed bugs, but it was neat to see the map creation process integrated somewhat into the main game -- hopefully we can have that again for a future, non-buggy version)

Ironically, I did not encounter any breaking bugs in it (when opening an existing map) except for the last step, where it crashed when I tried previewing/closing the HTML docs. 😅 (which would be enraging for a person if they didn't save up to that point!)

Anyhow, I don't have much to add since I'm currently working on other projects (mainly https://debatemap.live), but just wanted to say hello again to the community I first started making public projects for; it was a lot of fun.

I might come back at some point and try working on a full-fledged AI again. If I could reach back in the past and give myself one tip last time I tried, it would be: unit testing!!! That is, get a collection of like 300 various scenarios that the AI might find itself in, and hard-code in acceptable ranges of attack amounts and directions based on the feedback of expert players. Then just have the AIs do their processing in those scenarios, and see which ones they chose incorrectly on; then examine what led them to that mistake, and correct it, being able to measure their improvement as you make your modifications.

(This was a major annoyance the first attempts I made; I would make a change and get it working well in one scenario, but then I'd find that in doing so I weakened it's behavior somewhere else. With unit-testing, this will be much easier to catch early on and deal with, and provides a way for the community to track the AI's development/improvement -- plus gives a clear goal to pursue: get 100% of the unit-tests to pass, and the AI is ready!)

@Venryx Contributions always welcome! And yeah the map making tools could definitely use some improvements. I actually completely rewrote the AI already (now called FastAI and HardAI) and at least I think its vastly improved over the previous ones. It performs fairly well on most simple/standard maps. I always wanted to create a sort of testing harness for the AI but haven't gotten around to doing it.

You should give the new AI a test run and see what ya think :)

Just a +1 for adding back the (improved) XML-creator one day.

As I said in #1860:

... but it appears to be a very helpful tool to either modify existing XML-files or create a new one "from scratch" for people without deeper knowledge of creating/modifying game.xml files using editors.

I don't think we'd be adding it back ever. Instead we would be re-writing it in Java, integrated with the existing code base, just like the new 'part 1' is.

Hi Venryx!

The "beta" one already is in Java, but if a fresh start is preferred, that sounds fine too. (it will require someone to invest a larger block of time, however)

Do you think we should take the route of having a specific XML creator, or try to integrate all those functions directly into edit mode? The edit mode approach would be cooler/more-flexible I think, but would probably take more work since then you'd have to work within the existing code base more closely.

Also: Hi Veqryn! It's been a while..

@Venryx Probably some combination of an XML creator and edit mode would be best (how exactly you do that is up for discussion). My thought is you still need some steps to define the "map" portion of the XML like image, territories, rules, etc but then things like unit placement, PUs, resources, etc could be done with edit mode (or a form of edit mode). There are actually a lot of map makers that don't realize you can use edit mode today to help create XML by loading up a game, changing stuff, and then exporting the XML.

Yeah, we'd need to make the edit-mode process easier to discover and use for people building a map. For now, perhaps just a button in the map creator window launching the bare map xml as a game, with a label explaining that you should then enter edit mode, change the units and such, then use the "export as xml" command to re-save.

@Venryx Yep, that was my thought as well. I kind of think of map making in 3 main parts:

  1. Create initial XML and map images (this is where the "map creator" should focus). This gets you to a base functioning map zip that you could launch.
  2. Use edit mode to add units, PUs, resources, etc to the base map. With some base explanation on how to do it and save it.
  3. Point folks to POS2 XML for advanced manual XML editing reference (this could eventually be covered in the "map creator" but there are lots of pieces which aren't).

Closing as I believe the original problem raised in this issue has been resolved. Further enhancements to the map making tools can be tracked in separate issues.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ron-murhammer picture ron-murhammer  ·  5Comments

ron-murhammer picture ron-murhammer  ·  6Comments

General-Dru-Zod picture General-Dru-Zod  ·  5Comments

DanVanAtta picture DanVanAtta  ·  5Comments

Khobai picture Khobai  ·  9Comments