Skip to main content
Share Your Experience: Take the 2024 Developer Survey
42 votes
Accepted

For a custom game engines, what should I do if my core data is malformed or missing?

Log an error and gracefully exit. Ideally, display a human readable error on screen as well. There should be a core pipeline of hard coded functionality that operates without these data files. It's ...
House's user avatar
  • 73.3k
34 votes
Accepted

Couldn't all games avoid post-start loading?

The answer is yes, this could be done, in most cases, at least to some extent. The reasons it isn't done are many: It requires time and money to do it right. The amount of bugs that pass testing ...
Peter's user avatar
  • 9,925
32 votes
Accepted

How can I efficiently load huge volumes of star systems?

The trick Elite likely uses is that they don't pre-generate the whole galaxy and store it in a database. They likely generate most of the galaxy at runtime when it is needed. I would do this using a ...
Philipp's user avatar
  • 120k
26 votes
Accepted

How can I speed up slow loading of big levels?

First of all, you should measure where exactly the bottleneck is so you don't waste time improving things which are already good enough. The bottleneck could be any of these: Reading the XML file ...
Philipp's user avatar
  • 120k
23 votes
Accepted

Smooth loading screen between scenes

When you load an scene with SceneManager.LoadSceneAsync() there are actually two things happening: The gameObjects of the scene are loaded into memory. Then the ...
Leo's user avatar
  • 1,585
11 votes

For a custom game engines, what should I do if my core data is malformed or missing?

Byte56 mentioned one option. There is at least one other: Assume default values and display a Warning. Depending on the nature of your data, it might be perfectly acceptable to assume some default ...
Octopus's user avatar
  • 269
10 votes
Accepted

Can I run my own loading script during the Unity splash screen?

I just did some tests, and I found that the constructor for objects in the first scene actually gets called while the splash screen is still displayed. Here are some timings I measured with a static ...
DMGregory's user avatar
  • 135k
10 votes

Couldn't all games avoid post-start loading?

If your menus have a ton of assets, those assets take time to load. You also have no idea what order people will navigate your menu. They could click options -> back -> credits, or credits -> back -> ...
Almo's user avatar
  • 6,678
7 votes

How can I speed up slow loading of big levels?

Despite it being used for virtually everything, and despite it being used even in high-volume, low-latency applications, XML is an abysmal format for almost everything, but in particular for ...
Damon's user avatar
  • 1,384
6 votes

For a custom game engines, what should I do if my core data is malformed or missing?

It depends on whether this happens during development or release. During development, you will have all kinds missing things, errors, and mess-ups, constantly, all the time, and you may even want to &...
Damon's user avatar
  • 1,384
5 votes

Couldn't all games avoid post-start loading?

A big factor in the feasibility of such a solution is the predictability of what needs loading. If the player loads entirely new levels with no way of anticipating what they will choose, a completely ...
Jibb Smart's user avatar
  • 2,460
5 votes

How can I speed up slow loading of big levels?

There are a number of factors to approaching this problem, although you are on the right track. Single Load The first approach, as you've already tried, is to load it all at once. This puts all your ...
Stephan's user avatar
  • 1,728
4 votes

How can I implement versioning into a save system?

You could add a version number to your savegame file format itself. The savegame loader loads the savegame file as plain data, checks the version number which it expects in a specific position and ...
Philipp's user avatar
  • 120k
4 votes

Is it better to load all of the scene at once or load small parts of it as the player moves?

When your game scene becomes so large that you run into performance and/or memory problems, then it can make sense to divide your world into separate scenes and only load those around the player. By ...
Philipp's user avatar
  • 120k
3 votes

How can I speed up slow loading of big levels?

Let's have a look at smart... what is smart exactly? You state that you use XML as a format to store your levels. XML is a hierarchical format that is stored into a file. Thus we have 2 main factors ...
dot_Sp0T's user avatar
  • 2,032
3 votes

Can a loading screen be implemented using one thread only? If so, how?

You basically have to break down the loaded data into smaller chunks, and intersperse UI updates in between those bits of processing. The finer the granularity of the chunks of data you synchronously ...
Engineer's user avatar
  • 29.9k
3 votes

Can I run my own loading script during the Unity splash screen?

Your best bet is to make your own loading screen and set that as the initial scene. Then, from that simple scene, use the Scene Manager to load the next scene in the background, asynchronously. I ...
Stephane Hockenhull's user avatar
3 votes

Couldn't all games avoid post-start loading?

Time. You need time to save time. Or you need money to make up for the lack of time. In any case, "No loading time!" is a feature that only those who have the luxury to afford it can offer. It takes ...
Vaillancourt's user avatar
  • 16.3k
3 votes

Add Existing Animation

Here is how I fixed the same issue: Open the animator window Click on the game object that has the animation In the animator window for that game object, the original animations you set should still ...
NiNjA Chronicles's user avatar
3 votes

Google street view racing game?

This is, in a way, available from Google via their Google Maps Platform. The data provided by this platform is a combination of aerial, satellite and street view data. I'm not sure how far down the ...
House's user avatar
  • 73.3k
2 votes

How do I make a progress bar with letters that get "filled in"?

If your ui system uses a layering concept you can do this: Have an image with the letters having alpha of 0 (front layer). Have a quad which is the "unloaded" colour, scaled to the same dimensions as ...
Ian Young's user avatar
  • 2,649
2 votes

Quickly Converting RenderTexture to Texture2D in Unity3D

You can't do anything to prevent the freeze. The Texture2D.Apply() method is expensive. The larger the texture dimensions, the longer the freeze. You can't ...
Ruslan L.'s user avatar
  • 121
2 votes

Couldn't all games avoid post-start loading?

One reason dynamic loading isn't always the ideal solution that other answers haven't really considered I think is also pop-in and other graphical artifacts. The prediction of what to load and what ...
Waddles's user avatar
  • 201
2 votes
Accepted

Loading settings files better?

risk of crashing if someone edits the file incorrectly If the configuration is invalid, then it should not work. You should verify if the data on the file is valid (e.g., It has all the fields, it ...
Theraot's user avatar
  • 27k
2 votes

Couldn't all games avoid post-start loading?

Ultimately, it's limited resources. Open-world games and especially MMOs are heavily crafted toward predictability - you always know what data you need to load well in advance. You can see this in ...
Luaan's user avatar
  • 890
2 votes
Accepted

DDS load texture and cubemaps

I found my error. The vertex shader outputs the homogeneous clip coordinates with SV_POSITION semantic before the model space position with POSITION semantic. The Pixel shader reads the input position ...
Luca's user avatar
  • 143
2 votes
Accepted

Loading sprite resources from nested folders

When in doubt, always read the docs for the methods you're using: Description Loads all assets in a folder or file at path in a Resources folder. If path refers to a folder, all assets ...
DMGregory's user avatar
  • 135k
2 votes
Accepted

How can I display a loading state until a song loaded with www.GetAudioClip() is ready to play?

This can be done with a coroutine you start by calling StartCoroutine(LoadSongWithLoadingScreen(songURL)); ...
DMGregory's user avatar
  • 135k

Only top scored, non community-wiki answers of a minimum length are eligible