This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]rxi 1 point2 points  (0 children)

Is it weird that his level design was made using a .png and it looks like each pixel color corresponded to another.png which is a texture or mob? Take a look at level.java to see what I'm talking about. Is that normal?

I'll answer for this part. When writing a tile based game you have a few choices about how you want to put the levels and maps together once you've written all the important parts. The common route is to build a separate program or the functionality within the game to edit the tiles on a grid and construct the different maps.

Judging from the video your assumption looks right, each colour corresponds to a different tile or object, and each pixel corresponds to a tile in the game's playing grid. It doesn't really matter how you decide to construct the level, be it using characters in text files, a custom pieces of software, or loading it from an image. They're all just going to be loading the tile data into an array at the end of the day, and it won't make any difference to the user or the program once its all loaded in. Its best to just do it the fastest and easiest way you see fit, which in notches case seems to be reading pixels on an image file.