Friday, June 1, 2012

What's Happening

After a period off from working on the game I realised I've kind of made a mess. Literally. My code was all messy and inefficient and I found it hard to get back into working on the game. So I've decided to start from scratch and get things up and running again with a bit more planning this time and a more orderly structure so if I  take a break it's not impossible to come back to it. To anyone who's thinking: "Why don't you just work on it like it was?" trust me it's for the best that I don't do that. I've got too much to fix on that old version for me to even consider it. The cool thing is that taking a step back for a little while means I can see that more clearly now.

So anyway progress continues on the game. I have been back to work on the rewrite of late despite my loooming exams. I've written a sort of game structure and am working on making some code for moving characters around reusable so I can just use it for enemies and whatever else I decide to chuck in there. It's all simple in concept and then damn complicated when I actually have to do it. But a great thing about making a game is how many strange unexpected problems it throws at you. It's a great way to learn about programming without having to construct meaningless problems for yourself to solve. There are so many problems pre-built into making a game it's like a student's nightmare dream!

I expect to be finished with the game in around 3 months. Lol.

I'll just edit this post until something interesting happens. My word I'm working slowly. I can't wait for these exams to end!

Things done on the new version - update of randomness 13/06/2012:

  • Created a system to handle loading the right graphics for each level. I tell it what level and it loads the graphics. Mostly just boringly designed platforms. Admittedly I only have one level but I have tested it. I think.
  • Created an input system that converts keyboard input into a direction vector (basically just keeps track of up, down, left, right, nothing, or any combination of those) and some other variables to keep track of other buttons. Oh and I made it pretty simple to change the controls for later. The reason for the whole conversion thing is because I...
  • Made a movement system that'll contain a bunch of functions (tools) to move the character (or indeed anything) around given the right input. But since the keyboard input is turned into this other form I can use the keyboard input for these functions or just give it input and it won't know the difference.
  • Made a camera that is restricted to certain bounds. I'm planning to make it able to follow any object I choose. That way I can switch it to random objects and amuse myself.
  • There's also something that defines everything in the game as an object - maybe I should have used the term sprite? - and stores the properties of that object and then a special version of that I made called a playerobject that's for the player. It was the first thing I made.
  • Made functions for movement for a topdown or sidescroller game. I could always use the topdown one for enemies that hover or something since I do intend to keep this a sidescroller. I also added inertia to these which you can set to anything you like.

And here's a little short term to-do list:

  • Set the camera bounds when loading the level
  • Start work on collision detection before doing anything fancy
  • Remeber to code it in such a way that the character can change size at any time
  • Find a way to define all solid objects as polygons
  • Figure out how to detect collisions between these polygons and the player and move the player out of them apropriately
  • Decide on how to determine when the character is on the ground
  • Jumping

No comments:

Post a Comment