60

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


52

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


20

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

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


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


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


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

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


3

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


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

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


1

Microsoft BMP files have a "monochrome" mode which uses just one bit per pixel (the file is still slightly larger due to meta-data). Note that this only applies to the actual graphic files. When you have your graphics framework unpack the image files to textures, the required texture memory might be more than 1bpp.


1

Why don't you create a smaller allocation unit size (instead of 4096 per chunk)? From what I understand, each chunk is 4096 byte long uncompressed. I'm guessing that a lot of data in the region is the same, so compressed it's at least 20x smaller, so that's about 200 something bytes. You can compress a bunch of chunks and chose allocation unit size that ...


1

Usually FBX is preferred for exporting the models. You can follow this link for more info. http://docs.unity3d.com/Manual/HOWTO-ImportObjectBlender.html


1

You should change the convert_alpha() part to just convert(), as the convert_alpha() changes the transparent pixels.


1

So I found it - posting the response here for future reference X/Y/Z = -7.189/0/10.136 in the Maya channel editor are rounded off values - the values themselves have a larger number of significant digits - e.g. -7.188707 so search for the first 2 decimal places only


1

It is impossible to know for certain from the given code what the issue is, but a reasonable guess is that you namesAsset string contain DOS/Windows style line endings, and therefore when you split by '\n' you leave an '\r' at the end of strings. I of course assume that the path you use is only a placeholder for code that reference the user folder properly.


1

That is right idea for reading/writing images but you'll want to get your "ImageLoader" class from a library, which will then give you a regular bitmap in memory to work with. The layout of that bitmap class is going to depend on the library you use. To see why, or what you need to handle if you want to write your own, see the W3C PNG Specification.


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