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 the same pipeline that loads the data files in the first place. It should be capable of detecting when these core data files are corrupt or otherwise faulty and ...
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 will be higher
Load times are accepted by the users.
There can be other reasons for load times, such as balancing server load.
Generic solutions that can be ...
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 pseudorandom but deterministic algorithm which can generate the properties of every object in the galaxy at runtime just from its position.
So when a player ...
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 from the hard drive
Your XML parser parsing it
Your code which interprets the output of the XML parser and converts it into your internal data structures
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 whole scene is enabled. All Awake() and Start() callbacks will be called for the objects in the scene.
The second step, enabling the scene, is what actually freezes unity, because unity is running ...
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 values and warn the user that "since file xxx failed to load, we are using a generic yyy object."
I see you solved your own problem. However, I would like to explain what are you looking at, and what to look for in an error log like the one you received, in case you get a similar error in the future.
There are many type of error logs, and this one is quite low level. It is difficult to understand what the problem is with a large game with such an error ...
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 -> start game in rapid succession. So there's no reasonable streaming strategy.
In an open world game, you know the player won't move faster than some certain ...
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 Stopwatch:
Constructed 0 s
Awake 2.118 s
OnEnable 2.12 s
Start 2.744 s
First Update 2.919 s
So, it looks like we can trigger a script ...
Was it necessary for a game developer (in Android, game consoles,
online, or in desktop) to display the loading screen to cover
unfinished rendered game environment and to prevent from other users
thinking that this game is either lagging or freeze.
Yes, loading screens are used to hide resource loading and it's somehow a more entertaining way to tell ...
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 applications that have timely constraints, including games (except maybe for storing the game's settings). Even for live data, a simple binary tagged format which ...
(NULL == strstr( (char const*)glGetString( GL_EXTENSIONS ),
"GL_ARB_texture_non_power_of_two" ) )
) //############ it points here ############//
You are creating an OpenGL 3.2 context. glGetString(GL_EXTENSIONS) returns NULL because it has been deprecated in 3.0 and removed in 3.1. It was replaced by glGetStringi(GL_EXTENSIONS, i).
What you're doing is multi-part loading assets, which is extremely common and a very sensible approach. You cannot avoid the 'pause' or black screen though, because the assets have to come down the wire at some point, right?
So all you can do is make this process as attractive and seamless as possible. Either a nice preloader, or maybe showing the next part ...
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 "hot" load assets on demand or replace an asset while the game is running. You might edit scripts with the game running to test an AI performs better, ...
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 seamless solution is just not possible. For example, when the player may select any level in the game to play from, or if they have freedom to teleport to ...
There are a number of factors to approaching this problem, although you are on the right track.
The first approach, as you've already tried, is to load it all at once. This puts all your load time and file I/O up front. As you've already noticed, as a map size grows, your initial load time can become annoying to the user. This also creates an ...
The nomenclature here is definitely odd.
I at first thought you were talking about something lower level (like the scenegraph or screen manager for organizing logic flow and/or rendering). I then realized you are talking about what I would refer to as game state.
Scenes are a popular term for it now with Unity, so I could see why you would call it ...
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 then passes the data to the correct loading/upgrading strategy for parsing.
This, of course, means that you are no longer able to change your savegame format in a ...
Rigidbodies can be said to operate in two modes:
Non-Kinematic has physics driven movement, the physics engine will consider any forces brought to bear on the object to calculate and apply changes to velocity, rotation and position.
Kinematic lacks physics driven movement, the physics engine will not cause this object to move and any forces on the object ...
A few things catch my attention off the bat. First:
filedata = sr.text.Split('\n').Select(s=>s.Split(',').ToList()).ToList();
Feels highly dubious to me. Are you sure this is doing what you expect it do be doing?
float halfWidth = mainCamera.aspect * (mainCamera.orthographicSize/100);
float tempYOffset = (mainCamera....
When building your game, Unity will not include all the scenes by default. Ensure that your scene is included and checked in the build window. The build settings window appears after selecting build and displays the currently selected scenes to be built. You can also find it by selecting File->Build Settings. You may need to add the scenes yourself and then ...
A few things to consider :
What happens after your fake loading screen is over in the case some user has a machine slower than yours? (Which will happen)
Making a loading screen has never been a rule (i do not know if there is "rules" in video game making) but a good practice to prevent users with slower machines to see objects pop on the screen.
If after ...
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 very careful planning, and you need to understand very well what you're doing and not all game developers have the resources to put on it.
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 cannot find information to confirm this, but from my observation, it seems Unity is loading your initial scene while the splash screen is being shown.
On some ...
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 load / process, the more frequently your UI can update. In essence, poor man's multi-threading. (This is how it was done before the advent of multi-core ...
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 that influence our loading times:
IO speed: That one is a hard constraint. You can't influence the reading and writing speed with your code. At least not too ...
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 thought process of your idea:
The cars, people and objects could be edited out and replaced with
digital copies if the same objects for that area
SFML 2.0+ makes it even easier to load a texture;
std::cout << "Could not load" << image2;
glEnable(GL_TEXTURE_2D);//tell OpenGL to use textures when drawing
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 your front image(back layer)
In the middle layer, have a quad with the "loaded" colour, scaled
to some suitably small value on the x axis, then scale it up as ...
LOD on individual meshes is still your best bet, IMHO. It's very well studied and works well for crowds, especially if they are animated individually. At the extreme, you have a single quad (or triangle) with a pre-rendered sprite that's appropriate for the camera angle. This is called impostors in the field. Since we're talking about extreme levels of ...