When you write a new project one must always keep ones eye on the objective. To create a project of value one must tread a dedicated path. To create a program is to duel with logic, to overcome your bias, and to bring into the world new will.
Keep your mind still and do not hurry in your movement. When you program it is always by your will to swing first they may determine the environment but you always force the first swing. With your sword out before you, and the project eyeing you down; you must strike hard and with all your will. Follow through with your swing, and move with both feet or one risks being mired by lost thoughts. One must move with a full measure if one is to win the duel.
Key Learnings - Ian Kretz
Monday, June 25, 2012
Sunday, April 10, 2011
Fireman Rendering
Problem: The fire hose would not show the correct angle when the mouse was pointing below where the player stood. When the mouse would pass under the players position on the Y axis it would cause the hose to angle upwards and for the balls to continue to spawn in that upwards direction.
Impact: The player could not shoot down and the animation would look improper if the player ever moved his or her mouse below the fireman.
Solution: Implemented an check in the update for checking the mouse position. Created a true, false value that would show where the mouse is on the screen relative to the player. Next in the render and add bodies calls we would jus reverse the angle in the signature to show the correct angle.
Impact: The player could not shoot down and the animation would look improper if the player ever moved his or her mouse below the fireman.
Solution: Implemented an check in the update for checking the mouse position. Created a true, false value that would show where the mouse is on the screen relative to the player. Next in the render and add bodies calls we would jus reverse the angle in the signature to show the correct angle.
Simply Harmonic Motion Calculating Water Height
Problem: The water height is the level that the water will be at and the ball is suppose to float on that level. Initially the water height was being calculated by just adding a certain integer to the grounds position to force to ball to be above that line.
Impact: The ball would look like it is constantly bouncing and it does not look proper. The ball would fall normally in between levels but would mess up if past a certain y axis.
Solution: Change the water height to be the difference the ball is from the point i make as the water height. So that is calculating the displacement of the ball in the y axis from the point of origin(the water level).
Impact: The ball would look like it is constantly bouncing and it does not look proper. The ball would fall normally in between levels but would mess up if past a certain y axis.
Solution: Change the water height to be the difference the ball is from the point i make as the water height. So that is calculating the displacement of the ball in the y axis from the point of origin(the water level).
Simply Harmonic Motion
Problem: The ball is suppose to be simulating floating in the water. But instead it would always fly off the screen. When calculating the force of the ball you are suppose to take into consideration both the force of buoyancy and the force of drag.
Impact: The simulation was failing because it was not correctly showing SHM.
Solution: Changed it to make the densities slightly lower on the the ball that is suppose to be floating. And reversed the force of buoyancy so the ball would go up and down correctly.
Impact: The simulation was failing because it was not correctly showing SHM.
Solution: Changed it to make the densities slightly lower on the the ball that is suppose to be floating. And reversed the force of buoyancy so the ball would go up and down correctly.
Saturday, April 9, 2011
Box2d world
Problem: The balls when colliding with cube would not push it far enough and the densities would not work properly the way we thought. We also had a problem where we though the speed would max out at around 5000.
Impact: The game did not work they way it was suppose to.
Solution: we had to scale down everything we were doing to work in the box2d world. Then when rendering it we scale it back up to the positions that we want.
Impact: The game did not work they way it was suppose to.
Solution: we had to scale down everything we were doing to work in the box2d world. Then when rendering it we scale it back up to the positions that we want.
Monday, April 4, 2011
Box2d Bodies
Problem:
There was too much lag when creating the balls that would represent the water. I would do this by creating a body in box2d and giving it the proper texture and fixture. I would then add the body to a body list. Even after they have been deleted with list.RemoveElementAt they would still cause the world to lag.
Impact:
The game would become unplayable after too many balls had been created.
Solution:
I had to delete bodies using the world.deleteBody command this will let you actually delete the body on the world instead of just removing it from the list. You also have to do this with anything else you create on the world like joints.
There was too much lag when creating the balls that would represent the water. I would do this by creating a body in box2d and giving it the proper texture and fixture. I would then add the body to a body list. Even after they have been deleted with list.RemoveElementAt they would still cause the world to lag.
Impact:
The game would become unplayable after too many balls had been created.
Solution:
I had to delete bodies using the world.deleteBody command this will let you actually delete the body on the world instead of just removing it from the list. You also have to do this with anything else you create on the world like joints.
Friday, March 25, 2011
2D Animation
Problem:
When the KeyListener picks up an command it should move the player and change the picture that will be displayed to make it look like an animation of walking. The picture was looping to fast and the animation looked silly.
Impact:
The animation will not look proper and will take away from the look of the game.
Solution
I have to use game time and pass that in as a parameter to my new Draw method in the Player class. Game time is the total time in seconds that the user has been playing the game. The player class checks this time against the time interval that you want the picture to change at i suggest 0.15. Once this is set up in an If statement you can increment the frames in the animation in it returns true.
When the KeyListener picks up an command it should move the player and change the picture that will be displayed to make it look like an animation of walking. The picture was looping to fast and the animation looked silly.
Impact:
The animation will not look proper and will take away from the look of the game.
Solution
I have to use game time and pass that in as a parameter to my new Draw method in the Player class. Game time is the total time in seconds that the user has been playing the game. The player class checks this time against the time interval that you want the picture to change at i suggest 0.15. Once this is set up in an If statement you can increment the frames in the animation in it returns true.
Subscribe to:
Comments (Atom)