Dev Diary 6: Completing the Arth Starport for Starflight: The Remaking of a Legend

For discussions about the new Unity SF1 remake by Marvin Herbold
Post Reply
User avatar
Blake00
Posts: 51
Joined: Wed Jul 08, 2015 11:20 pm
Location: Australia
Contact:

Dev Diary 6: Completing the Arth Starport for Starflight: The Remaking of a Legend

Post by Blake00 » Fri Jan 11, 2019 5:48 am

Welcome pilots! This dev diary covers Marvin completing work on the big Arth Starport and all its departments for his Starflight: The Remaking of a Legend project. During this period Marvin sadly abandoned the project believing no one cared (turns out his blog was not listing in google) but a year later in 2018 Michael & Blake found his project and successfully encouraged Marvin to bring the project back to life! Next article will cover opening the docking bay doors and setting off into space!

The Ship Configuration Door
(Originally posted by Marvin 27/07/2017 HERE)

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:
Image



Game Data
(Originally posted by Marvin 30/07/2017 HERE)

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.

Image Image Image Image ImageImage Image Image Image



The Ship Configuration Door (Part 2)
(Originally posted by Marvin 30/07/2017 HERE)

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:





Risen From the Dead!
(Originally posted by Marvin 03/08/2018 HERE)

After this project has collected dust for a little more than a year, I have decided to resume working on this Starflight remake.

You may be wondering why I stopped, and what made me pick it up again. The reason I stopped was, quite honestly, I got a bit bored. This project was a bit too easy to do and not very challenging, and after it has served its purpose of helping me learn Unity, I just decided to quietly abandon it. After all, I thought nobody cared. But then a few days ago, out of the blue, someone sends me an email saying some very nice things about the project. He also showed the project to a Starflight Facebook group and all of a sudden I had a little fan base. So, that was what made me decide to continue working on the remake!



The Trade Depot Door
(Originally posted by Marvin 03/08/2018 HERE)

Over the past week, I have worked on the final door – the trade depot. I am proud to say it is completely done!

The trade depot allows you to buy and sell elements, as well as buy and sell and analyze artifacts. Everything is working. The trade depot remake remains pretty faithful to the original game.

Next up, I need to revisit the ship configuration door to finish up what I left unfinished last year. Then that would be it for the spaceport, and it would be time for the launch sequence!

The original game
Image Image Image

The remake
Image Image Image



The Ship Configuration Door (Part 3)
(Originally posted by Marvin 03/08/2018 HERE)

Well, that didn’t take long at all.

It took me less than an hour to finish up the ship configuration door. Most of the code was already there from when I built the door a year ago, and all that was left to do was just wire it up with the UI controls. Now you can buy and sell all of the parts to improve your ship. The only thing left to do here really is the repair feature which I do not plan to touch until much later – after aliens can actually do any damage your ship.

Here is a little screenshot of the updated ship configuration door. Note the graphics for the laser and missile turrets as well as the shield.

Image
Image
http://blakessanctum.x10.mx/Games/Starflight
Blake's Sanctum - Starflight Series: fan page containing pics, vids, info, walkthroughs, & fan games!

Post Reply