A
A
Alixx2022-01-11 17:51:11
JavaScript
Alixx, 2022-01-11 17:51:11

How to load 3D models on the page in the browser not from the server, but from your folder? Or how to load a lot of 3D models through the browser?

Hello.
We are writing a browser-based multiplayer online game. There was a problem with loading 3d character models, which add up to a large data weight. The client will need to download 30-500mb and even more at a time (at a time) in order to draw all the characters on the map right now. This is a lot.
Is it possible for the user to preload from the server (in the personal account settings, for example, it doesn’t matter) all these models to his folder, so that later during the game he does not have to download the models from the server, but that they are taken from this very folders on his computer?
Is this possible? For example, by writing a browser plugin or js capabilities to connect to a folder? Or something else? Are there solutions for this?
If not, what options are appropriate to deal with this situation?

PHP, sockets, js, webgl are used.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander, 2022-01-12
@alixx

Yes, you can upload models to indexedDB .
You just need to figure out how you will update these models.
You can set an id and version for each model. Then, when you start the game, you request a list like id:version from the server and update local models that do not have the same version.
+indexedDB works in Web Workers. But caniuse reports that there is partial support for ie10-11, but ie10 is not.

G
gintime, 2022-01-12
@gintime

I would dig towards CEF. Based on it, you can make a game client and store all models locally. It is natural to write a check for updating models at startup. the best bundle for this implementation is the CEF+ C# container. You can write a javascript interface for passing data between the client and the HTML page in which WEBGL will be rendered.

T
true, 2022-01-12
@RAFAILgaley

use localForage library (instead of bare indexedDB)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question