1. Rocket Science
  2. News

Rocket Science News

November Developer Update

I wanted to publish a game trailer today instead of the usual update, but I was blocked by a critical bug in the Unity engine, which crashes the build. And because I use only ingame footage in the trailers, we’re gonna have to wait one or two weeks until it will be fixed. On the other hand, It is not that bad, because I will add more content into the game in that time and trailer will only get better because of that. Let's talk about work that was done and need to be done, so I can finally release the game. Note, that there is a link to a small survey at the end of this update. Please take a part in it, it will help me a lot.

This is how the Earth miniature looks like in the test scene in the project (3km radius)

Preparing a game trailer is a kind of preparing to a small release. You need to add enough content, make sure, that everything is looks good and there are no horrible glitches. Also stable 60 FPS during recording is very important, so you need some time, to optimize the game code. On top of that, you need to think about the story in the trailer and what message you want to convey with it. And finally, you can’t waste a time making things, that aren't gonna get into the game.

That’s why it is hard to tell, what exactly was done for the game during past month. I made a lot of small features and fixes, scattered all over the project. Other than that I finally started making content for the game in form of rocket parts, but I'm not gonna spoil them, because they are part of the trailer. And yet I have prepared some things to share with you.

The first thing is a part attachments. I partially covered this topic in the May Developer Update, but there were a few questions I had to answer. The most important one is what to do with the side attachments. For example if we have fuel tank, there will be at least 5 different ways to connect something to the sides of it.

Here is a top view of the fuel tank and six different types of side connections to it.

Due to the fact, that all attachment points is preconfigured and precalculated, they can not be added to the rocket part dynamically. But representing every type of connection by separate item in the assembly shop UI means adding six same fuel tanks with the only difference in number of attachment points. Which adds a lot of clutter and not very intuitive. After some trial and error I found a good solution: part configuration.

Thus, in the case of fuel tank above a small icon will appear on the part UI, which means that this part is configurable. When you click on it, it will show available options.



The great thing about this, is that you can have different types of configuration per part. For fuel tank it can be not only number of attachments, but type of it contents: only fuel, only oxidizer, or both in right proportions. Obviously, these choices will have an impact on the flight characteristics of the rocket part. For example, even for different number of attachment points each variant will have slightly different mass and air drag. And I'm not even talking about the types of fuel tank content, because it opens up so many possibilities to build your spacecraft.

One interesting thing I learned from modeling rocket parts for the game, is how precise they have to be. Because the shape of parts matters and is involved in the physics calculations, even a small asymmetry can lead to instability and unpredictable behaviour of the whole spacecraft. Usually I am a little bit of perfectionist when it comes to modelling. But in this case it's really justified, especially for the parts that put rocket into orbit.

Another good task, that I did and can show something is improvements to interpolation algorithm of planet geometry generation. Earlier, you'd have noticed pixels on the planet due to the fact, that heightmap has finite resolution. Now everything is smooth.

Before the change

After the change

As for the future work on the game, it comes to making content and establishing the game loop and preparing to the release in Early Access. The only two systems, that are missing right now, are the direct flight controls and contracts system. The first one brings more fun into the game, if you don’t wanna plan your flight ahead, and want to just fly around and explore. The second system is needed for the Survival mode, where you should actually earn the money to pay salaries and unlock new rocket parts and buildings to keep your space center going. It worth to mention that the second mode will be Sandbox, with everything unlocked from the beginning, for those who like to have fun and experiment on their own. Both systems are not that hard in implementation, so I don’t see any big problems with them, compared to the rocket physics, for example.

For the preparing to the release, I need some data from you - my core audience. What hardware are you using and what are you waiting from the game the most. I can then set priorities correctly and concentrate more effort on the important things. So, to help me to do it, please take part in a small survey.

Thank you, stay tuned and wait for the trailer with the release date announcement in it! It will be published soon™.

October Developer Update

Hello, friends!

This month I made a great progress developing the game. I spent it almost exclusively on physics, implementing things I mentioned it the previous update. And everything worked out almost exactly as I planned and I did even more than I could have imagined. So, without further ado, let’s talk about it.

Some rockets were hurt while preparing this update

