Hacker News new | ask | show | jobs
by Zikes 4460 days ago
The associated blog post from Ben Purdy: http://www.benpurdy.com/blog/2014/3/demaking-zelda
1 comments

What technique is being described here? : "I decided that the map would contain as much game data as possible... I could tweak the placement of things using photoshop rather than having to hunt down data in a text editor."

Does this mean he used some kind of PSD to level compiler? If so, where can I find such a software?

Presumably it just means that the engine constructs the levels from an exported image (such as a png, not a psd), instead of creating the levels from a more complicated data system. Because he knows the exact sizes of things, and "sprites" are a 1 to 1 mapping to game objects, he can easily do this. In a more complex game this would be impossible, but it works very well for his purposes.
Simcity 4k uses a similar technique for the region definitions. They're actually just an image file, each pixel represents the size of the different city zones, and IIR the RGB color of the pixel had some property as well. So if you wanted a region with all small or all big cities, you just opened up the file and edited it.
Yeah, go on to read the Meta Screens section and it describes how this technique is being used.
He says he stored the map data as a single PNG. So, each pixel specifies what tile type that area of the map is.
That's correct, it's nothing fancy. Rather than use anything complicated it's so much faster for these sorts of game-jam situations to pack all the level data into a bitmap and just edit it visually. Since I was loading the level image anyway for display, it made the process of editing monster placement, triforce pieces, etc very fast.
I use www.PyxelEdit.com which allows you to edit levels/tiles visually and then export the tileset and an xml file with tile locations. It also supports multiple layers so you can have a layer that is for art but then another layer that isn't visible that you can use for spawn points/interactions etc.
I did that once to rip zelda's entire map. With one java app, I ripped all tiles (fixed size). With the other, I just compared the grid tile by tile with my sprite-pallete and then created a map file. Pretty straight forward if you use a single layered map.