But, I am at it again. The story-line and game style are still going to be the same as they were planned in my first thread. But this time I have more than just mere ideas, I have actual progress. Over the past week, I've created a movement engine from scratch, redrawn a smaller, easier sprite and animated it to run, jump, fall, and cast spells (while standing, running, jumping, or falling).
Here are my sprites!
+ Show Spoiler +
Main Character running animation. The first frame is alse his sprite when he is standing still.
1st frame- Jumping, 2nd frame - Falling
Casting spell from a standstill (imagine a fireball coming out of his hand after the 4th frame)
Casting spell while running
Casting while jumping
Casting while falling
I don't really pre-plan what I am going to do each day when I sit down to work on my game. I kind of just keep a mental checklist of the next two or three things that I want to do, and by the time I have finished one or two of those, I think of one or two more things to add to the checklist. Maybe that's inefficient, but it's just how I work.
Here is all of the things I've knocked off my checklist:
+ Show Spoiler +
-Draw/animate sprite
-Implement basic right/left movement
-Add screen-scrolling feature that ensures that the character's back is always near the edge of the screen, whether they are facing right or left (thus giving them view of a large area in the direction the sprite is looking).
-Implement jumping and gravity
-Make sure the sprite reverts back to a standing one after landing from a jump
-Add mechanic in which holding down the spacebar results in a higher jump
-Add ability to cast fireball spell while standing still
-Add ability to cast fireball spell while running
-Add ability to cast fireball spell while jumping/falling
-Implement seemless transition of animation if character changes direction, jumps, or falls in the middle of the spell-casting animation (ex: If the player jumps while he is in frame 2 of the cast-while-running animation, the next frame will show him in frame 3 of the cast-while-jumping animation)
-Implement basic right/left movement
-Add screen-scrolling feature that ensures that the character's back is always near the edge of the screen, whether they are facing right or left (thus giving them view of a large area in the direction the sprite is looking).
-Implement jumping and gravity
-Make sure the sprite reverts back to a standing one after landing from a jump
-Add mechanic in which holding down the spacebar results in a higher jump
-Add ability to cast fireball spell while standing still
-Add ability to cast fireball spell while running
-Add ability to cast fireball spell while jumping/falling
-Implement seemless transition of animation if character changes direction, jumps, or falls in the middle of the spell-casting animation (ex: If the player jumps while he is in frame 2 of the cast-while-running animation, the next frame will show him in frame 3 of the cast-while-jumping animation)
Things I'm planning on doing within a few days:
+ Show Spoiler +
-Draw animated fireball for when the fireball spell is cast (I'm currently just using a 5x5 orange block as a placeholder sprite)
-Add collision behavior to the fireball, so it gets destroyed when it hits walls.
-Add ability to cast fireball spell straight up, or straight down (if character is in mid-air).
-Add levitation spell that can be cast while in mid-air, and allows the character to temporarily hover.
-Add collision behavior to the fireball, so it gets destroyed when it hits walls.
-Add ability to cast fireball spell straight up, or straight down (if character is in mid-air).
-Add levitation spell that can be cast while in mid-air, and allows the character to temporarily hover.
Frustrating-as-hell bugs that I overcame:
+ Show Spoiler +
-Often, when I was testing the jump mechanic, the sprite would land 1 pixel above the platform, and appear to be hovering above it. See below for how I solved it.
-Some pixels were being drawn bigger than others... kind of hard to explain. Here are some screenshots to help:
How it's supposed to look
How it looks when I playtest (notice the discrepencies in the orange ball and the characters neck, among others)
I solved both these bugs the same way. I had a feeling that it had to do with the game trying to draw pixels at non-integer coordinates, and thus oddly scaling/stretching individual pixels. Some of my variables (such as gravity) are set to non-integers, so this kind of made sense that this would be the case... I just couldn't think of how to fix it. I asked for help on the Game Maker forums, and received the solution to both problems in one simple line of code!
Bascially, this code says that every time that a sprite is drawn, redraw it with rounded x and y coordinates.
-Some pixels were being drawn bigger than others... kind of hard to explain. Here are some screenshots to help:
How it's supposed to look
How it looks when I playtest (notice the discrepencies in the orange ball and the characters neck, among others)
I solved both these bugs the same way. I had a feeling that it had to do with the game trying to draw pixels at non-integer coordinates, and thus oddly scaling/stretching individual pixels. Some of my variables (such as gravity) are set to non-integers, so this kind of made sense that this would be the case... I just couldn't think of how to fix it. I asked for help on the Game Maker forums, and received the solution to both problems in one simple line of code!
In the "draw" event:
draw_sprite_ext(sprite_index, image_index, round(x), round(y), image_xscale, image_yscale, image_angle, image_blend, image_alpha);
draw_sprite_ext(sprite_index, image_index, round(x), round(y), image_xscale, image_yscale, image_angle, image_blend, image_alpha);
Bascially, this code says that every time that a sprite is drawn, redraw it with rounded x and y coordinates.