59

If all you truly needed was the PNG file, chances are they just simply added the information into the file. This is actually a practice of Steganography. A lot of the times, this is used to hide payloads or secret messages in things that are seemingly public facing. However, it is likely in this case that this method is what was used. Typical Stegongraphy ...


51

The developer of Monaco actually made an excellent article on how both they and Spore accomplished this. The basic summary of what they do is fairly simple: Convert your data into binary Convert your target image into a raw bitmap Walk along the pixels of the image in some predictable pattern (they simply do left-to-right from the top-left corner). Write ...


42

Data-driven coding Every thing you mention is something that can be specified in data. Why are you loading aspecificmap ? Because the game configuration says that is first level when a player starts a new game, or because that's the name of the current save point in the player's save file they just loaded, etc. How do you find aspecificmap ? Because it's ...


19

There does exist a flavour of Wavefront's *.obj that facilitates Vertex Coloring.. I know of two applications that can export these namely "MeshLab" (free) and "MeshMixer" (also free from Autodesk).. The vertex colours is actually found just after each vertex definition as shown below.. (Piece of *.obj) #### # # OBJ File Generated by Meshlab # #### # ...


12

The same way you avoid hardcoding in general functions. You pass parameters and you keep your information in configuration files. In that situation, there is absolutely no difference in software engineering between writing an engine and writing a class. MgrAssets public: errorCode loadAssetFromDisk( filePath ) errorCode getMap( mapName, map& ) ...


8

I downloaded and examined a few Spore creatures from Sporepedia. From those I learned that: The images contain no information in addition to the standard image data. The stenographic data have been stored with no consideration for the image, one could imagine that the transparent parts were used exclusively, but they are not. The storage use depend on the ...


8

Use the organization of the data to your benefit. You can always be expect the data in the same order, so you know what the next bytes belong to. For example (not specific to your data), when reading in the data, always expect two bytes for tile type, two bytes for lighting information and then two bytes for extra info. So it knows that after 6 bytes, it's ...


8

Disclosure: I'm the author of Scelight and Sc2gears. Blizzard released an official, open-source SC2Replay file parser library called s2protocol written in python: https://github.com/Blizzard/s2protocol That is the most complete, up-to-date, official replay parser. It is considered the reference implementation. It is quite low-level though. There is ...


6

Endianness matters when it comes to game consoles. The Wii, the PS3, and the XBox 360 all run big-endian, while all major desktop computers (as of the date I'm writing this answer) run little-endian. If there's a chance you'll want to compile your code for one of those game consoles someday, or if someone releases another popular big-endian desktop machine ...


6

Loading up DirectX (via SharpDX or XNA) to do the conversion is probably overkill. Why not simply decode the format on the CPU? It's simple enough. There is a DXT decoder in MonoGame you might be able to borrow. (In case the file changes, the latest revision at time of writing is here.) BC3_UNORM is equivalent to DXT5, which that will happily decode. You'...


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

As with so many things, the answer is "Depends" Do you need to load a couple of hundred megs of data quickly? Are you streaming data in as the player traverses the level? Are you reading from optical media? If the answer is "yes", then pre-packed resource streaming is for you. If you're just making pong. It's not really a big issue, loading flat ...


4

What Byte56 says makes sense. I'm not sure why you need 2 separate coordinates (chunk coords and xy coords). But since a map is always square, the most basic representation is a 2D array of ascii chars ..,,.....@ ..,,@@@@@@ ...,,,...@ ......,..@ So there is the specification of a 4x10 map in 40 bytes. A 10,000 x 10,000 map would take 95MB, which isn't ...


3

To quote directly from the link you provided: For instance, OpenCTM does not handle multiple meshes, transformation matrices, materials, light sources, physical properties, etc. So, the answer is it does not have built in material support. However, it also says 'Supports storage of per-vertex normals, UV coordinates and custom vertex attributes.' This ...


3

So the tags [float_array id="Suzanne-mesh-positions-array" count="1521"] and [/float_array] contain the huge list of vertex positions right? Yes. And the tags [p] and [/p] inside [polylist count = "968"] and [/polylist] should contain vertex indices in triangular order right? But that doesn't make sense, cause then the first triangle is going to ...


3

I would suggest using fbx. It is much more widely supported by other tools and that generally means that even in Unity, more effort will have been spent on making sure that fbx works properly. If you need to import your models to other tools besides Unity for processing etc, you will probably need fbx anyhow. Also, if you decide to use some other modelling ...


3

I like the other answers so I'm going to be a little bit contrary. ;) You can't avoid coding knowledge about your data into your engine. Wherever the information comes from, the engine must know to look for it. However, you can avoid encoding the actual information itself into your engine. A "pure" data driven approach would have you start the executable ...


2

I played with parsing the SC2 replay files a while back. You can view what I've done and what I've been able to reverse engineer (as well as bunch of links to helpful sites at the bottom): http://wiki.spectralcoding.com/project:sc2inspector


2

If storage size is your main concern, using vector<bool> is probably actually your best bet. This is because vector<bool> is optimized to use one bit per bool instead of one byte (see reference here). From there for file read/write just make sure to write the capacity of the vector<bool> to file then use the same one bit per bool/spell (...


2

There's no reason to use a script if you're just storing time-based data. There's many different ways you can design a file format for your data. As long as you can load it into the game, whether you used XML, binary, plain-text, etc, is not very relevant. As long as your format allows you to add new information without breaking the previous format (during ...


2

Planning on making these map files by hand? You have 409,599 more lines to write if you want to fill a 640x640 tiled map. You should store the map in a binary format. An easy way to do that is to serialize the data structure you're storing the map with in RAM. It would be far easier to write a simple visual editor that allowed you to place tiles and ...


2

Data structure Vector of vectors (a.k.a. array of arrays) Using this data structure allows you to consider vertices and edges (specially useful when dealing with one-way streets or roads) and it also let's you consider more efficient maps, leaving out obstacles. In this case you would use at least two vector of vectors; one for storing the vertices and ...


2

Though the idea of what to do with your data is vague, reading image data and operating on it is straightforward. See the ImageBuffer.getRGBA docs. public byte[] getRGBA() Retrieve the raw data stored within the image buffer Returns: The raw data in RGBA packed format from within the image buffer You have other options as well, such as ...


2

As tkausl suggests, it should be trivial to program a simple tool: Construct 2D grid Apply heights from the image Write it to OBJ format file Import into 3DMax


2

This isn't explicitly a problem of Unity. This is something an installer could do for your programm. Summed up: it is a registry setting Hope this link helps: where-in-the-registry-does-windows-store-with-which-program-to-open-certain-files @ superuser Code samples on microsoft social network MSDN


2

The rotation comes from the calculation of the index in load_from_file(), it should be: chunk[i][j] = std::stoi(tokens[i * Constants::BIOMESIZE + j]); That said, it would be much better if you could save the file in such a way that you can load it back the same way. Instead of using "," as a separator, use a space (" "). Then you can ...


2

It looks like what you would essentially like to do is create a game engine (like RPG Maker) or a game with some modding tools with the ability to create custom semi-defined object (like Skyrim). Game Engine Approach Typically when people make their own engine, their own program will include a compiler that reads another scripting language (typically LUA ...


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