Thursday, June 15, 2017

Gamemaker Day 68

Today I learned what collision masks does, what i did : I find out that the player animation would stick into a wall sometimes, so I did a little changes in the player object. on the player object , i set the mask option to the sprite wall. this will make sure that the player pixel won't touch the wall pixel. so that whenever the player colliding with the wall, it won't stick into a wall for sure.


the next day I'm going to watch the tutorial "variable jump" , to make the jump of the player feel more real.

Tuesday, June 13, 2017

Gamemaker Day 57

Today I learned how to create an animation for the player, what i did : first I create a sprite for my running animation, I loaded 4 different image that make the player looks like running. then on the player object step event : I put "if(move !=0) image_xscale = move;" meaning if the player isn't facing the right side, it will reverse the image when the player move to the left side. and then I use "if(place_meeting(x,y+1),obj_wall)" check if the player is touching the ground. then I put "If(move! = 0) sprite_index = spr_player_run. when the player is moving , it will change the index of the sprite to the running image of the player. last i put "else sprite_index = spr_player;" if the player isn't moving , then it will change back to the normal sprite.




the next day I'm going to watch the tutorial "collision mask" , so the player will collide with the wall perfectly.

Friday, June 9, 2017

Gamemaker Day 56

Today I learned how to make the player wall jump around, what i did : I create a simple code to make the player wall jump, first I use "If (key_jump)" meaning if the player is pressing jump key , and also i use "(place_meeting(x+1,y,obj_wall) || place_meeting(x-1,y,obj_wall))"  to check if my player is colliding with the side wall, if it is then it will "vsp = -jumpseed" meaning this will make the player have the jumping speed of the side wall.


the next day I'm going to watch "animation tutorial", then i'll add an animation for the player character.

Wednesday, June 7, 2017

Gamemaker Day 55

Today I learned how to make the player has double jump. What i did : first I create the double jump variable "jumps = 0 and jumpsmax = 2" , for the jumpsmax is meaning to how many times can the player jump. and jumps is when the player hits the ground to reset the variable. then I changed something in the player object on step event. I use " if(place_meeting(x,y+1,obj_wall)" the function that i code before , it mean if player is hitting the ground then run " jumps = jumpsmax" , which will the jumps variable to 2. then I use "if (key_jump) && (jumps > 0)" to check if the jump key is being pressed and the jumps variable is above 0 also meaing the player is touching the ground, then it will run "jump -=1 and vsp = -jumpspeed". which it will reduce the jumps variable to -1. it will stop the player from jumping again.



th next day I'm going to watch the tutorial "wall jump", so that the player can jump over walls.

Tuesday, June 6, 2017

Gamemaker Day 54

Today I learned how to make my moving platform to move forward with the player, so that the player won't fall when the platform is moving. what i did: on the previous post , my player won't stay in the moving platform, even though the player is on top of the moving platform. so i did a few changes. first I use "if place_meeting(x,y-1,obj_player)" to check if the player is on the of the moving platoform. if it is then run "obj_plater.hsp_carry = hsp". This mean obj_player's hspeed to a new variable when the player is on top of the moving platform , since the "hsp_carry" is a new variable,so i have to add a numbers to it. first I set "hsp_carry" to 0 in the player object, and then I create a new variable (hsp_final) to make a composition of hspeed and hsp_carry. then I just have to change every hspeed to "hsp_final" in the horizontal collision, so that when the the player is on top of the platform, it'll have the speed of hspeed and hsp_carry.






the next day I'm going to watch the "double jump" , so that the player can have a double jump ability.

Monday, June 5, 2017

Gamemaker Day 53 May conculsion and June plan

What I learned in May: I learned a lot of new function in Gamemaker, such as how to use the function "if" more affection in the the game. then I wrapped up my shooting game project, now the shooting game is complete like a official shooting game. it has improve so much from the beginning. the next project is platform, this project has been going well so far, i learned the mistake from the previous project and now the platform are much better than the shooting game. Also I use a few function from the shooting game project apply to the platform game, so that I won't have more difficult time figuring out function.for the platform game moving object around in a room would be spending more time than figuring out a function. but overall in platform game I've been a few function: checkpoint,one way platform, enemy's collision and speed, moving platform.




checkpoint:

 one way platform:

enemy:

moving platform:


Plan on June: basically I'll finish my platform project by the end of June, there are a lot more function that i have to add into the game. also I would create another multiple room , so that the player won't stay in one room forever. this would be my last project of gamemaker.


Wednesday, May 31, 2017

Gamemaker Day 52

Today I learned how to make a moving platform. what i did : I mostly use the code that i had on enemy to apply on the moving platform , because the enemy's movement and the platform movement are very similar coding.  first I duplicate the wall sprite and recolor it, and then copy the create event code on the enemy object into my platform moving object. so that they can have the same variable.
then I copy the step event on the enemy object into my platform moving object , so that the platform would move the same as the enemy , when the moving platform hit the wall , it will goes opposite way. but i haven't finish the moving platform yet, the platform still needs more improvement.mainly today I remove everything in the room , to make it more difficult to play with.




the next day I'm going to continue watching the tutorial , and do more improvement for the moving platform.