Rocket physics

The only good way to support timeline and time rewind is by representing the spacecraft with one physics body. But since the spacecraft is made by player and consist from different parts with different shapes and masses, I needed a good way to account for it in the simulation. Otherwise, you will immediately feel, that the physics is not correct. I solved it by calculating the forces that affect every part individually and then applying them at the right positions of rocket's body. So, if you will not balance your rocket right, and there is not enough auto stabilization force, it will eventually start flipping to the side with greater mass.

Aerodynamics

I used USSA equations for the atmosphere model. Since Earth and Solar system are in real scale in the game, the equations was not modified in any way. The only difference is that Earth atmosphere in the game ends at 110 km, where the pressure is so low that it can be neglected. The surface area and dimensionless drag coefficient are pre calculated for each part, which means that the shape of spacecraft will affect it flight characteristics. The approximations I used for calculating drag forces give decent results and have a good performance. But I am open for the better drag models in the future.

Collisions

This was the hard one. All collisions are handled by PhysX. And there is always a tradeoff between accuracy and performance. If the collisions were solved even a bit incorrectly, spacecraft will be immediately launched with 10x speed of light into abyss, because bodies has huge masses and moving with the high speed in the simulation. One small error and the whole experience will be ruined. But if you increase accuracy too high you will receive a poor performance and angry players. While I found a decent settings for collision solver, I will expose some of them in the game settings, so everyone will have chance to tune the game to their computer capabilities. Here are some funny gifs before I tuned the PhysX and fixed tons of bugs.

A simple collision with the ground threw a ten-ton rocket, as it was made of plastic

Here collision between two parts of rocket send both to the orbit of Pluto

What else?

For now the water physics is missing. I wasn't be able to quickly find the good algorithm for that. I could use the same drag model as for atmosphere, but with higher density, but I don’t think this is the only and right solution. So I will continue investigate this topic after release. For now there are two options: every spacecraft will immediately explode on the contact with water. Or it will just ignore the water and fall though it. I like the first option more, because it destroys immersion to a lesser extent.

Also I didn't implemented wings yet, but I will do if I will have time for it.

Not only physics

When I got tired of fixing physics, I switched off to another area of the game. The first one was stars. Initially I used simple texture for it. It was huge (almost 8 Mb with the resolution of 8192 x 4096), but even with that stars looked blurry. Also all of them had the same color which is far from reality.

Old stars

So I implemented own starfield system using the real world star database, which includes more than 110k stars. Every star now uses a color, brightness and position from that database. Even with 65k stars all the data occupied only 2Mb of memory, but you usually don’t need this many. You can see about 6000 stars with your naked eyes. And again I will expose starfield settings, so you can change the stars count. maximum brightness and exposure how you would like. The only thing I am missing now is the Milky Way, But I will make it sooner or later too.

New stars. It is better to compare both images in full-size in the browser

The second one is the orbit rendering. Initially I used builtin Line Renderer, but it was not good, when the orbit was far enough from the camera.



Well, time to implement custom orbit renderer!

It is better to compare full-size images here too

At the end of this month I felt like I created my own game engine for the flight simulation. Almost everything is custom: planet generation, orbital mechanics, drag and gravity, starfield and even my own version of the line renderer. Funny enough, I got around 80 FPS in the flight on my computer (i5-4590 and GeForce 970), where so many different calculations happens. And only 55 FPS in the spaceport, where nothing complicated is going on, just a bunch of objects and light sources.

It’s time to finish this update. I will leave you a gif where you can see the result of all work done in this month. It looks so simple, right? But it was not easy no get there.

Note: the gif was recorded on 5x time warp

September Developer Update

Hi there!

September was a very productive month for me. It is much easier to work, when there is overcast and +5 °C outside. During this month I managed to solve the most difficult task in my life: the rocket physics.

Let me explain. As I have said many times, the ability to plan flights ahead and perform them without direct player control and the Solar System in real scale are the main features of the game. But it also imposes several limitations.

For example, due to floating point precision of PhysX all physics calculations for rockets with running engines should be performed no further than 10km from the world's origin. Otherwise, the accumulated errors during calculations will lead to huge jittering and in the worst cases the Kraken will appear and destroy your ship. This is usually solved by constantly moving the world around the ship, so it stays near the origin all the time.

