Buildings, part three: ingame.

Now actually in the game!

Now actually in the game!

I’ve significantly trimmed up my file after storing entity data into a separate text file and reading it from there, by removing a lot of now-redundant “if entity is a monster: set stats, else if stairs: set foo, else if..” code, and in the process removed a few useless parameters and cleaned up entity creation code to a simple “creature = Entity(dict[“name/type”])” call. Next up is adding some more item types.

But staring longingly at the picture in the previous post made me want to put it in the game, so I did that too, partly to see how hard putting hand-made structures in a map is. Doing it by hand (defining a hard-coded numpy array, and merging it in and defining building boundaries etc so it plays nice with my algorithms) is simple enough, but if I plan on adding more handmade pieces, making it do that automatically will probably save time. Shouldn’t be an problem.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: