Sorry about delay, I had some extra fun doing a bonus project along these lines of our artificial galaxy creation, but more on that later.
OK we’ve managed to save out the information for our galaxy, stars, species, etc. Now, let’s load that data back up and display it from scratch. I’ve added the Deserialize() function to the galaxy object, so now it will load everything back up as it was during the last Serialize() call. Remember, it will error out if you try to Deserialize and there’s no data.
I’ve gotta get organized so here’s what I’m planning:
- Create a github repo for this project
- Have it contain a couple of ‘main.lua’ files
- One will be for use with Corona so you can see all the cool graphics stuff if you’re using Corona
- One will be pure Lua so you can roll your own but still have the awesomeness of the OOP galaxy
- Rework the galaxy creation method so you can pass it all the needed data at the beginning (Like number of civilizations, number of stars, species to put in the galaxy, etc…) I did like the idea of a black box sorta option where you just stamp out a whole galaxy, complete with species, empires, stars, etc. but I think at the end of the day the user doesn’t mind doing a little prep work. I’ll refactor everything for the next release.
Now my fun side project I worked on was a Lua OOP version of Stars Without Number, a conversion of the existing Ruby and Python versions.
A Python version is here, Ruby version is here, and my Lua version is here.
What’s cool is like the others I listed, my version only outputs text, keeping it language agnostic, but it also makes it OOP…sort of. All the different things are object classes, such as NPCs, Planets, architectural traits, trade goods, etc., but I don’t have them contained within eachother….yet. I’ll work on that going forward and try to blend some of them together. For now, it just outputs text, so if you were doing a table top session of RPG’ing with your pals, you’d run the app and you’d see somn like this for a description for a planet…a very detailed description:
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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
Atmosphere: Breathable mix Temperature: Burning Biosphere: Hybrid biosphere Population: Hundreds of thousands of inhabitants Tech Level: Tech level 4. Baseline postech. Predominant architectural feature: Subterranean structures Body type: Reptilian Social Structure: Oligarchic Lenses: Journeying,Tradition --- Animal: Template: Insectile Traits: Insectile Killing one causes others nearby to go berserk Group size:7 Animal: Template: Reptilian Traits: Reptilian Body is patterned with both scales and hide Group size:5 --- Political Party: Name: Victory Combine Leadership: Bourgeoisie: the group is driven by a leadership drawn from the middle class and those aspiring to join the elite Economic Policy: Communist: the state should control the economy, disbursing its products according to need and determined efficiency Important Issues: Immigration and immigrants Political Party: Name: Yellow Group Leadership: Proletariat: the working class, both agricultural and industrial, provides the leadership for this group Economic Policy: Socialist: the market should be harnessed to ensure a state-determined minimal standard of living for all Important Issues: Secession Political Party: Name: Southern Combine Leadership: Bourgeoisie: the group is driven by a leadership drawn from the middle class and those aspiring to join the elite Economic Policy: Communist: the state should control the economy, disbursing its products according to need and determined efficiency Important Issues: Foreign relations --- Corporation: Overwatch Cooperative Business: Espionage Reputation: Have a dark secret about their board of directors Corporation: Magnus Zaibatsu Business: Robotics Reputation: Reliable and trustworthy goods --- Heresy: Founder: Defrocked clergy: founded by a cleric outcast from the faith Major Heresy: Primitivism: the sect tries to recreate what they imagine was the original community of faith Attitude: Indifference: the sect has no particular animus or love for the orthodox Quirk: Characteristic item of clothing or jewelry Religion: Evolution: Holy family; God's favor has been shown especially to members of a particular lineage. It may be that only men and women of this bloodline are permitted to become clergy, or they may serve as helpless figureheads for the real leaders of the faith. Leadership: Council; a group of the oldest and most revered clergy determine the course of the faith. Origin Tradition: Ideology --- Prominent NPCs: - Gender: Male Age: Middle-aged Height: Short Problems: Owes loan sharks Job Motivation: Seeks to please another Quirk: Vocal dislike of offworlders - Gender: Male Age: Young Height: Average height Problems: Owes loan sharks Job Motivation: Feels inadequate as anything else Quirk: Booming voice - Gender: Female Age: Middle-aged Height: Average height Problems: Drug or behavioral addict Job Motivation: Seeks to please another Quirk: Scars all over hands - Gender: Female Age: Young Height: Tall Problems: Grudge against local authorities Job Motivation: Religious obligation or vow Quirk: Bald - Gender: Male Age: Young Height: Very Short Problems: Close relative in trouble with the law Job Motivation: Sense of social duty Quirk: Scars all over hands --- Adventure seeds: Psychics are vanishing, including a Friend. They're being kidnapped by an ostensibly-rogue government researcher who is using them to research the lost psychic disciplines that helped enable pretech manufacturing, and being held at a remote Place. The snatcher is a small-time local Enemy with unnaturally ample resources. A vulnerable Friend has been targeted for abduction, and has need of guards. A sudden Complication makes guarding them from the Enemy seeking their kidnapping much more difficult. If the Friend is snatched, they must rescue them from a Place. World Market: =========================== sellingRange 3 Selling: ---------------- Price Per Ton: 30 x Wood: 10 credits 5 x Pretech Parts: 500 credits 30 x Crystals and Gems: 200 credits Purchase Prices: ---------------- Wanted: Illegal Drugs: 1630 credits Polymers: 128.8 credits Unwanted: Pretech Parts: 1265 credits Advanced Vehicles: 2772 credits Other: Advanced Manufactured Goods: 1060 credits Basic Consumables: 18.4 credits Luxury Consumables: 232 credits Advanced Electronics: 1160 credits Pharmaceuticals: 1070 credits Textiles: 36 credits Advanced Manufactured Goods: 820 credits Uncommon Ore: 48.5 credits Advanced Vehicles: 2124 credits Cybernetics: 2375 credits Spices: 52.8 credits Advanced Weapons: 1260 credits Advanced Manufactured Goods: 1080 credits Illegal Weapons: 2175 credits Spices: 48 credits Advanced Machine Parts: 735 credits Basic Consumables: 18.6 credits Biochemicals: 400 credits Cybernetics: 2450 credits Radioactives: 9500 credits Basic Machine Parts: 95 credits Advanced Weapons: 1455 credits Basic Machine Parts: 86 credits Luxury Consumables: 218 credits Crystals and Gems: 192 credits Wood: 8.8 credits Textiles: 30.9 credits Biochemicals: 530 credits Radioactives: 8500 credits Crystals and Gems: 222 credits Pharmaceuticals: 990 credits Biochemicals: 520 credits Pharmaceuticals: 900 credits Uncommon Ore: 48 credits Illegal Drugs: 1470 credits Illegal Biochemicals: 615 credits |
Pretty glorious eh? It’s a great start to flesh out your own ideas for whatever you’d need in an artificial galaxy generator.
OK rock on, and I’ll see you next post.
By the way, aliens: