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

Offline keith.lamothe

  • Arcen Games Staff
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,065
Re: Helping out with External Code
« Reply #60 on: May 16, 2017, 10:33:22 PM »
I don't think there are any limits on the coordinates that you need to worry about (i.e. it's not infinity, but really). What you're more likely to run into is how far out you can zoom and possibly how far you can pan. Which could be made configurable if really necessary, but the info display won't work right past a certain zoom-out, and the game would get mighty tedious much past 200 planets, if not before, due to the core mechanics of wormhole traversal and the related input needed.
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 IV
  • *****
  • Posts: 3,826
Re: Helping out with External Code
« Reply #61 on: May 16, 2017, 11:29:16 PM »
I was speaking practical limits based on pan and zoom.

There are some galaxy gen algorithms from ol' Space Empires that can now be done in AIW2 and it occurred to me that I might want to make sure that things stay within reasonable bounds.

Online BadgerBadger

  • Sr. Member
  • ****
  • Posts: 339
  • BadgerBadgerBadgerBadger
Re: Helping out with External Code
« Reply #62 on: May 17, 2017, 09:26:54 PM »
Hey all, I have a new map type, and I'm looking for feedback! This is a very different one; it is vaguely similar to Clusters, in that it creates regions of planets, but each region has links according to a randomly chosen linking algorithm, and then the regions are linked together at the end. It feels like a Nebula to me, hence the name. One of the nice things about this map is that each instance is wildly different; to illustrate the point I've uploaded two copies.

The code needs more cleanup before I share it though, it's still kinda messy. Thoughts/preferences/opinions are welcome!

Offline keith.lamothe

  • Arcen Games Staff
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,065
Re: Helping out with External Code
« Reply #63 on: May 17, 2017, 10:06:18 PM »
Awesome :)
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Online BadgerBadger

  • Sr. Member
  • ****
  • Posts: 339
  • BadgerBadgerBadgerBadger
Re: Helping out with External Code
« Reply #64 on: May 19, 2017, 06:43:52 PM »
Hey everyone! For your pleasure for the weekend, I have some new code with a few new map types. The coolest is "Nebula", but there are a couple other random ones as well (Geode1, Geode2 and Haystack). Haystack is kindof a mess, but if people have an opinion over whether Geode1 or Geode2 is cooler then I'd appreciate it. See this post https://forums.arcengames.com/private-alpha-discussion/helping-out-with-external-code/msg214871/#msg214871 for how to set things up. Running these will throw a bunch of output into the ArcenDebugLog.txt; all of those messages can be ignores though.

I feel like I'm starting to run a bit low on new map ideas (if only because I now have a bunch of cool maps to try once the game is a bit further in development), but if anyone else has some cool ideas or feedback I'd be happy to give them a try. Keith/Chris? Anything you guys wish you had time for?

And for Keith, is there any way you could finagle in some flags that I can expose in a GUI so I can pass some additional variables to the map generation subroutines? There are a ton of variables I'd like to tune to optimize things, but it's really annoying having to close the program, recompile, reopen the program and then navigate to the map I'm tweaking over and over.... "No, I'm busy" is technically fine, since it's not like it's prevented me so far, but I'd much rather ask and be told No than not ask!
« Last Edit: June 10, 2017, 06:54:58 PM by BadgerBadger »

Offline keith.lamothe

  • Arcen Games Staff
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,065
Re: Helping out with External Code
« Reply #65 on: May 19, 2017, 07:24:12 PM »
And for Keith, is there any way you could finagle in some flags that I can expose in a GUI so I can pass some additional variables to the map generation subroutines? There are a ton of variables I'd like to tune to optimize things, but it's really annoying having to close the program, recompile, reopen the program and then navigate to the map I'm tweaking over and over.... "No, I'm busy" is technically fine, since it's not like it's prevented me so far, but I'd much rather ask and be told No than not ask!
You're welcome to read a config file of your own off disk during mapgen, for now. Later external code will be locked down from doing file i/o.

A generic way to add additional settings that can be configured in-game would be great for modding in general, though, once we get there.
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 tadrinth

  • Sr. Member Mark II
  • ****
  • Posts: 415
Re: Helping out with External Code
« Reply #66 on: May 30, 2017, 02:05:34 PM »
Map type idea: take a maze or vines map.  Replace nodes at random with small clusters (5-7 planets).  Would have lots of chokepoints (good for Fallen Spire) but also lots of non-choke-pointed systems. 

Spiral galaxy: large cluster in the middle, 8 arms coming off, each arm is a series of linked small clusters. 

I was actually working on this one: Encapsulated, except the outer ring is only 12 planets.  And maybe some extra leaf planets coming off the internal clusters, to make them more defensible.
« Last Edit: May 30, 2017, 02:07:14 PM by tadrinth »

Online BadgerBadger

  • Sr. Member
  • ****
  • Posts: 339
  • BadgerBadgerBadgerBadger
