I had a little bit of difficulty (and honestly still am) deciding on if I should go for a very serious and realistic approach or a more lighthearted light take on the character. As you can see, I decide on the lighter approach, but still feel like he fits fairly well into the newer world.
It's interesting how development seems to work, because once I had made the new graphic for the character, ideas for the story line started unfolding in my head. I discussed the ideas with roommates and have a little bit of an idea for what I want to do, but I will put more on that later in a specific post.
So the next step I began to take was adding in more fluid animations for the character. Arms going up as he began to fall, a more smooth walk animation, etc. As suspected with any new added feature, things did not behave as I had hoped they would. One of the most humorous glitches that came to pass was a over excited fall animation. Here's a little taste of the bug.
I couldn't help chuckling at some of the bugs, but there is nothing more frustrating than going through your code various times and not being able to identify what is missing. All the steps seem to be there, the logic seems to be sound, but the program just doesn't seem to cooperate. Similar bugs happened as I tried to add the functionality of him looking around. Luckily a quick post onto the GM forums returned some advice from an experienced programmer, and playing around with his tips soon made me realize where my error was. I'm just glad the GM community is still very populated and involved.
Coding Lesson of the Day - (I'll try and make these a common part of my posts)
Original code : if (image_index > image_number-1) pause animation
My aim here was to stop an animation at the end of its sprite, and this code did in fact seem to work in a few other situations, but not in the fall one I was working on. Luckily the forum user pointed out that because numbers in a program do not always behave as you would expect (I think they are whole numbers increasing by 1 when really there can be hidden decimals or parts) this code did not fully cover all of my possible loose ends. So then he showed me that using this-
Final Code: if (image_index + image_speed >= image_number) pause animation
This took into account the variables that would be influencing the animation rate and change in index. Getting that to work was an absolute relief and a very welcome satisfaction.
As the character was finished up, I used the last 45 minutes of the night to try my hand at making a destructible block. I had thought about the approach I would use earlier, and it felt good to be able to draw the tile, import it, make the object, and then successfully add the functionality of it, without any tutorial or outside help. It's a good feeling to start becoming self sufficient in this environment, and I'm excited to try out the next aspects of my game. I think that about catches me up to the current stage of the game, and hopefully I'll be able to keep up on this blog to keep the coding lessons documented as well as show where things are going over all.

O.O Amazing!!
ReplyDelete