Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

We're making Galaxy Garden! (#13)

A topic by Arjuna Gonzales created Sep 02, 2017 Views: 1,678 Replies: 17
Viewing posts 1 to 13
Submitted
 'cause everything is cooler IIIIN SPAAAAAACE!!!



Hey everybody!

Since I’m currently recruiting for a larger 3D first-person stealth game, I figured this was a good way to (a) get my name out there, (b) show I can deliver both as a programmer and designer, and (c) serve as an ad for contract work in case the 3D game doesn’t work out. On to the meat of the blog post!

Deciding on a cartridge

As I’m sure some of you have experienced, there is so much creativity and imagination on display in the Famicase exhibit that it’s hard to pick one title to make a game about. After thinking about what I could reasonably create fun game mechanics for in the time we have, I narrowed it down to two titles: GEO and Galaxy Garden. I made a point, after describing the basic pitch, to ask my two teammates (@KattStrike and @mjcabbages) which one they liked. Katt said she was ok with whatever, and Mike said he would probably be better at Galaxy Garden. Galaxy Garden it was!

That said, during these conversations I reached out to Emily Haasch (@emhaasch, the designer of the GEO cart) and Michael Shillingberg (@heyshilly, the designer of the Galaxy Garden cart) to see if they had anything more to say about, and I did some thinking about what GEO could be. I’ve written down my thoughts on that game in a separate post that people can check out and use for this jam if they feel like it.

Design work so far

I have three goals for this project:

  • Make a game about growing plants from space that is mostly a grow and sell/trade sim, but has occasional action sequences with spaceborne meat monsters.

  • Create a UI for this game to make it easy to port to mobile.

  • [GRAVY] Incorporate permaculture concepts into the gameplay, ex. polyculture, “chop n’ drop”, etc.

When I reached out to @heyshilly about Galaxy Garden, here was his response:


No problem, in fact this is an improvement as I interpreted “farming between worlds” to mean farming on some vague space station. It makes much more sense to farm on a planet, but what should the gameplay look like?

I was thinking about some of the old 80s and 90s space games (ex. Space Rogue (1989). Star Control 2, Solar Winds, the Star Trek TNG games for the Genesis/SNES) that have a UI made to look you’re inside a space ship controlling everything from a futuristic panel. Granted, some of that was just there to save on video memory and only have to draw a small part of the screen, but I want to try to do this in a way that won’t feel too cramped.

As I stated above, I see the most basic gameplay as a turn-based simulation where you apply items (ex. fertilizer, water, etc.) to plants that produce fruit. You do this from a spaceship that can warp between star systems. Loads and loads of other mechanics can be built up from that, but I want to keep things narrow for the limited time I have. I see three menus in which the gameplay can happen:

Main Menu: This lets you select the different planets in the system your space barn (It’s not a space ship! It’s a space barn!) is parked in, and yes I did see history of the entire world, I guess.  There will be icons in those button areas to the right, but this is the limit of my programmer art.


Space Barn: This is your inventory.


Star System: This is your navigation panel


All this design is nice, but how am I gonna program it? Well...

Putting on the programmer hat

Why yes, I did take Software Engineering in college!


For the non-techies in the audience, this is a Unified Modeling Language (UML) diagram. UML is used by programmers as a clunky and weird way to outline and diagram out their code before writing it all up in their editor.

I would start walking through some of this code, but to be honest I’m getting kind of tired as I write this and I still need to write up the GEO post. I’ll likely leave this for another devlog post later.