Imagine this sphere is actually Earth. Then the size of the area, where spacecraft could flight before shifting the whole world will be less than one pixel!

But here is the problem. Imagine two ships, one orbiting Mars and one near the Earth. The average distance between them will be around 225 000 000 km. And it happens that both turn on engines at the same time. What to do in this case? It is impossible to move the world in such way so both ships were simultaneously in the world origin. Well then we must sacrifice one of the ships, by moving another to the origin, because the error would be so huge, that first ship will instantly crash into the planet. Or the game should not allow that situation. But this ruins the whole point of the flight planning.

Initially I tried to implement simple flight physics in double precision on my own. It worked good for small rockets with one engine and gave extremely precise results. But the were much more cases that I needed to handle:
  • Several engines with different positions and angular forces they cause to the rocket.
  • Basic aerodynamics, where shape of the spacecraft will affect its movement in the atmosphere.
  • Collisions with the surface and other ships.

There were no way that I could ever handle all these cases in reasonable time and develop them without going crazy. And I could not release the game without these basic things.

So I started to search solutions. And after three months the solution came from the unexpected side. Less than a year ago Unity released the Multi-Scene Physics (or Multi-Word Physics) support. It means, that I could run several invisible physics simulations at the same time and they will not interact with each other. So in the case of two ships above I just needed to create two Physics Worlds, place physics representation of rockets into them, move the world in each simulation so that the ships are in the origin, perform calculations and then synchronize the results of the simulations with the visible world. Sounds simple, right? Of course it is hard as hell! But it was much simpler than reinventing the physics engine.

Here spacecrafts are far from each other and both simulated in separeted Physics Worlds (big green spheres)

But how ships will interact with each other, if they placed in separate simulations? This an interesting question. If the two or more ships are approaching each other and the distance between them become less than 6 km I will put them all in one Physics World. If the distance exceeds this number, I’ll move them back to separate simulations. And because I perform all calculations for whole rocket and not to its parts it works pretty good even on my 5-year PC. Obviously, there is a big room for performance improvements. Which will be one of the main tasks in the Early Access.

Now they are close and we are moving second spacecraft in the simulation of the first one

There are still a lot of work with this system. For example. I’ve solved different engine configurations and partially atmospheric drag at this moment. The collisions need to be implemented, but now I see the way and feel confident, that it would work. And, of course, there are tons of physics bugs waiting for the fix. Maybe I will prepare some funny gifs with them next time.

Thanks for attention and don’t forget to join our Discord community!

P.S. Valve have changed Steam algorithms two weeks ago and game’s store page traffic went almost to 0 after that. So, if you have friends, who love space and rockets, please send them link to the “How do you like it, Elon Musk” page. You are my only hope.

August Developer Update

Greetings!

Today will be a short update, because I am at small vacation right now, visiting my grandparents. They happen to live in such place of Russia where stable Internet connection is rare than a good indie game on Steam these days. But I found a base station deep in the fields and managed to write and publish this update.

This is also the place to draw inspiration from and get good references for the development

The first thing I am excited of is recent announcement, that High Definition Render Pipeline (HDRP) will be out of preview this autumn. HDRP is a high-fidelity next-gen render pipeline built by Unity to target modern (Compute Shader compatible) platforms. It provides great new tools to author content, like a Shader and Visual Effect Graph, solid API for high performance custom rendering systems, and a lot of features from volumetric lightning to subsurface scattering. I started to use it a year ago, when it was in alpha stage. Even in that early stage it gave good results. And now Unity Technologies promises, that HDRP will become stable just before the HDYLIEM release! So I started updating the game to the latest version of Unity to get the stable HDRP as soon as it will be ready.

Example of volumetric lightning in HDRP

Secondly, I’ve added the Moon heightmap into the game. It was easier than I thought, so the next in line is Mars. I have also rewritten the planetary configuration system, so every planet will be present in the Solar System even there is no heightmap or textures for it yet. Such celestial body will look like a white sphere, but you will be able to land on it anyway.

Test scene with the Moon heightmap applied

