Day 38

Today was very unproductive. I couldn't figure out how to fix my sound problem. I spent the entire class trying to troubleshoot. I tried making an Alarm event (timer) to reset it etc. but that couldn't fix it either. I asked online for help https://www.reddit.com/r/gamemaker/comments/4h003g/help_with_sounds/

But i'm still waiting for an answer and class is nearing its end. I'm trying to do everything i can to fix this problem and I don't know what else to work on while I wait.

Once I fix it, it will be very good experience for me and I will know how to fix it from now on.

Tomorrow I will work on a new level until I can fix this problem completely.

Day 37

Today I added some cool sound effects to the game. I added some sound effects when you pick up powerups and kill enemys, and they work. The sounds and camera shake add some juicy effects to the game. I tried to make it so that if i have a certain combo play this sound (you get combo from killing enemies or picking up powerups). But the sound would play continuously whenever its stuck at 3 combo. I know why this happens i just don't know how to fix it.

Tomorrow I will try to fix this problem of mine.

Day 36

Today I worked on some cool effects to the game. I started off by adding a resets counter at the top of the screen beside the death count. this counts how many time you reset the game so you can't just keep resetting when you're about to die.

Then I added something that isn't so serious, I turned all the jump sprites into illuminati sprites which was a joke that Quinn told me to do.

In the last bit of class I worked on a camera shake whenever I touch the powerups or kill an Enemy.

I used this video to help me: https://www.youtube.com/watch?v=TIA9-dPGiUM

Tomorrow I might add more effects or add more sprites depending on how I feel.

Day 35

Today I worked on a new level for my game. It took a while to make this and i was moving very slow because i had to keep testing it every 2 seconds to make sure it worked. But I finally finished it.

I combined the jump and walljump powerups together in this level. This level was more of a test than an actual level for my game so i might not add it in the final version. 

After i finished that I changed my sprite masks because the collision was too far apart and if i made it percise, it would be very buggy.

