T
T
Tutucu2020-12-19 22:10:07
JavaScript
Tutucu, 2020-12-19 22:10:07

Where to store sounds, videos and pictures for an online browser game?

Hello everyone, there is an online browser game, it is made using js and html 5. Pictures, videos and sounds are stored in the usual .mp3, .mp4 and jpg/png. The problem is that in the requests tab, I see how they are constantly reloaded from the server. What is the correct way to store these files? Do they need to be handled in some special way? Or are they just going to load up?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Y
yerdnaandrey, 2020-12-19
@yerdnaandrey

On cdn

X
xmoonlight, 2020-12-20
@xmoonlight

Sprite map,
Music and sounds - two files separately (+ the same content: files in a different format)
Sounds - one sound file in different formats: playback navigation - through shift (rewind).
Number of channels - object cloning.
We load everything once, cache it.
Interaction with the server - only json.

S
SOTVM, 2020-12-20
@sotvm

how to set up caching
? google = it is searched for in five seconds (for any cms
and if the server is shitty = then nothing will help
me it works on a free server (there is no load there = no one visits it
(I keep it for myself, for experiments)
sotvm.sytes.net
maybe someone will break = I will be interested)))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question