OK, I made the repo for Artificial Galaxies and put it up. There’s a link for the Corona based versions and a plain vanilla version too. The Corona version demos the borders and a couple of ships grooving along from one star to another.
Repo is here.
I’ve blended some cool stuff into it, specifically the name generating library on GitHub from here.
But let’s start with the fun stuff. Here’s some tests for the plain vanilla Lua examples.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
$ lua plain.lua Creating 20 stars... Star name: Cariredsil Location x:46 y:71 Star name: Galsarthoneth Location x:49 y:259 Star name: Earlitharwë Location x:410 y:228 Star name: Anralevriel Location x:27 y:257 Star name: Caersindaliel Location x:372 y:183 Star name: Cirniradiel Location x:425 y:230 Star name: Berrindammir Location x:147 y:99 Star name: Ilmralelrial Location x:271 y:184 Star name: Armeliledel Location x:472 y:145 Star name: Giliminian Location x:157 y:31 Star name: Caersaeroleth Location x:50 y:74 Star name: Galinebsil Location x:236 y:131 Star name: Aelsindaredel Location x:216 y:2 Star name: Ganmaeganrian Location x:234 y:176 Star name: Feannitholrian Location x:86 y:136 Star name: Galnimadrien Location x:40 y:102 Star name: Farmelebsil Location x:81 y:279 Star name: Garrimirsil Location x:82 y:122 Star name: Elsaerinril Location x:122 y:46 Star name: Armerolrian Location x:370 y:205 Creating 3 species... Name of species: Kohgrech Name of species: Kurrslithe Name of species: Shigshkurrferllch Creating 3 Empires... Name: The Wrathful Industrial Scarlet Legion Name: God's Industrial Green Combine Name: The Bold Southern Legion Creating 5 Ships... Ship name: Ship 1 dockedAt Caersindaliel, destination Galinebsil, belongs to empire The Wrathful Industrial Scarlet Legion Ship name: Ship 2 dockedAt Galnimadrien, destination Armeliledel, belongs to empire The Wrathful Industrial Scarlet Legion Ship name: Ship 3 dockedAt Cirniradiel, destination Elsaerinril, belongs to empire The Wrathful Industrial Scarlet Legion Ship name: Ship 4 dockedAt Anralevriel, destination Caersindaliel, belongs to empire The Wrathful Industrial Scarlet Legion Ship name: Ship 5 dockedAt Caersaeroleth, destination Cirniradiel, belongs to empire The Wrathful Industrial Scarlet Legion |
Sure, it’s nothing spectacular BUT it does show it’s working. The ships’ destination and dockedAt stars are referencing the actual Star objects too, so you can get disco with their x and y locations or any other variables tied to the Star objects. Alter the ‘plain.lua’ file as needed to do your own custom things, and feel free to comment out the print statements in the Galaxy.lua file to get rid of all that junk, I should put a ‘debug’ option in there. Maybe next revision! That way you can see what’s going on. OH one other thing, I relaized the :Serialize functions are expecting Corona based file locations and not LFS locations, so that won’t work. I’ll fix that in the next rev too.
Now, on to the Corona version of the main.lua:
I ran it a couple of times so you could see the borders, the ships moving along, and the cool names of the empires courtesy of that namegen library!! Neat eh?
OK I’ll get to some minor revisions and continue to post when the latest version is up and going.