Skip to main content
29 votes
Accepted

Wondering if there is a more efficient way to store level data in my game?

You should have the data for your level in an external source, such as an XML, JSON, YAML, CSV, or even a .txt file. Then you write your logic to read from the file, and generate the level ...
Evorlor's user avatar
  • 5,881
8 votes

Wondering if there is a more efficient way to store level data in my game?

String literals An easy way could be to use a string-literal and a function which loops over it and creates the level: ...
Falco's user avatar
  • 201
4 votes
Accepted

Retro-game development - how did 8-bit computers store large level maps and build a screen from them?

Bit of a history lesson... I'll give you some ideas of how this would have worked in general. Bear in mind that in those years there weren't really canonical ways of developing games - it tended to ...
Engineer's user avatar
  • 30.4k
3 votes
Accepted

How to fix the warning "Only textures with width / height being multiple of 4 can be compressed to ETC2 format"?

It's not unusual for the "compressed" sizes of game textures to be larger than the source asset files, because the compression formats we use at runtime in games need to be GPU-readable. I ...
DMGregory's user avatar
  • 141k
3 votes

How to improve load times of audio files without loosing too much quality for HTML5 game?

When you take an audio clip which is already encoded in a lossy compression format and then re-encode it again with a different lossy compression, then any compression artifacts will accumulate and ...
Philipp's user avatar
  • 123k
3 votes
Accepted

Serialization/Deserialization Solutions for Loading & Playing Audio Files

Unity internally uses ogg vorbis for audio - whenever you drop an mp3 into your Unity project, the editor converts it to vorbis and uses that. Importantly, this means Unity can natively decode ogg ...
Luke Briggs's user avatar
2 votes

How to improve load times of audio files without loosing too much quality for HTML5 game?

I will assume that you have exhausted all that may come from encoding and compression. First off, load only what you need next, use a load scene when appropriate. Now, what you probably want is to ...
Theraot's user avatar
  • 28.2k
2 votes

Generate ETC2 compressed texture from Android Bitmap in OpenGL ES 2

Note that while GLES3 mandates ETC2 support, it doesn't mandate that it saves any memory on the graphics card. A lot of implementations that support it simply decompresses the texture in software and ...
Adam's user avatar
  • 7,739
1 vote

Method of compressing tile data

My friend suggests to use an enum and represent each block with a number and work with bytes, reasoning that numbers are faster to compare If you write your files as utf8, then you are effectively ...
idbrii's user avatar
  • 1,088
1 vote
Accepted

Should I compress WebSocket payload data in a game where latency matters?

The time it takes to pack and unpack the data is likely negligible. But there is a different problem: Compression works best when you have a lot of data to compress. So if you want compression to be ...
Philipp's user avatar
  • 123k
1 vote

Should I compress WebSocket payload data in a game where latency matters?

TL;DR: Will compression hurt? No. But it probably won't help you if your goal is a very responsive game. You have two problems to solve with connectivity... Can I get enough data to the client in ...
Tim Holt's user avatar
  • 10.3k
1 vote

How to improve load times of audio files without loosing too much quality for HTML5 game?

Lazy loading. Even if you have 100 levels with unique soundtracks, you probably don't need them all at the start of the game. You can improve user experience by having a loading screen with minimal ...
congusbongus's user avatar
  • 14.9k
1 vote

How to improve load times of audio files without loosing too much quality for HTML5 game?

One option, given with reservations, is to try MIDI. Unlike MP3, OGG or WAV files, a MIDI file is not an audio recording. Instead, it is a set of instructions used to recreate audio on demand. It's ...
Pikalek's user avatar
  • 13.4k
1 vote

Game compression?

Overall those settings look fine, the Max Size is only there to be an upper limit. It won't make the texture larger it's only doing as it says and setting it as a max size. For example, I make almost ...
Tyler C's user avatar
  • 113
1 vote

Loading Collada Files Quickly (three.js, OpenGL, Javascript)

real-time models should have as few polygons as possible. 100k for a model is on the high end. 10k is more reasonable. COLLADA is an interchange format designed for interoperability. You should open ...
Jimmy's user avatar
  • 9,059

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