Btw, I’m using UMLetino (http://www.umlet.com/umletino/) to create these UML diagrams. It’s a pretty straightforward diagramming tool if you’re into that sort of thing.

Wrapping up

Having shot myself in the foot multiple times from overscoping in the past, here’s what I’m aiming for in the time I have:

  • 7 randomly generated star systems. Each one must have at least one inhabited planet and one farmable planet.

  • 5 plant species, each with their own fruit. Time allowing, we’ll tweak them so they have their own requirements.

  • Basic shop mechanics, ability to sell fruit for credits to buy tools/water/fertilizer.

  • [MAYBE] Combat sequence with a Giant Interstellar Hot Dog.

I would love to be pleasantly surprised and have more time to add more mechanics, polish, etc., but I’m not going there yet.

HUGE shoutout to Katt and Mike for teaming up with me, the Famicase designers, Ludonaut,
and dom for this awesome game jam, and JP LeBreton (@vectorpoem) for RTing the AGBIC Twitter so that I could find out about this jam.

About me:

I (@SuperArjunaButt) am a pseudonymous game developer that has been programming on and off since I found QBASIC 1.1 on a 486 in 2001. After bouncing around some non-gamedev tech jobs, I came back to game programming in the summer of 2016, and I feel like a teenager again. This is my first game jam since the early 2000s.

I’ll let the other team members introduce themselves in their own posts if they want, but on music/sound effects we have Katt Strike (@KattStrike), and for graphics we have Mike (@mjcabbages).

Submitted

Before I get into the tech stuff, Mike made some awesome concept art for the five plants we’re starting with. Really looking forward to the sprites!


Ordering stuff from the Constellation Factory…

For the non-techies reading, note that there are a bunch of classes in the UML diagram above to describe the content of the game, specifically stars, planets, plants, and meaties. It’s a common pattern in software development to separate out the code that generates classes like these into a separate class, called a “factory”, which I can tell to randomly generate these things as I need them.

After getting a start on the SimulationManager class and creating a bunch of blank scripts in the Unity editor, I wanted to reach a first testable milestone for my code, and that milestone is the part of the constellation factory class that generates the stars.

As hinted in the pictures above, I’m limiting the game to 7 systems for now, and while most of them will be randomly generated, I have a few constraints. Check out this star classification diagram from Wikipedia

So that players can easily tell them apart, this game will only have class M, K, G, and B stars.

In game fiction land now, The Galactic Department of Agriculture (GDA) divides the four star classes into a set of Space Plant Hardiness Zones (this is goofing on the USDA scale):

Class M and K: Zones 1-3

Class G: Zones 4-6

Class B: Zones 7-13

The zones are based on the minimum amount of photons a space plant can receive (shhh, don't think about the physics too much)

The following plants are hardy to these hardiness zones:

Apogee Apple, Solar Strawberry, Waxing Watermelon are hardy to Zone 1

Ozone Orange: Zone 4

Lunation Lemon: Zone 7

Time and space allowing, we’ll add new plants into these zones.

So there's a sense of progression and challenge:

-Create ONE class M or K star (PLAYER STARTS HERE)

-Create ONE class G star

-Create ONE class B star

-The other stars can be whatever class

This way, you start in a system with a small and dim Class M star with a few plants, and you can buy farmable planets in other star systems to grow rarer plants like the Ozone Orange and Lunation Lemon.

I just finished getting the random generation code done for stars in Unity. I’m going to back up my project next and get started on planets!

Submitted

Uhhh, how does terraforming work in this game?

I got started on the Planet generation code late yesterday and today, which immediately meant I had to answer this question at least somewhat. After five minutes on Wikipedia looking up the speculation on terraforming and deciding to make stuff up, here’s

How to Terraform a Planet in Three Easy Steps:

Step 1: Fire a Solar Strawberry into the core to heat up an inner core, outer core, and mantle, and get them circulating so there’s are magnetic poles.

Step 2: Seed a breathable atmosphere with an Ozone Orange

Step 3: Create the right soil/bacterial mix with Space Compost, a byproduct of the combat sequences with the Giant Space Hot Dog, all for 6 easy payments of $19.99. There might be other ways to generate Space Compost, but this is the one I’m focusing on for now.

More design notes on Planet generation

Because I’ve decided that some plants will not grow around dimmer stars (ex. An Ozone Orange requires at least a Class G star), this has a few implications for the random generation of the planets around these stars, and the three stars in which I am having a heavier hand in their generation (the starting system, the G class star system, and the B class star system):

  • Shops on the inhabited planets will ONLY sell space fruit that grows in the GDA zone corresponding to their star. For example, a shop in a Class M star system will only sell Apogee Apples, Waxing Watermelons, and Solar Strawberries.

    • Shops in any star system will buy ANY fruit, regardless of the GDA zone it grows in.

    • Shops will not sell space fruit, or they won't at least until the player has sold AT LEAST ONE instance of that fruit.  I'll come back to this.

    • None of the above will apply to seeds.

    • This is to prevent the player from skipping ahead and starting to terraform a planet before growing their own Ozone Oranges first.

  • The G class star MUST have a farmable planet, since it will be impossible to grow the materials needed for terraforming otherwise.

  • The B class star MUST have a planet that is either farmable or terraformable.

This leads to my planet generation code. It has a method in the ConstellationFactory class, CreatePlanet(), that decides three mutually exclusive boolean values: isInhabited, isFarmable, and isTerraformable. It then performs three calls to the Random.Range method (think of this as a coin toss, but I get to choose the weight instead of 50-50 all the time) to answer these three questions in this sequence:

  • Is the planet inhabited?

  • Is the planet farmable?

  • Is the planet terraformable?

Because the result of one question has no impact on the probability distribution of the next question, the events are independent, and the probability tree is kind of like a coin toss (again, not 50-50, and I can control the odds from sliders in the Unity editor).

This does open the possibility that the planet is not inhabited, not farmable, and not terraformable. I’m calling these planets duds for now, but I am well aware that that is no fun, and I should add more mechanics later to bring them into the gameplay.  Maybe I can add a mining minigame when you can extract minerals for Space Soil Amendments?

Now the above is one version of CreatePlanet(). I’ve overloaded that function so that I can send it the exact boolean values I want. Elsewhere in the constellation construction, this means I can make sure the player can start off owning a farmable planet around a class M or K star, that there is a farmable planet around a class G star in the constellation, and that there is at least one terraformable planet around a class B star.

To summarize all this, I’m trying to guide the procedural generation of the planets in this game so that the player starts out on a dim class M or K star with a small number of plants they can grow. The player can then buy a farmable planet orbiting a class G or B star with credits earned by selling space fruit, and from there grow Ozone Oranges, which with Solar Strawberries and Space Compost are the ingredients for terraforming.  Then  the player can buy/terraform a planet in a Class B star system and grow Lunation Lemons, which can...

From here on, I think the next milestones involve the creation of Plants, Meaties, and some stuff to handle the shops. All of this as assets start coming in from Mike and Katt.

Submitted

Oh yeah, I forgot to document the percentages I’m using in planet generation. This is almost certainly not final, but I’m starting to like the distribution of planets it creates:

Inhabited: 22.6% chance

Farmable: 28.4% change

Terraformable: 49.9% chance

Uhhh, how do plants work in this game?

Other Unity devs, I have a question for you!

I’m thinking that it would be really cool to store all of the plant data in a separate, plain text JSON file that gets read in at the start of the game. This would make it possible for players to modify their plants, and it begins to open the door for modding. This might sound crazy for a game jam, but I’d like players to be able to include additional plants with their own scripted features. I’ve had a highly superficial look at frameworks like NLua and Moonsharp for my other project, but haven’t had a chance to take ta good look at it.

Have any Unity devs reading this post tried either framework, or some other framework I don’t know about it? What is your experience with them? Where is a good place to start?

In the meantime, I have mostly written the code to read in plant data from a JSON file, and I’ve made some decisions about how stars and plants work.

Let’s come back to stars for a second. This whole system of GDA zones, when combined with different classes of stars and the number of photons (yes, those aren’t individual particles, they’re SPAAAACE UNITS!) they emit, is needlessly confusing. It’s much easier to have ONE NUMBER that determines whether a particular plant can grow there or not.

In the SimulationManager, this large class I have that handles a ton of game settings, all stars generated by the ConstellationFactory will generate between 1 and 3 photons, and they will each get a multiplier based on their class:

Class M star multiplier: 1

Class K star multiplier: 4

Class G star multiplier: 13

Class B star multiplier: 40

This means that a Class M star will produce 1 and 3 photons, Class K between 4 and 12, etc.

Additionally, if a plant get 1 to 2 times the amount of photons it needs, it will get a base yield when producing fruit, but at 3-6 times, it will produce a 50% higher yield. Anything higher than 6x, and it will burn out.

A plant will have three data fields that deal with what it needs to grow: photons_required, water_required, and fertilizer_required. You can buy water and fertilizer at the shops, but a plant will have to get at least photons_required photons from its sun before it can grow.

Here are some guess numbers for the first three plants, in the form of a JSON object in my Unity project:

{ "pdata" : [

{

"plantName": "Solar Strawberry",

"moisture_required": 1,

"soil_fertility": 1,

"photons_required": 1,

"canTravel": false,

"plantState": 0,

},

{

"plantName": "Apogee Apple",

"moisture_required": 2,

"soil_fertility": 4,

"photons_required": 1,

"canTravel": true,

"plantState": 0,

},

{

"plantName": "Waxing Watermelon",

"moisture_required": 3,

"soil_fertility": 1,

"photons_required": 4,

"canTravel": false,

"plantState": 0,

},

]}

Because Unity C# is weird abount Enums, that 0 next to plantState stands for SEED. I had a first stab at the code to read all this in from JSON, and then I noticed about 40 warnings telling me that I can’t create MonoBehaviour objects with new. (in Spongebob voice) Some hacking later (end Spongebob voice), I changed my plant class to PlantData, Star to StarData, Planet to PlanetData, etc. We can handle the instantiated Unity objects in separate classes.

Submitted

And we hit a bump, a pretty big bump, to be filled in with tasty pixels...


Hi folks.  Mike just DMed me on Twitter to tell me that he will not be able to continue with this project.  There are no hard feelings or drama, and we are grateful to him for his concept art with the space fruit.

So we need a new pixel artist.  As you can maybe tell in the previous posts, I've done enough scripting that the game is pretty much ready for graphics assets that I can play around with in the Unity editor.  We will need, at a resolution of 64x64:

5 space fruit sprites based on the five fruit that Mike drew concept art for

At least 4  types of planets: One inhabited, one terraformable, one farmable, and one "dud"

5 space plants, one corresponding to each type of space fruit.

I can further explain over Twitter DMs (https://twitter.com/SuperArjunaButt) or the AGBIC Discord.

Submitted

In case of emergency, break pixel glass

While I and Katt are looking for help with graphics, I decided to do some of the work myself in case things don't work out.  Here's my first (and probably final) attempt at pixel art for the space fruit:

These are 32x32 sprites scaled up to 256x256 for internet viewing.  I'm using the Sega Master System's color palette (with one cheat on the shades of green for the Ozone Orange).  It's the first video game console I can remember playing, and it has a lot of really nice, bright colors for a very bright and colorful game.  You can find a .gpl file to use this palette in GIMP here: http://denilson.sa.nom.br/gimp-palettes/index.html

Submitted

Very cool. I love when games take advantage of a certain color palletes. I'll see if I can't develop some sprites for this, use as you wish.

Submitted

WHOA!  Thank you so much! 

FYI (and this goes for anyone else reading this), the highest priority stuff is the planets.  I need

  • 1 inhabited planet.  There will be a space shop here that you can sell space fruit to.
  • 1 farmable planet.  The idea is that space fruit are too large to safely farm on a traditionally inhabited planet, so imagine an Earth-like planet overrun with plants and vines and other vegetative stuff.
  • 1 terraformable planet.
  • 1 "dud".  It's uninhabited, not farmable, and not terraformable, but maybe there  will be minigames involving them in later versions of the game.

I'm thinking 128x128 resolution, maybe 64x64.  Keep it retro and use the SMS palette.

Submitted

64x64 sounds good. I'll work on the dud first and work from there. Just wondering, but are you planning on working on this past this game jam? Cause it sounds pretty ambitious, and I'd love to see a final project like this.

Submitted

Awesome.  It totally depends on a couple conversations I have going on around my other big project, and how much time Katt (who I can't speak for) is willing to devote to it.  I do really like the places I could take this project, but I can't commit to anything beyond 9/20 right now.

Submitted

no,worries. Ill help either way. Just wondering if I could stick around on the project.

Submitted

Ah, to be young and in love...and made of pixels...

Alright, as you can see in the first post of this devlog, I had the idea that the plants would have 2-4 frame idle animations kind of like old school JRPG characters.  Here they are:  Apogee Apple

Lunation Lemon

Ozone Orange


Solar Strawberry


Waxing Watermelon


Looking these over now, I can see problems with them, but I think any changes will have to wait until after the game jam ends.

In other news, as you can see above, UnevenPixelStudios has very graciously volunteered to work on the dud planet.  Really looking forward to his contribution.

Submitted (2 edits)


Here is my first attempt at a dud planet, could add more detail, but I feel that it will suffice until I come back to it

There is a bit of shading, but I might make the lighter tone brighter

Submitted

Here is a farm able planet. Lots of water,  but not sure If I like the fields on there. any thoughts?

Submitted

The farmable planet is PERFECT.   Don't worry about the fields.
I'm going to call your dud planet the terraformable planet and make a dud planet based on it:


The terraformable planet reminds me of Mars with the use of red and orange.  For the dud I was thinking of something more like the moon, Pluto, or Neptune.  The deep blue isn't there so much to imply water as minerals or other goodies that the player might mine out for soil amendments in later versions of the game.

How should I credit you in the game?

Submitted

You can credit me as "The weirdo who made the art". Lol

Jk, use "Micah Wicker"

Submitted
Will do, you art-making weirdo :P
Submitted

Don't worry about new versions of the planets right now.  Next up is the inhabited planet.