Re: Helping out with External Code
« Reply #67 on: May 30, 2017, 02:30:58 PM »
Hey Tadrinth, those are cool ideas! I like them. If I get the chance I'll take a stab at them later (we'll see how busy my week winds up being).

Did you have any luck making encapsulated work with 12 planets in the outer ring? I think this code snippet will do it:
@@ -2658,6 +2660,8 @@ namespace Arcen.AIW2.External
                         break;
                     default:
                         numberOfRimPlanets = ( (FInt)NumberOfPlanets * FInt.FromParts( 0, 400 ) ).IntValue;
+                        if(numberOfRimPlanets > 12)
+                          numberOfRimPlanets = 12;
                         int planetsRemaining = NumberOfPlanets - numberOfRimPlanets;
                         while ( planetsRemaining > 10 )
                         {


Online BadgerBadger

  • Sr. Member
  • ****
  • Posts: 339
  • BadgerBadgerBadgerBadger
Re: Helping out with External Code
« Reply #68 on: May 30, 2017, 10:02:09 PM »
Hey Tandrith, I threw a little something together for your Spiral Galaxy notion. It's a bit different; here we have one large cluster, with a bunch of smaller clusters attached to it. I attached the smaller clusters directly to the main cluster for ease of coding.  The smaller clusters use a variety of linking algorithms, so some are strongly connected and others much less so. Does that capture enough of your original idea to be interesting for you?

And for everyone, does this sort of map look like fun? Any other feedback?

Offline keith.lamothe

  • Arcen Games Staff
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,065
Re: Helping out with External Code
« Reply #69 on: May 31, 2017, 12:12:46 AM »
That spiral galaxy map type looks phenomenal.

Part of it is that the darkish-blue backgrounds from Chris are a much better fit to AIW than what we were doing, but the graph itself looks very interesting :)
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Online BadgerBadger

  • Sr. Member
  • ****
  • Posts: 339
  • BadgerBadgerBadgerBadger
Re: Helping out with External Code
« Reply #70 on: May 31, 2017, 12:30:30 AM »
Yeah, the new backgrounds are great. Huge improvement. But the map type is also a really good one I think. I think this map type lends itself to the style of "I'm going to start on one of the arms of the galaxy, then fortify that choke point and venture forth to do battle," which I think is one that a lot of people will enjoy. 

This makes me want to try a variant on clusters where there are "lots" of small clusters. The traditional Clusters map is up to 6 decent sized clusters, but what if there were, say, a dozen or more small clusters connected to each other in interesting ways?

I think between your maps and my maps we actually have a better selection for AIW2 in alpha than AIWC does now.

Offline Draco18s

  • Resident Velociraptor
  • Core Member Mark IV
  • *****
  • Posts: 3,826
Re: Helping out with External Code
« Reply #71 on: May 31, 2017, 10:51:06 AM »
And I haven't even dived in yet. I've got a couple of approaches on the back burner I want to doodle up. None of them are clearly explainable on the forum though.

Offline tadrinth

  • Sr. Member Mark II
  • ****
  • Posts: 415
Re: Helping out with External Code
« Reply #72 on: June 10, 2017, 01:32:36 PM »
Looks like we lost the last few posts in here. =(

I heavily updated BadgerBadger's Octopus map type.  I was happy with my initial attempt, but I did some more tuning and am even happier with it now.

I put the code in a public github repo; Keith/Chris, is that okay?  I'm not sure if the external code is supposed to be public-to-all or public-to-game-owners.

Updated map gen here: https://github.com/tadrinth/AIWarExternalCode/blob/master/src/MapGenerationBadger.cs#L1835

I attached one sample, and here's an album with eight more examples: http://imgur.com/a/kpvd5

Should be super interesting to play on.

Offline keith.lamothe

  • Arcen Games Staff
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,065
Re: Helping out with External Code
« Reply #73 on: June 10, 2017, 02:39:16 PM »
The external code is public-to-all, so you did the correct thing. At some point we may put up our own repo and would ask that yours redirect people to ours, but that may or may not actually be desirable depending on what folks actually want at that point.

I've really enjoyed watching the beginning of community-created code mods with these map types. I wouldn't be at all surprised if more games wind up being played on map types y'all made than ones we did.
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Online BadgerBadger

  • Sr. Member
  • ****
  • Posts: 339
  • BadgerBadgerBadgerBadger
Re: Helping out with External Code
« Reply #74 on: June 10, 2017, 05:55:18 PM »
I feel like there needs to be an efficient way to get community-modded maps into the hands of people who don't want to compile a bunch of C# code. The first ideas that come to mind are to either incorporate some community maps into the base game, or by finding some means of making it "really easy" to obtain new maps (maybe a button at game start for "Find new maps" that allows you to download curated DLLs from some type of "Arcen Curated Community Maps" page).

I think if the bar for obtaining new maps is to download source code off a forum and compile it, well, this will rule out anyone who doesn't want to put in the effort or anyone concerned (and quite reasonably so) about security.