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

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Helping out with External Code
« on: March 18, 2017, 02:03:43 pm »
Hey Keith/Chris,
     I'm feeling bored today and I'm wondering if there are any small coding pieces that can exist purely in the Externally Moddable code that people in the community could write for you guys, on a purely volunteer basis.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Helping out with External Code
« Reply #1 on: March 18, 2017, 02:17:17 pm »
The main things that come to mind for helping with development itself are UI stuff (refinement of the existing, replacement of the existing, new bits entirely) and balance analysis/changes. Both of those are pretty much wide open in the external code. But neither of those is to the point where you wouldn't be subject to it all going poof fairly soon anyway.

The AI will also be exposed more in external code later, but not much of it is there yet.

There's also turret patterns, but that's largely based on balance and UI considerations.

So if you're bored I'd suggest adding a new map type based on some pattern or algorithm you find interesting. You could start with changing an existing one, and then move to creating a new one from scratch (probably by copying one and replacing the innards).

Thanks for your interest :)
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 #2 on: March 20, 2017, 04:53:08 pm »
I will look into the map generation code as I get the chance.

Also, on another vein of helpfulness, if you have "interesting scenarios" that need to get checked out, feel free to request people to try things in particular. If we can get people in the forums to test things then there's no need for you to do it in person, given that your time is more valuable

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: Helping out with External Code
« Reply #3 on: April 15, 2017, 12:59:23 am »
So I was actually poking around in the MapGenerator code, and I note that each IMapGenerator takes a "numberToSeed", which seems to be the number of planets. However, we don't have a means of controlling that from the start of the game, which makes it hard to experiment properly.

I would add a drop down menu or something to Window_GameSetup.cs for my testing purposes, but I don't see exactly how to pass that information along to the map generator. My guess is that you should be able to get that information into a WorldSetup object, but my attempts to disassemble ArcenAIW2Core.dll to see check the variable for that have failed. If I asked nicely, could you tell me the name of the value in WorldSetup to set to allow me to tweak the number of planets? Or is that not implemented yet.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Helping out with External Code
« Reply #4 on: April 15, 2017, 09:34:38 pm »
Setting planet count isn't supported yet. I'm trying to avoid multiplying balance variables until after there's a real balance to vary.
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 #5 on: April 15, 2017, 10:33:35 pm »
You're totally right, but could I persuade you to put ina "NumberOfPlanetsOnMap" into WorldSetup for silly people like me so I don't have to hardcode my test values in? You don't have to put the gui elements in (so it won't confuse others), I already wrote that for myself before I realized that StartingPlanetIndex wasn't what I was hoping it might be.
« Last Edit: April 15, 2017, 10:38:28 pm by BadgerBadger »

Offline tadrinth

  • Hero Member
  • *****
  • Posts: 507
Re: Helping out with External Code
« Reply #6 on: April 24, 2017, 05:16:15 pm »
*Goes to code for Encapsulated and changes rim planet percentage param from 0.40 to 0.25*

I always thought Encapsulated maps would be more interesting if the rim acted more like a superhighway with very few nodes. Now I can try that out!

As soon as I put Visual Studio on my desktop so I can compile the external code project, anyway. 

Offline tadrinth

  • Hero Member
  • *****
  • Posts: 507
Re: Helping out with External Code
« Reply #7 on: April 25, 2017, 01:18:38 pm »
So I was actually poking around in the MapGenerator code, and I note that each IMapGenerator takes a "numberToSeed", which seems to be the number of planets. However, we don't have a means of controlling that from the start of the game, which makes it hard to experiment properly.

In the map generator methods, you can just assign whatever value you want to numberToSeed.  You can even generate a random number of planets by using Context.QualityRandom.  That way, you can randomize the seed repeatedly in-game and see the different results.

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: Helping out with External Code
« Reply #8 on: April 25, 2017, 01:28:58 pm »
You are right, but I have to close the program, then edit my code, then recompile it every time. It's inefficient.

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: Helping out with External Code
« Reply #9 on: April 29, 2017, 08:53:43 pm »
Hey Keith/Chris! I managed to create a planet style that I think feels pretty cool. It's trying to feel like "solar systems ultra-lite", where we have planets on a ring, each orbited by a few other planets. You have to go via the central planet of each ring to get to the ring of planets, so for people who like choke points it should work well.

If you guys would like to include it in the base game you'd be welcome, I'll happily send you the code (or take feedback). I learned a bunch about how the MapGeneration code works, so if any other aspiring modders wants to poke around in there and doesn't want to bug Keith, feel free to give me a holler.

« Last Edit: April 29, 2017, 09:07:09 pm by BadgerBadger »

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Helping out with External Code
« Reply #10 on: April 29, 2017, 10:07:32 pm »
Neat :)

An interesting refinement would be to have each cluster connect to its two neighbors by the two closest planets instead of center to center. as a lack of line-overlap generally seems to be more pleasing visually, and I think it would be more interesting strategically though center-to-center has its own points there.

And a variant could add a second "ring" of clusters closer to the center of the map, but there's only a few of them, each connecting to cluster N and N+2 in the outer ring (and possibly to other inner-ring ones, not sure if that would be an improvement).

A further variant would be to add a central cluster that connects to each of the inner-ring clusters.

Though it's hard to have that many clusters without a higher than normal planet-count (120 was tops in AIWC), I imagine.
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 #11 on: April 29, 2017, 10:19:08 pm »
Thanks for the feedback! I shall give them a try and see how it goes.

Offline z99-_

  • Full Member
  • ***
  • Posts: 112
Re: Helping out with External Code
« Reply #12 on: April 30, 2017, 11:24:03 am »
Hey Keith/Chris! I managed to create a planet style that I think feels pretty cool. It's trying to feel like "solar systems ultra-lite", where we have planets on a ring, each orbited by a few other planets. You have to go via the central planet of each ring to get to the ring of planets, so for people who like choke points it should work well.

If you guys would like to include it in the base game you'd be welcome, I'll happily send you the code (or take feedback). I learned a bunch about how the MapGeneration code works, so if any other aspiring modders wants to poke around in there and doesn't want to bug Keith, feel free to give me a holler.

This is really cool! Being in a circle, it's like a mini galaxy - which means we need a black hole at the center >D

Seriously though, if one of the more computer savvy Arcenites could figure out a way to put in star models in the center pieces, and maybe change the color of the wormhole lines connecting different solar systems, this could be a BIG addition to the game (I think)

The only question would be to what extent can we change AI behavior based off of planets having certain properties (to bring back the full solar system concept) ...

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: Helping out with External Code
« Reply #13 on: April 30, 2017, 11:03:32 pm »
So the first design was a ring of planets, and each ring had a smaller ring of planets around it (in solar system terms, a ring of suns, each with planets). While trying to make it more visually pleasing, I realized that if I took the main ring of suns and moved that into the center, this is topologically identical to my first design. So take a look at this; it's still essentially the same "solar system lite", with the only communication between the solar systems being through the set of suns, but it is much more pleasing to the eye.

Thoughts?


Offline Draco18s

  • Resident Velociraptor
  • Core Member Mark V
  • *****
  • Posts: 4,251
Re: Helping out with External Code
« Reply #14 on: May 01, 2017, 12:02:39 am »
That actually looks like a rather interesting layout!