57

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 ...


50

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 ...


18

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& ) ...


9

You could use the TMX map format used by the Tiled editor (as well as several other map editors). Even if you don't use Tiled yourself, the TMX format supports all the functionality you mentioned and it has several existing loaders/parsers for a variety of languages. It's also very easy to understand the format and extend it for your own game.


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 ...


7

Wavefront OBJ supports materials, which color groups of meshes the same color. Material statements look like this: newmtl redMtl Kd 1.00 0.00 0.00 Ks 0.50 0.50 0.50 Ns 18.00 So, Kd is the diffuse component, Ks specular. These would be specified inside a .mtl file that accompanies the .obj file. Inside the .obj file are statements like usemtl redMtl f 1/...


7

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 ...


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

Personally, I'm more of a fan of binary formats with sections (like Windows PE, just much simpler). They are also easier to parse (but that's just my opinion.... I did work with XML enough to give me headaches, checking whether getElementByName has returned a single value or a list of values... ugh). So, if I were you, I'd make it something like this: ".MMF\...


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

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

I'm looking forward for the Spriter project, a 2d skeletal animation editor. I uses an XML format called SCML, here is the beta format.


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

Actually, the intermittant 5 bytes are part of the zlib compression. As detailed on http://drj11.wordpress.com/2007/11/20/a-use-for-uncompressed-pngs/, 01 the little endian bit string 1 00 00000. 1 indicating the final block, 00 indicating a non-compressed block, and 00000 are 5 bits of padding to align the start of a block to on octet (which is ...


3

By far the majority of browser-based games are done in Flash. However the newer and growing in importance game format is HTML5 (ie. games programmed in JavaScript that use the new Canvas element). I've also seen many games that are pretty much just static images and web forms for the UI and the server simply constructs different static HTML pages in ...


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

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

If you are using Ogre3D, a logical choice would be to use Blender for creating the map, and Blender2Ogre to export the map into a .scene file. Then, in the code, you can use the DotSceneLoader class to import the .scene file into the game world. This will automatically attach each object to a scene node and you can access them as needed.


2

Here's a link to the autodesk docs about importing .obj files in 3ds Max. The .3ds file format isn't something open and it's really tied to the internal workings of 3ds Max, so you can't really count on an external exporter or something like that. Source: I worked on 3ds Max.


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