3
« on: September 03, 2016, 08:35:39 pm »
Alright, so I've been working on what I would consider to be a standard RPG game. I'm using Zelda Links Awakening graphics, cause I'm not the most creative! lol. I'm more into learning how to structure a game and programming techniques. It's been fun so far! I've been using Axe as the programming language.
I'm gonna be fairly open about how I program different things, and I'll be asking for a lot of help. I'll try to keep screenshots on it, cause people like to see what's going on. Who knows, maybe I'll get it to a point that I can consider it finished!
I got some help from Sorunome on how to draw a tilemap to the back buffer and copy it to the front buffer...he's a brilliant guy. When I move the map, i shift the back buffer using the horizontal and vertical commands. I've been able to get a masked sprite drawn on the front buffer. I do this by copying the back buffer to the front, and then masking the sprites onto the front buffer. That's the first screenshot.
The Link sprite has his data arranged as Data("X coordinate","Y Coordinate","Direction","State")
The Directional multiplier in the third slot helps make Link's sprite face the correct direction. Basically when I press the directional keypad, it stores the numbers 1 - 4 into the third slot. When I call for Link to be drawn, the sprite pointer is offset to the correct directional sprite...if that makes sense. You can see that in screenshot 2...and don't worry about the random background map
In screenshot 3 I was able to get Link to alternate between states: standing and stepping. It's just another multiplier, just like the direction slot. I have a little routine that helps alternate between the two when moving, and resets to stand when Link's not moving.
Screenshot 4 is my little test arena for collision. I rearranged the tilemap so the fences are in different configurations for Link to approach. I feel like the collision is super basic. Depending on which direction Link goes, I check the type of tile Link would move into. If the tile is less than a certain number, its a walking tile, and Link can walk freely. If it is above a certain number, it wont let Link pass forward. I hope this explanation isn't too vague...
So, the next thing's I have in mind are;
animated tiles (like the moving flowers tile) - I'll need help on brainstorming
Link swinging sword animation
Health bar
...just one step at a time, i guess. What do ya'll think?