9

From both performance and storage points single resource file is more beneficial solution (however in practice it's not always really noticeable). The drawback is that it's harder to update and manage. IMO it's not that important usually, just use that is more convenient for you, it's really just a technical detail that should not be considered until you ...


8

String-keying / Hashmaps Are fast, as read time is amortized O(1), meaning that read access is usually very fast, but in worst cases (rare, but not unheard of), it can be quite slow. Worst case results from hash collisions. Implementations sometimes have to be built, or found (for instance, in C). Writing / finding a performant string-keyed map ...


7

I did pretty much exactly what you describe. Here's a run-down of how my system works: I maintain a list of all asset files, along with some meta data. This takes the form of a table of contents (TOC) file at the root of a directory tree that will become the archive. Any file in the TOC is included in the archive, along with any metadata about the file. ...


7

PhysicsFS should be able to handle it.


6

Good guess, XML is not by default the simplest method of storing plain text data. It depends on a lot of things, mostly what existing tools you are planning to use. Some questions to ask yourself before choosing XML: Do you feel XML editors make you (or your team) more productive? (If you are a programmer, used to a text editor, the answer is probably no.) ...


6

Unless you go beyond what can reasonably be stored in memory you don't need an advanced resource manager. That is true for desktop games as well, most "small" games get away with just loading everything into memory at launch, and then it's there when needed. In HTML and JavaScript you don't have direct control of resources in the same way, the browser has a ...


6

I know this isn't a direct answer to your question, but I'd like to drop in that GLaDOS's voice isn't synthesized though - it was recorded by an actual voice actress and post-processed. That's certainly another possibility to consider. And just because I thought it was interesting, here's a video that shows how it's possible to create something that sounds ...


5

Sprite Sheet Packer is a tool initially thought for XNA, but since it exports a PNG along with a TXT/XML with the sprite coordinates (and is easily extended via plugins) it may suit your requirements.


5

Naughty Dog seems to use scheme for describing both the data and how it should be read. However, my knowledge of scheme is non-existent so I have no clue how that would work. This would however, solve my problem, as the data would describe itself see reference. Not something I would recommend if you are a solo developer or a small group of developers. This ...


4

It depends on how many resources you have and how they perform with your game. I recommend to start with a simple solution, which means loading all the assets at the beginning, so you can use them anytime. Once the game performs slowly because of the memory problems consider writing some kind of manager, which will load assets in a smarter way. What I ...


4

Unpacked files make it easier for the user to edit and replace files, making the game much more modding-friendly. This can be seen as an advantage or disadvantage, depending on your attitude towards modding. From a performance-perspective: Loading a lot of small files from the hard drive can be a lot slower than a single, large one, because the ...


4

Since you're looking for a non-realistic voice check this out, if Java doesn't frighten you then there is: http://freetts.sourceforge.net/docs/index.php If it doesn't help then going further back Amiga had a TTS engine built into it that may be available somewhere. Search terms for further investigation would be "text to speech" or "speech synthesis," ...


4

I have no such data, but you haven't mentioned another downside: For me at least, having to download assets separately is very annoying. Also, while the marketplace can download large apps in the background, in my experience it is not always clear whether (or even the case that) I can do other things with my phone while the game is fetching assets, as this ...


4

When the players want to edit stuff, they will find out how. Hardcoding attributes won't stop a determined modder for long. So I would recommend you to do the only sensible thing and put that data in a config file. XML is just one option. Some people prefer JSON or custom formats because they are simpler to write and read. When you don't want to make the ...


4

Back in the days of C and no templates... we had void pointers. Good thing they weren't made obsolete, because you have just seen that templates aren't omnipotent gods. This situation is perfect for some void pointer hacks. Here, I tried to make an example that was as simple as possible: Edit: The example below makes a dangerous use of shared_ptr, please ...


4

I believe this could be an issue with the AssetManager as it uses an objectMap which maps loaded objects to the string used to load them. In this case you're loading the font and the assetManager is storing it in it's objectMap under the key "fonts/Roboto-Regular.ttf", then when you load your font again with second set of parameters the previous font is ...


3

Hardcoding this data as constants in the code would be terribly unpractical, requiring a recompile of the project for every change. Even for small games this is very annoying. To make the game data opaque, you either have to write custom binary formats or pack every text file into a compressed (ZIP) folder. You might even go to the extreme of encrypting ...


3

I believe creating this super editor will distract you from your true goal, to create a game. From the sound of it the editor will be more difficult to create than the actual game. Furthermore I don't believe you need such a tool for your project. An easy way to approach this is by breaking all different resources the game needs into categories and create a ...


3

You want to be able to easily sort by material in order to render everything that has the same material at once. This helps a lot with efficiency. So it's almost definitely a bad idea to store materials by actual value though this may seem handy for some reason. Instead move to some kind of index into a materials array. The rest is fine, logically speaking. ...


3

Easy indeed - you are looking for Asset Bundles, which you can read about here: https://unity3d.com/learn/tutorials/topics/scripting/assetbundles-and-assetbundle-manager In pre-2017 versions, you simply set the asset bundle at the bottom of the inspector for each asset. In 2017, I believe there have been some changes to have a UI that allows you to set ...


2

You seem to have the content file properties right. The next thing that comes to mind is that maybe your redRect.jpg is not in a root of your content project. This would be the issue. If you have the content file in a subdirectory of content project, lets say "textures", you need to specify path to the asset including that folder name like this: redTexture ...


2

Here's another one Sprite Sheet Maker. It's a bit more advanced than Sprite Sheet Packer, but it's not free, unless you're a blogger or a framework developer - interesting license.


2

Most resources (like Texture, if its loaded from file) in libGDX are managed resources. If you load such resource using AssetManager, it takes care of it to be reloaded on resume, but you have to instruct your AssetManager to actually reload your resources. All you need to do is constantly call update() on resume until this method returns true, which ...


2

I agree with Petr Abdulin that the question is too vague. Still, here are a couple of pointers that might help you to improve your design: ItemManager is not needed at all. Use the Active Record pattern: Store item data in a database or XML file and use statements like Item::findById(5) to create item objects. Separate your classes' business logic from ...


2

It really depends on the engine or tools used internally by the developer. The simplest method of storing data is, in fact, XML, or XML-like syntax. The format for models will probably be something different; for example, Unity uses the FBX format for it's models (and it can also import MAs and MBs, Maya's format). The format for textures would be any ...


2

As Adam suggested, you can write your own custom loader which could implement a network connection to any type of server which could download assets during runtime and serve them up. Just implement the file loading interface it provides and request a url as a string for the asset name in the overriden load function and pass that to your downloader. Then you ...


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