Monday, 17 October 2016

End of Production Week One - Random Generation

First week of production is over, and I’ve made some decent progress. From starting at square one, I’ve now got a player character (placeholder, admittedly) who can run and sprint around to his heart’s content, and no game is complete without guns, so I gave this little guy a ‘revolver’ so he can shoot. It’s very basic, but it’s a start. I’ve got another five weeks of production then one of post, so I have plenty of time to tweak and fine tune the player movement and shooting.

The majority of my time and effort this week went towards random level generation. Gun Smoke has a pre-determined level layout, with 8 ‘room slots’ which are randomly filled from a list of around 15 different rooms. Getting the slots filled is easy, it’s tuning the composition of these rooms that proved difficult. Early tests resulted in three or four of the same room being thrown up on a level, which was undesirable. I’m no programmer, and after tussling with GameMaker for a few days, it became clear that programming wasn’t a natural talent of mine.

That being said, come the end of the week I now have a system in place that consistently throws up 8 different rooms in the slots. Mission accomplished! The number crunching is done on the loading screen, the room layout is then locked in as a variable, and loaded up into the level. The result is a randomly level composed of randomly selected rooms, that the player can run, sprint and shoot their way around (albeit for no real reason at the moment).

All in all, it’s been a successful week. Like I’ve said previously, I have no experience of making a game or any real programming other than HTML, so to have created a level generation system for my game is quite a cool accomplishment. I am sure in a couple of years time I’ll look back at the code I used to hash together this system and laugh at past me, but for now it works, and that’s all that matters.

No comments:

Post a Comment