Tomorrow I will work on something new or I might work on my sprites (i said this 100 times by now and I haven't worked on it yet) 

Day 34

Today at the beginning of the class I worked on making the movement be continuous when moving to the next room. Before when i went into a new room my player would stop moving and I would have to press the move key again. I used keyboard_check_direct(); instead of keyboard_check(); and it worked, i got continuous movement when moving to the next level.

Like this

Then after that I worked on making a pause menu for my game. I made a controller object (which is an object that has no sprite but does something), made it persistent so I only have to put it in one room and it's always persistent, then i made the code:

Create Event:

Step Event:

Draw Event:

In the create event i made the variable called "pause" and i set it to 0 (false), then in the step event i made the code that activates the pause menu (if i press the escape button pause the game) using the step event is best because it's the fastest event, it's always run continuously. Then in the draw event i draw the pause menu and what shows when pause is active.

This is the pause screen for now

Tomorrow i will work on making my sprites or something else.

Day 33

Today I worked on a new powerup and a new level. The new powerup adds an extra wall jump i pick it up.
 This is the new level (Level Six)

Here is how the powerup works

This will be very cool later on. I will combine my powerups together and make the levels super hard.

I also added Level six to the Level Select menu.

Then on the last bit of class I added RESET button. If you press "R" it restarts the level and doesn't add to your death count. This is very useful especially if you mess up and fall down or get stuck somewhere.
Reset by pressing "R"

Tomorrow I will either work on sprites if feel like it or i might work on new levels and new enemys etc.

Day 32

Today I worked on making animation for my sprites. First off I tried to make a running animation for my sprite but I don't know how. I looked up tutorials online on how but i still don't have an imagination. I'm not an artist normally and I rarely ever draw so i'm not used to this kind of stuff. I used Piskel to make my sprites but i used a tutorial and kinda cheated to make my sprite because i almost copied exact the tutorial's sprite Here. I will try to get people to help me next time. Today was a very non productive day, i hope i will do better next class.

Tomorrow I will either work on something new or work on my animations and sprites.

Day 31

Today I worked on animating my sprite and making an idle sprite. I made it so that the sprite head moves up and down to kinda look like he's breathing.
Then i put it inside the game and set image_speed to 0.05
After that on the last bit of class I added the fifth level to level select
And then I added the death collision to the fifth level because i forgot last time.

Tomorrow I will try to make a running animation and maybe improve the idle sprite.

Day 30

Today I worked on a counter that adds up how many times you died. I used the same code as the lives from last game but changed it with deathcounts. And made it so that whenever you die add one to deathcount. Then i would draw the string in the top left corner.
Then I worked on implementing slope collision on a new level. I used this video to help me: https://www.youtube.com/watch?v=1r1rElIiWqw

This is how it turned out

I can go up the slopes then fall down.

Tomorrow I will work on a new level or enemy ai.

Day 29

Today at the beginning of class i fixed the powerups with this code.


//Powerup activation
if (powerup) {
    jumps = 1;
}
if key_jump and (powerup) {
    powerup = false;
}

So that was easy. Then I made a new level where you have to jump twice to get to the platform.

Then at the last bit of class of worked on the title screen.
I used the same code as my last game. Quit exits game, Level select takes you to level select and start, starts from level 1.

Tomorrow i will work on another level.


Day 28

Today I worked on the powerups for the game, but i can't get it to work. I want it so that when i pick up the powerup to get an extra jump. I also made a new level for the powerups tutorial.
Like this

But i can't get it to work because whenever i pick it up i can jump infinite amount of times.

Tomorrow I will find a way to reset the jumps everytime i jump.

Day 27

I did a lot on class today. I restarted the new game and i got all the basic things down (like objects, sprites and tiles etc.)
Then i implemented Collision with a simple 20 line code

//Horizontal Collision
if (place_meeting(x+hsp,y,obj_wall))
{
    while(!place_meeting(x+sign(hsp),y,obj_wall))
    {
        x += sign(hsp);
    }
    hsp = 0;
}
x += hsp;
//Vertical Collision
if (place_meeting(x,y+vsp,obj_wall))
{
    while(!place_meeting(x,y+sign(vsp),obj_wall))
    {
        y += sign(vsp);
    }
    vsp = 0;
}
y += vsp;

Then I implemented movement into my game with the same code i used in my previous game

//Get the player's input
key_right = keyboard_check(vk_right);
key_left = -keyboard_check(vk_left);
key_jump = keyboard_check_pressed(vk_space) or keyboard_check_pressed(vk_up);
//React to inputs
if move_lock = false
{
    move = key_left + key_right
}

Then a new code I added from a different game is the Enemy movement which makes the object bounce back and forth off objects. Like this
Then i added a code that kinda makes it like a Goomba you can only kill if you jump on it. If it's sides touch you, you die.
This is the code

//Enemy Collision
if (place_meeting(x,y,obj_player))
{
    if (obj_player.y < y-16)
    {
        with (obj_player) vsp = -jumpspeed;
        instance_destroy();
    }
    else
    {
        room_restart();
    }
}

The video i used to help me with the enemy was: https://www.youtube.com/watch?v=wmnaOLI6RzE&nohtml5=False

Then I wanted a sprite for my player not just a block. So on the last bit of class i used http://www.piskelapp.com/ to make a 32x32 sprite for my player.

Tomorrow I will add powerups to the game and more levels. And if i have time an enemy sprite.

Day 26

Today I restarted my game. I didn't do much anyways so it wasn't a big deal. I will make a platformer using the same base code that i used in my last platformer instead of making a physics based world which is very confusing. I will also make the game smaller scale wise instead of having big 100x100 sprites i will have 32x32 sprites just because its easier to do. I couldn't find any character sprites to make but I found a cool tileset.
I think this is a pretty cool tileset and its royalty-free so i can use it. I am still trying to get some character sprites. I might make one at home today that i can use.

Tomorrow I will get the game mechanics down and working to where i can actually move.

Day 25

Today I started working on the ground by making a collision object that I would place everywhere i would collide with the player. I can't get it to work tho so i don't know i might restart everything tomorrow and not make it in a physics world. I used tutorials on YouTube but i can't get it to work. 

If i can't fix anything I might restart tomorrow and not make it a physics based world because that is very confusing for now. Sorry i didn't write much info today.

Day 24

Today i started a new game and i got some nice sprites.

The game will be another platformer but this time it will be more advanced. The game will have multiple levels, enemies, powerups etc. This game will take a while to make but when its finished It will be a good game. Today I started off by importing the sprites and modifying some of them like flipping them around if it's a left sprite etc.

Tomorrow I will work on making the collision and movement of the objects.

Day 23

Today i finally finished my game. It only has three levels but it was fun making it. I made an end screen for when you finish all three levels.
It was a blast making this game. Throughout my time making this game i learned a lot of things. I learned how to fix multiple bugs such as animation, collision, and random invisible walls that i never placed there -_- I hope now my progress will be faster when making new games because I've learned a lot of things from this game.

Tomorrow I will start a new game with better sprites and using the built in physics engine in game maker based on Box2D and Liquid Fun which is very cool. This will for sure help me in my games. I already have some good sprites where i can start working on my game.

Day 22

YES I FINALLY FIXED IT YEEEESSS
I finally fixed the problem I've been trying to fix for weeks :))))

The problem was (if you haven't been reading my past posts) is that my character wouldn't wall jump properly after i implemented sprites into the game and after i fixed that my character wouldn't animate when I move. I asked everywhere online and they gave me some tips and code and none if it worked. Then I sat there and asked my self "Why doesn't this work" so I looked through my code and tried editing everything through trial and error and i finally fixed it. I used "else if" statements instead of just "if" statements.

THIS IS MY CODE

//Defining facingright variable
if (move = 1) {
    facingright = 1
}
if (move = -1) {
    facingright = 0
}

//Animation

    //Run Right
if (grounded) and (facingright) and (move = 1) {
    sprite_index = spr_player_run_right;
    image_speed = 0.1;
}
    //Run Left
else if (grounded) and (!facingright) and (move = -1) {
    sprite_index = spr_player_run_left;
    image_speed = 0.1;
}
    //Jump and idle right
else if (facingright) {
    sprite_index = spr_player_idle_right;
}
    //Jump and idle left
else if (!facingright) {
    sprite_index = spr_player_idle_left;
}

And that fixed it :)

Tomorrow I will work on probably making sprites for the ground etc.

Day 21

Today i coded the animation sprites. But the problem is, it doesn't play the entire animation
And this is a problem. So i asked again on Reddit and I got  a response really quick 
https://www.reddit.com/r/gamemaker/comments/4dd7cs/help_with_animation_platformer/

He said to set image_speed of the sprite but i haven't tried it yet because class ended

Tomorrow i will set image_speed.

Day 20

Today I finally got some help on my reddit post.

https://www.reddit.com/r/gamemaker/comments/4cwiqp/need_help_with_making_an_animation_platformer/

And it worked but I didn't get to finish coding the animation sprites

Next class I will code the animation sprites