The last thing is the planet texturing system. The old system supported only 16 materials (which is nothing for real scale planet), produced poor results and have no room for configuration and future improvement. So I had to develop a system that would procedurally select materials based on set of easily configurable parameters. I researched how it was done in other space games and in the popular libraries on the market and came up with my own solution.

I’ve developed procedural texturing module for planets that includes a configuration file which supports 32 layers of materials (and I can increase this number up to 64 in the future). These layers work like in Photoshop, but they have a bunch of parameters, which controls if the material will be placed on top of the previous one or not.

Inspector that I use to configure procedural texturing

As you can see, there are four main parameters for each layer now: height, slope, temperature and humidity. Each of them is a curve which specifies the probability of material selection depending on the parameter value. There are more parameters in the config for granular tweaking of each material such as weight, tint and blending contrast. This config then encoded into texture and passed to the shader. And finally, the shader decides which material to use at this particular point on the planet's surface. Combination of all parameters with the addition of some noise function give the results I like. Moreover all these configs were built with the mods support in mind, which I will add into the game as soon as API and feature set are stabilized.

Another test scene with the procedural texturing. Here only three materials are blended together, and there is already no tiling and repetition


That’s all for now, I'll try to get out of the field, and I wish you a productive autumn!

July Developer Update

Hello friends!

On August 1st, 2018 I decided to leave the prototype of the isometric shooter I was working on and make something small in one or two months. I started with a 2.5D arcade about launching rockets into space, where you were able to collect resources, bonuses and boosters during the flight and then spend it to upgrade your spaceship or buy new parts for it. And I don’t know how it has happened, but here I am, a year later, working on one of the biggest and ambitious games in my live. The great news is that the game vision has not changed since January, when the first Dev Update was also published. And I am slowly but steady getting closer to the goal.

Prototype of the game that I abandoned for HDYLIEM

As for development, I need to work on three main areas. First of all is the game sequence, which is important not only for the release, but for early playtests too. It is the hardest task I have ever had, because the first three hours of the game in Early Access will determine the future of the game in store. This includes compilation of all game systems into solid gameplay and making content for it as well as creating tutorial and hints for all of that. And I can’t even send the game to my friends to try it out before the tutorial will be developed. And it is hard to make the tutorial, when you not sure if some particular parts of the game is working as intended. But sooner or later, I will figure it out.

The second one is to brining all game systems to the “ready for Early Access” state. For example, I am happy with the planet generation system, but I am not satisfied with the planet’s rendering. There is an annoying tiling on the surface and lack of different materials. I need to develop a texture layering system to remove tiling and give the biomes more natural look. Another example is the water, that looks like this in the game right now:

Not great, not terrible

I found a several good water shaders, but they work only on planes and need to be rewritten to work with planets. This is very interesting task and it will be really exciting if the water in HDYLIEM will look like this:

Good water is usually 1/3 of the success

Another thing about planet generation is that I found the way to increase the heightmap resolution from 8192 x 4096 (the max allowed by Unity) to pretty much unlimited. The only limitation is the memory and disk space. For example, I found and will use 43200 x 21600 heightmap for Earth, which means that instead of 4x4 km area, one pixel of heightmap will cover 0.7x0.7 km! If you know, where I can find heightmap with the higher resolution, please let me know in the comments.

This is the part of heightmap with the Himalayas. You can even see rivers here.

Every other game system has some things that need to be finished too. For example, I need to implement patched conics for orbits, to show the spaceship trajectory, when it is leaves or enters the sphere of influence of the celestial body. Direct controls for flights without flight plans need to be done too. And there are a whole bunch of spaceport building, flight planning and rocket assembling tasks waiting for my attention. But the great thing about this is that I can switch between them every time I tired of the previous one. They all are completely different and each of them brings an unique set of problems and challenges.

The last one is the polishing pass that includes sounds, effects, optimization and quality of life features, like game settings. Unfortunately I haven't even touched this yet, but I finally started to think about this it, which is a good sign.

Every day the game is one step closer to what I imagine in my head. Not only this, but my passion for space, as well as your constant support, helped me to overcome this year-long journey and keeps me going. Thank you and see you next time.