Premium Only Content
Lets make a unity3d space game - Procedural Planets Update
Hello, and welcome to FiveTwoEightGames lab. It's been a while since our last video on Hubris Solaaris. I've been busy working on our NFT project: Food Fighters.
But it's time to get back to making some progress on our space title. I aim to bring Hubris Solaaris to the blockchain community by integrating NFTs into the game. But for now, i've decided to make a change to the planet generation.
In this video i'll go over what I've changed, and how i changed it.
If you watched the previous videos on the planet generation, you might remember i was going for a blocky style for the planets. And to be honest, i think it looks pants.
After playing with it, it just didn't feel right. I also had some concerns around the performance of the game and although fixing those performance issues would have been fairly trivial, it didn't feel like the right path for the game to continue down the square blocky planets path.
So, since I want the spaceships to be fairly realistic and since we're using mainly Unity Asset store assets for now, it's going to be much easier to go for a less stylized look for the planets.
By using planet prefabs that look more like, well, Planets, It means the look of the game should feel more consistent because the asset store has a lot more assets that blend with our space craft.
So let's take a look at where we left off.
You start the game in the main screen which transitions seamlessly into gameplay. Once you scan for local planets you can pick which one to travel to, from the list of scanned planets.
Since the last video i've added a flight controller so the player can now fly around using the game controller or keyboard. For mobile, we will have to add some UI controls for that at a later date.
So here you have this square planet thing, which honestly doesn't look like a planet at all. The scale doesn't feel epic enough and it just feels wrong.
So i headed over to the asset store and found quite a few planet assets. But the one that seemed to fit the most with what I need for Hubris Solaaris is, Next-Gen Planets one, by Nova Shade. I like how the planet prefabs are already setup and changing the configuration from the inspector is super easy. So i went with this.
The first thing i'll do here is add our planet prefabs as addressables. I'll name them according to the planet composition so we can easily select which planet to load and spawn at runtime.
Next, we need to make a few simple code changes.
The first is to add a new method on the planet factory. I'm not ready to delete the existing method yet, so we'll keep that code for now.
The new method is much more straight forward. It simply creates an instance of the addressable prefab at the specified position.
Next i need a new overloaded method on the game object factory. This method takes the prefab label, which we use as a postfix on the prefab name. This is so that we can distinguish between sprites, terrain and planet prefabs without loading all assets of a particular label.
Finally the last code change is to head over to the main menu code and change the code to call our new planet factory method.
Now let's run that and see what we get.
And of course it didn't work first time as I am using the planet name and not the planet composition to load the addressable. So let's fix that, and run it again.
So no errors, so lets fly towards the planet and see what it looks like.
And there we have it! a much better looking planet with very little effort.
Of course we may need to make some tweaks to this later and address some performance issues with the textures for mobile. But for now i'm happy with this change.
Thanks for watching, and join me in the next video for more progress on Hubris Solaaris.
-
19:30
DeVory Darkins
5 hours ago $5.77 earnedJoe Rogan MOCKS The View as Bill Maher HUMILIATES Woke Scientist
14.3K22 -
LIVE
Scottish Viking Gaming
6 hours ago🔴LIVE | SUNDAY FUNDAY | Jump into my Sons of the Forest Game | DOO EET NOWWA!
1,103 watching -
24:01
Winston Marshall
4 days agoThe TRUTH About The UK Farmer Protest What No One Is Talking About...
42.1K123 -
3:21:56
Tate Speech by Andrew Tate
11 hours agoEMERGENCY MEETING EPISODE 93 - ME TOO!
191K123 -
3:21:42
FRENCHY4185
6 hours agoPRESTIGE AND CAMO GRIND : BLACK OPS 6
45K -
1:29:47
Real Coffee With Scott Adams
6 hours agoEpisode 2669 CWSA 11/24/24
48.7K26 -
13:52
Hershberger's Kitchen
18 hours agoTwo Delicious Dip and Spread Recipes to Try, Inspirational Thought
55.4K4 -
3:41:05
Sacred Sage
9 hours ago $4.16 earnedDaz3D: Attempting to Finish Zoe Conversation!
44.1K5 -
LIVE
OneRandomDolly
7 hours ago[Stream #19 ] Gaming, Chatting, you know the drill!
203 watching -
11:07
TimcastIRL
1 day agoElon Musk Suggests He’ll BUY MSNBC, Joe Rogan Will REPLACE Rachel Maddow
79.7K63