Page 1 of 3

Scripts and Computer Play Aids?

Posted: Sun Dec 04, 2016 2:06 am
by OneMadOgre
It's been a while since I've had an opportunity to play with some code again. I had started some play aids in C#, but the job I had been in had absolutely sucked out my will to code, and I didn't do much with it in the last three years.

So now, I'm at a new place, but it's all open source, so to keep with the developers I have there now, I've decided to flip over to Python so I can teach myself some of that. I've worked out today a Python script that will generate systems and planets (because I like that sort of detail). Is there anyone else working on something similar? Now that the game is out, and there is a forum like the galaxies forum, I feel a little better putting this code out on github. Any interest or other work I could look at?

Output of the python script, such as it is right now, looks like this:

Code: Select all

How many star systems?" 3
Gallus is a black hole system located at (1514,571,92)

Orion is a single star system located at (818,2313,129)
Orion prime, a Class M Red dwarf, it is planetless.

Capella is a binary star system located at (1542,236,91)
Capella beta, a Class D White subdwarf with 3 planets.
   planetsize: 1, BIO: 0, RAW: 2
   planetsize: 4, BIO: 0, RAW: 1
   planetsize: 2, BIO: 0, RAW: 1
Capella prime, a Class M Red dwarf with 2 planets.
   planetsize: 3, BIO: 4, RAW: 6
   planetsize: 3, BIO: 0, RAW: 0

The plan would be to finish up some star creation routines and then hook it back into a web front end like I still have hanging out at

Re: Scripts and Computer Play Aids?

Posted: Sun Dec 04, 2016 2:32 am
by Tyrel Lohr
It's good to see you back! I know what you mean about real life and the day job putting you in a mindset where you just get burnt out on something and need to take time off to recharge.

I think Jay and Garland were working on something in Unity at one point, but I wasn't in the loop on that project.

I also don't see any problem with making play aids available on Github or elsewhere. At this stage I doubt there is going to be anyone that wants to step in and license the system (even when it finishes floating around trying to decide what we want it to do), and that would be the only thing that would ever really be a problem with these kinds of things.

Re: Scripts and Computer Play Aids?

Posted: Sun Dec 04, 2016 2:37 am
by Emiricol
I lack any coding skills, so couldn't help out, but I have plenty of interest in what *you* are doing :)

Re: Scripts and Computer Play Aids?

Posted: Sun Dec 04, 2016 4:00 am
by OneMadOgre
Alright then! First cut for the day is up on github. You're welcome to play with it. Requires Python 3 to run.

Re: Scripts and Computer Play Aids?

Posted: Sun Dec 04, 2016 4:06 am
by Emiricol
I'll check it out next time I dig out my laptop - I don't think I can run it on my Chromebook, but not sure

Re: Scripts and Computer Play Aids?

Posted: Sun Dec 04, 2016 2:20 pm
by OneMadOgre
meh, don't be in a hurry to dig up a notebook. This is just the scripting for now. The end goal is to put the scripts behind a webservice and hook it all up to a website again. Just going to focus on the API calls for a bit before I dive back into the front end. I expect it will be similar to what I've got in C# now on the Azure site.

Re: Scripts and Computer Play Aids?

Posted: Sun Dec 04, 2016 11:02 pm
by OneMadOgre
Updated to conform to the galaxies ruleset for star/planet creation. ...

Re: Scripts and Computer Play Aids?

Posted: Tue Dec 06, 2016 3:17 am
by OneMadOgre
Website getting closer. Going to do some more work on it local before I commit it to GitHub and try Amazon's new Lightsail product.
jsonoutputnow.png (56.89 KiB) Viewed 4406 times

Re: Scripts and Computer Play Aids?

Posted: Sat Dec 24, 2016 2:54 am
by OneMadOgre
Decided I wasn't interested enough in doing it in Python. Back to C#.

API is up and running locally for game creation. Just does the planets, stars per the galaxy rules for now. Going to spend a little time on the front end now.

Re: Scripts and Computer Play Aids?

Posted: Sun Jan 08, 2017 12:35 am
by OneMadOgre
Damn. This interface is smooth. Wish it was mine. ... 25,0.4,0,0

Re: Scripts and Computer Play Aids?

Posted: Thu Jan 12, 2017 4:52 pm
by Tyrel Lohr
Well, $35+ million has to buy you something, right? :)

Definitely a pretty interface.

Re: Scripts and Computer Play Aids?

Posted: Sat Jan 14, 2017 7:54 pm
by OneMadOgre
Man, I think they are $100 million now. It's a very, very pretty game.

But I like strategic simulations as well. My Vanguard can wait.

Used your Fall of Night play through to give me some ideas what screens might look like. To be honest, I'm a horrible UI designer. So I'm mostly just trying to get them to a place where I feel like they are worth hooking up to the APIs.
screen1.png (1.2 MiB) Viewed 4275 times
screen2.png (1.44 MiB) Viewed 4275 times

Re: Scripts and Computer Play Aids?

Posted: Sat Jan 14, 2017 7:59 pm
by OneMadOgre
Holy Hannah. Had to check, $141 Million.

I feel better about my little project.

Re: Scripts and Computer Play Aids?

Posted: Sat Jan 14, 2017 10:51 pm
by Tyrel Lohr
I just hope something ever comes out of that kind of funding and that it doesn't just blow up, for the sake of the people that have dropped way too much money into it. But a lot of it is pretty.

The screens there look good! One thing that I'm still working with is how best to demonstrate that I have a colony in the system versus "controlling" the system by having ships there. I am using the system icon (circle) color coded to denote that I have a colony there, then shading the hex in the background to denote if I control the system because I have a colony or fleet there.

Contested systems are then an oddity because I think if you own a colony it should remain your color, but if not then it should probably turn neutral again. I've been dropping a contested system marker at that locations to show that.

One thing I did in some old campaign was to use a colored radius around the system, similar to how I'm doing the shaded hexes here. Which, looking at the screenshot again, is what you're already doing! That let me readily see what I controlled on the map, and then I could add additional circular markers to denote if the system was contested or blockaded (I think it was like red dotted circle around the system for both, but with some variation to show that "hey, something is going on here!").

For solo games, I've also found it useful to have icons on the map to denote where trade fleets, shipyards, and supply depots are at a glance. I should probably extend it to all convoys instead of just trade fleets, though, as that would make it easier to visually tally raiding chances.

Re: Scripts and Computer Play Aids?

Posted: Sun Jan 15, 2017 1:35 am
by OneMadOgre
Love the feedback. Need to play with it more.

I'm not in love with what I did, but I'm lousy at this, so that's my excuse. Feedback most welcome.
  • Put a border around a system if there are ships in it. Need to work that out a little more.
  • Circle beneath a world is a sum of CAP+RAW+PROD+POP. Something to give you an idea how important the world is. (Also would make colonies bigger just by default.)
  • Jump lanes color coded with your support limits. (These are just winged, I didn't actually look to see if they were correct or not.)
  • Jump lanes dotted for Major, Minor, whatever the third type is called forgot, and Unexplored. Placing unexplored lets me better represent the map.
Can't decide how to denote fleets, shipyards, and stations. All of which feel like they should be. And I don't think the border on the control circle is good enough or intuitive enough to make sense.

But I am enjoying the work today. API side is now generating and reading galaxies. Will end up swapping over your playtest for generated galaxies at some point. (Although I might load your play test back into the database too.)
screen3.png (1.2 MiB) Viewed 4269 times