A Little Perspective
This post is a status update, which is how I track progress specific to my game. Check out my timeline to see what I've recently accomplished.
I was really excited after the last update because I felt like the foundation of my code was relatively solid and the core game mechanics were working. With that core work out of the way, I was free to focus on polishing what I had built and thinking about what type of game I ultimately want to build. In the last 2 weeks I was able to fix a bunch of bugs, add obstacles, add art, and switch the camera point of view. Add all of those together and you get a game that’s starting to look pretty sweet in my unbiased opinion.
I’m going to start out with the most exciting part of this update and that is my decision to switch from an orthographic point of view to an isometric point of view. What that basically means is the game will look less flat and more 3D because of how the tiles and artwork are drawn. Visually, what that means is that my game went from this
Successful games have been made from both viewpoints, but I like the isometric viewpoint a lot more. After I switched to the new viewpoint, I found some cheap artwork over at the Unity asset store and added some ground tiles, trees, rocks, and a couple of buildings. So now the game in its current state looks like:
The switch really wasn’t as difficult as I thought it would be and the only real programmatic hurdle was in calculating pixel location-based on grid location and vice versa. Once that was fixed, then object placement, pathfinding, and movement all fell into place.
In addition to the point of view switch, some noteworthy fixes were:
Objects Take up Space
Image objects, like trees, houses, rocks, and characters themselves now “take up space”. This is important because now when characters move, they cannot walk over areas that are occupied. The pathfinding algorithm now recognizes which spaces are occupied and characters are routed around occupied spaces when they move.
Objects are Indexed for Depth
In Corona, images do not have a Z-index variable and they are drawn to the screen in the order that they’re called. So if I drew a square to the screen and then a circle to the same location, the square would appear to be beneath the circle. This is a problem because if I have a Knight originally behind a tree and that Knight then moves in front of the tree, he will still appear to be behind the tree. What I have to do is re-draw every image on every frame. On each frame, the images are sorted by their Y position so that the image highest on the screen is drawn first and the image lowest on the screen is drawn last.
Maps are Loaded Programmatically
I previously drew map tiles by hard coding a fixed number of columns. That was fine when all the tiles were exactly the same, but it was time to get more efficient with the addition of obstacles. I now load the maps in from a JSON file that represents terrain obstacles as numeric values.
Added Custom Event Handlers
This last point gets a little nerdy, but it’s a critical part of game development. Basically, when some events, like the death of a character happen, specific pieces of code need to be executed. By setting up custom events, code objects that are “listening” for certain events then handle any necessary code.
Next 2 Weeks
Besides cleaning up my code, which seems to be a very common task in game development, some of the tasks which I hope to accomplish are adding multiple directions for characters (so they face where they’re walking), cleaning up movement and attack animations, adding death animations, and testing some new game mechanics I’ve been brainstorming. I’m pumped about getting back to work after a long Memorial Day weekend, because I think this thing is really starting to take shape.
Your comment will be published once it has been approved.
to see the pull request you generated.