Author Topic: Helping out with External Code  (Read 16772 times)

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: Helping out with External Code
« Reply #45 on: May 08, 2017, 10:38:26 pm »
I'm more concerned about a clean UI design to make the meanings clear. For example, if one-way wormholes become a thing, I feel like the connections in the Galaxy Map need to be descriptive (maybe a color gradient? Maybe with arrows?), and the Wormhole image itself should be tweaked.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Helping out with External Code
« Reply #46 on: May 09, 2017, 08:06:29 am »
if one-way wormholes become a thing (...) the Wormhole image itself should be tweaked.
"Why does that icon look like a giant catapult?"

*THWONG!*

"Aieeeee!"

(Usability study, iteration 23, result: communicates necessary information almost quickly enough)
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Draco18s

  • Resident Velociraptor
  • Core Member Mark V
  • *****
  • Posts: 4,251
Re: Helping out with External Code
« Reply #47 on: May 09, 2017, 11:24:53 am »
If it floats like a duck, it must be a witch.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Helping out with External Code
« Reply #48 on: May 09, 2017, 11:47:37 am »
If it floats like a duck, it must be a witch.
An icon of a crone with a pointy hat on a broom would be pretty funny. But an icon of a duck would be even better.

"Only traversible by ships equipped with a Mallard Drive"
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: Helping out with External Code
« Reply #49 on: May 10, 2017, 08:21:08 pm »
Okay, I've updated my Map Generators to handle the changes in .123. While I'm happy to just enjoy those maps myself, I'd like to share them with everyone else! I'm not sure how to do that best though. If you guys would like the code in the base game then I'm happy to send you the code and do a few rounds of cleanup to bring it up to your standards.

Offline Dominus Arbitrationis

  • Arcen Games Contractor
  • Arcen Staff
  • Sr. Member Mark III
  • *****
  • Posts: 479
Re: Helping out with External Code
« Reply #50 on: May 11, 2017, 02:49:49 pm »
Okay, I've updated my Map Generators to handle the changes in .123. While I'm happy to just enjoy those maps myself, I'd like to share them with everyone else! I'm not sure how to do that best though. If you guys would like the code in the base game then I'm happy to send you the code and do a few rounds of cleanup to bring it up to your standards.

I'd post the mod code for everyone, just in case Chris or Keith can't add it in for a bit that way others can still enjoy it. Plus, they can then integrate it and let you know what all cleanup is required.
Come help out at the Wiki!

Have ideas or bug reports for one of Arcen's games or any part of the site? Use  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games and site better!

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: Helping out with External Code
« Reply #51 on: May 11, 2017, 02:57:57 pm »
Cool, I'll try to upload a version of the code tonight.

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: Helping out with External Code
« Reply #52 on: May 11, 2017, 09:18:25 pm »
Alright, here you go! These are two files, an XML file which should be placed in GameData/Configuration/MapType, and a .cs file that should be placed in AIWarExternalCode/src. Recompile according to the instructions in https://wiki.arcengames.com/index.php?title=AI_War_2:Earlier_Than_Earlier_Alpha_Modding_Instructions. Note that you will have to tweak the .csproj to include MapGenerationBadger.cs.

The code is vaguely tidy and should be readable. This code implements 4 major map types; "Solar System Lite" (Circles from my original post), "Dreamcatcher" (a gabriel graph), "Simple" (Relative Neighbor Subgraph, in homage to AIWC) and "Constellation" (spanning tree).

There is also another included map type, "ExampleForAspiringModders" which I wrote for anyone else who wants to try their hand at this.  If you are interested in messing with the Map Generator code, please look at this example first. I promise it will make your life easier!

I'm happy to take suggestions or critique from anyone who wants to wade through it all. 
« Last Edit: May 18, 2017, 08:52:01 am by BadgerBadger »

Offline Draco18s

  • Resident Velociraptor
  • Core Member Mark V
  • *****
  • Posts: 4,251
Re: Helping out with External Code
« Reply #53 on: May 11, 2017, 09:38:11 pm »
That looks delightfully easy. Thanks Badger.

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: Helping out with External Code
« Reply #54 on: May 14, 2017, 09:29:43 pm »
Here's another interesting one (it's a mashup of the layout of solar system lite with a Gabriel graph, but I think it looks cool). Note you can't do this with the code I uploaded previously, but you will in a few days.

Offline Draco18s

  • Resident Velociraptor
  • Core Member Mark V
  • *****
  • Posts: 4,251
Re: Helping out with External Code
« Reply #55 on: May 14, 2017, 09:52:23 pm »
Looks neat. A few overlapping connections, but they remain readable.

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: Helping out with External Code
« Reply #56 on: May 14, 2017, 10:01:41 pm »
Nice spotting, the overlaps were due to a bug. Here's a version w/o overlaps (and more planets, so it looks better).


Offline Draco18s

  • Resident Velociraptor
  • Core Member Mark V
  • *****
  • Posts: 4,251
Re: Helping out with External Code
« Reply #57 on: May 14, 2017, 11:12:46 pm »
Very nice.

Offline Draco18s

  • Resident Velociraptor
  • Core Member Mark V
  • *****
  • Posts: 4,251
Re: Helping out with External Code
« Reply #58 on: May 16, 2017, 09:38:04 pm »
Are there limits on the extents of the map?  I.e. what are the largest values you can plug in for a system's X/Y coordinates?

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: Helping out with External Code
« Reply #59 on: May 16, 2017, 09:41:29 pm »
You know, I haven't checked, given that maps that are too spread out don't feel appealing to me ("Man, how long do I have to scroll to find Murdoch?"). Go plug some values into the ExampleForAspiringModders ;-)

 

SMF spam blocked by CleanTalk