The Ship Configuration Door (Part 2)

More work has been done on the ship configuration door. Not much left to do before this door is complete, and then after this there is only one more door left.

I decided to record a video of where I am at with this Starflight remake. Of course, you can play this remake yourself by downloading Unity and the project and building it. But I figure most people are too lazy to do that, and would prefer to watch a video… so here goes:

By |2018-08-06T08:08:30+00:00July 30th, 2017|Starflight|0 Comments

Game Data

Good morning, Arth citizens!

Yesterday, I did some more development on the ship configuration door. Part of this was to add some game data about the ship such as the buy / sell price of equipment, mass, and so on. Then it occurred to me that I should probably tell you all how I am setting up the game data for this Starflight remake.

It’s all quite simple, actually. First of all, I set up all of the game data using Google Sheets. I made this file public on Google and here is the link to view it:

Starflight Game Data on Google Sheets

You will also need a Google Sheets plug-in called “Export Sheet Data” which is free and you can get it by going to “Add-ons” > “Get add-ons…”.

The process of exporting the game data is as follows:

  1. Open up the Google Sheets file
  2. Going to “Add-ons” > “Export Sheet Data” > “Open Sidebar”
  3. Leave all of the configuration settings for “Export Sheet Data” at default settings, except for the following:
    • Under “General”, enable “Replace existing file(s)”
    • Under “General”, enable “Collapse single row sheets”
    • Under “JSON” enable “Export sheet arrays”
  4. Click on the blue “Export” button
    • It will export to a file named “Starflight Game Data.json” to your Google Drive.
  5. Click on the blue link to view the exported file
  6. Click on the Download button (down arrow at the upper right corner)
    • The JSON file will download onto your computer
  7. Copy (or move) the downloaded JSON file, into the Assets/Scenes/Persistent/Resources/GameData folder

That’s it!

Now, when you look at this file within Google Sheets, you will notice that the names of each sheet match the names of the variables that the sheet data is to be loaded into.  For example, the race data sheet is named “m_raceList”, because if you look inside the GameData.cs script, you will see that it has a variable called “m_raceList” of type Race[].

Also, within each sheet, the column headings (data in the first row) all also have variable names such as “m_name”, “m_scienceInitial”, etc. For the race data sheet, you will see that they all correspond to the variable names of the Race class. Doing it this way, my game code can magically load the game data directly from this JSON file with zero manual parsing.

The following are screenshots of this process. Note that the screenshots are of an older version of this export tool, and things have changed slightly since then. The instructions above are accurate.

By |2018-08-06T08:08:31+00:00July 30th, 2017|Starflight|0 Comments

The Ship Configuration Door

Tonight, I made some progress with setting up the ship configuration UI. This UI is a little different than the others I’ve done so far because it has a 3D element (the ship) that is rendered on top of the 2D parts. I’ve had to learn how to use Unity’s render targets to accomplish this. It seems to be working well. There’s not much left to do with setting up the components of this UI before it is time to write the C# code for it. Here’s a screen shot of what I have done so far:

Ship Configuration A

By |2018-08-06T08:08:31+00:00July 27th, 2017|Starflight|0 Comments