Scripts and Computer Play Aids?

Blue? Green? Red? Refuse? It's time to talk about rules for a new community edition of the VBAM rules!
User avatar
OneMadOgre
Commander
Commander
Posts: 188
Joined: Mon Jun 11, 2012 2:13 am
Location: Mpls, MN

Scripts and Computer Play Aids?

Post 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

M:\python>python test04.py
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


M:\python>
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 http://shatteredgalaxy.azurewebsites.net/
User avatar
Tyrel Lohr
Vice Admiral
Vice Admiral
Posts: 1466
Joined: Thu Oct 04, 2007 3:48 am
Location: Lusk, WY
Contact:

Re: Scripts and Computer Play Aids?

Post 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.
[i]"Touch not the pylons, for they are the messengers!"[/i]
User avatar
Emiricol
Captain
Captain
Posts: 267
Joined: Fri Oct 05, 2007 2:09 am
Location: Near Seattle
Contact:

Re: Scripts and Computer Play Aids?

Post by Emiricol »

I lack any coding skills, so couldn't help out, but I have plenty of interest in what *you* are doing :)
User avatar
OneMadOgre
Commander
Commander
Posts: 188
Joined: Mon Jun 11, 2012 2:13 am
Location: Mpls, MN

Re: Scripts and Computer Play Aids?

Post 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.

https://github.com/OneCleverDude/shatteredgalaxies
User avatar
Emiricol
Captain
Captain
Posts: 267
Joined: Fri Oct 05, 2007 2:09 am
Location: Near Seattle
Contact:

Re: Scripts and Computer Play Aids?

Post 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
User avatar
OneMadOgre
Commander
Commander
Posts: 188
Joined: Mon Jun 11, 2012 2:13 am
Location: Mpls, MN

Re: Scripts and Computer Play Aids?

Post 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.
User avatar
OneMadOgre
Commander
Commander
Posts: 188
Joined: Mon Jun 11, 2012 2:13 am
Location: Mpls, MN

Re: Scripts and Computer Play Aids?

Post by OneMadOgre »

Updated to conform to the galaxies ruleset for star/planet creation.

https://github.com/OneCleverDude/shatte ... eration.py
User avatar
OneMadOgre
Commander
Commander
Posts: 188
Joined: Mon Jun 11, 2012 2:13 am
Location: Mpls, MN

Re: Scripts and Computer Play Aids?

Post 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
jsonoutputnow.png (56.89 KiB) Viewed 11132 times
User avatar
OneMadOgre
Commander
Commander
Posts: 188
Joined: Mon Jun 11, 2012 2:13 am
Location: Mpls, MN

Re: Scripts and Computer Play Aids?

Post 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.
User avatar
OneMadOgre
Commander
Commander
Posts: 188
Joined: Mon Jun 11, 2012 2:13 am
Location: Mpls, MN

Re: Scripts and Computer Play Aids?

Post by OneMadOgre »

Damn. This interface is smooth. Wish it was mine.

https://robertsspaceindustries.com/star ... 25,0.4,0,0
User avatar
Tyrel Lohr
Vice Admiral
Vice Admiral
Posts: 1466
Joined: Thu Oct 04, 2007 3:48 am
Location: Lusk, WY
Contact:

Re: Scripts and Computer Play Aids?

Post by Tyrel Lohr »

Well, $35+ million has to buy you something, right? :)

Definitely a pretty interface.
[i]"Touch not the pylons, for they are the messengers!"[/i]
User avatar
OneMadOgre
Commander
Commander
Posts: 188
Joined: Mon Jun 11, 2012 2:13 am
Location: Mpls, MN

Re: Scripts and Computer Play Aids?

Post 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
screen1.png (1.2 MiB) Viewed 11001 times
screen2.png
screen2.png (1.44 MiB) Viewed 11001 times
User avatar
OneMadOgre
Commander
Commander
Posts: 188
Joined: Mon Jun 11, 2012 2:13 am
Location: Mpls, MN

Re: Scripts and Computer Play Aids?

Post by OneMadOgre »

Holy Hannah. Had to check, $141 Million.

I feel better about my little project.
User avatar
Tyrel Lohr
Vice Admiral
Vice Admiral
Posts: 1466
Joined: Thu Oct 04, 2007 3:48 am
Location: Lusk, WY
Contact:

Re: Scripts and Computer Play Aids?

Post 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.
[i]"Touch not the pylons, for they are the messengers!"[/i]
User avatar
OneMadOgre
Commander
Commander
Posts: 188
Joined: Mon Jun 11, 2012 2:13 am
Location: Mpls, MN

Re: Scripts and Computer Play Aids?

Post 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
screen3.png (1.2 MiB) Viewed 10995 times
Post Reply