Hot answers tagged

23

It's not clear by your question if you really want to know techniques that allow games to save disk space even when having large amounts of heavy image/resource files (that's what is in the body of the question), or if you just wanna know if there are less disk-space hungry ways of doing animation for your buildings (that's what is implied by the title of ...


7

Here are few pointer you can use Try to make sure all your Background and non transparent images are not in PNG format Try to have all animation loop-able i.e. if animation is 1,2,3,4,5,6 try to make it like 1,2,3,4,3,2,1 where these numbers are frame number of animation, it helps a lot if many image are same and only color differs (generally UI buttons,m ...


7

I would propose that you try TexturePacker you can simply drag and drop all your images and get them packed you can apply different compression - e.g. use indexed PNGs which consume way less memory - up to 70% less compared to a standard PNG file you can create a file data files that contain the name + position of each of your buildings the free version ...


4

Normally you would load your images on-the-fly from a normal file then pass the decompressed pixels to OpenGL, but I'm also fond of embedding resources into the executable :). For an extreme example, see my PS2 game. The whole thing consists of a single 4 Megabytes executable, all assets built-in. What I did, and you can also take the same approach if you ...


4

I came to this site looking for a similar question and there are indeed a few good resources pointed both in the answers to your question and in other questions. You should probably take a look at 2D animation: Animated 3D models or sprites with animation frames? for some debate on different types of animation. It helped me optimize my game. Also, you don't ...


4

A lot of games don't keep their graphical assets in the .apk; they only include the "basics" like UI graphics and the game code and download the rest of the assets once the game's been installed. This is especially true for games that use different graphic resources depending on the resolution of your display to keep the .apk from having to contain both ...


3

Get the simplest possible example that approaches your expected complexity, running. Code up say 5-6 considerably different behaviours, make entity count variable, and then test at different counts, optimise, and scale up from there. You cannot do game development without prototyping, it is the nature of this profession. You can reduce the complexity of your ...


2

Break the grid into chunks of 2d map. If you have some bounds theb store these chunks in a higher level grid and read/write the chunks to disk as they come in and out of the active area. If you truly have an infinte area store the chunks in a hastable instead but remember to remove chunks that are out of the active area or else the hashtable will be too ...


2

Depending on your needs, you could just serialize a Dictionary to a binary file. I can post some code after I get home, but this link explains the serialization features of C#: http://tech.pro/tutorial/618/csharp-tutorial-serialize-objects-to-a-file This is only secure-ish (a binary file is harder to hack than an excel spreadsheet) but that's all you ...


2

From wikipedia (http://en.wikipedia.org/wiki/Super_Nintendo_Entertainment_System#Game_cartridge) The largest games released (Tales of Phantasia and Star Ocean) contain 48 Mbit of ROM data That's 6MBytes. The smallest tile/sprite you could easily store is a 8x8 1bpp tile, giving you (6*1024*1024/8) 786,432 tiles without any space for code and other ...


1

To answer your main questions: Does your A* implementation expect undirected graph? Do you have one-way mirrors? no, unless you require logic for finding not-visible-paths And about saving memory, it all depends - how spare the adjacency matrix would be? (profile!) If most nodes see almost all nodes (a forest for example), you would lose a lot memory by ...


1

There's a few variables that aren't mentioned like how big you expect it to be, what platform the games are going to go on, etc so as usual there's a lot of "it depends" on any answer. One option is to serialize the data out to JSON. If you store some sort of checksum against the data you'll immediately know if the data has been changed. You can also ...



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