Game: Need For Horse
Name: Loo Yan Long
Admin: 053305S
Week 1-2
Brainstorming of ideas. Realise that its quite a difficult project. We have to complete this game by 15 weeks. We need to consider the time limit factor while brainstorming for a game. And adding to our problems are not all of the game elements had been taught at this point of time. We haven't even learn how to load a 3D model. We decided to make a simple game 1st and adding more complex feature IF we have the time.
Week 3
Tried to do GUI for the game. Its not as easy as I thought. We learned about how to edit some word button from one of the practical. But when we try to impletement the codes on our game , it just seems to stop working. The main problem was the game framework we are using are using OO style programing with many classes whereas the practical was not written with OO style thus a lot of error came out when we try to port the codes over.
After wasting many hours on trail and error, I decided to use another method. I use codes to print out the x and y location of the mouse on screen. I save those value and hardcode them into the game. By knowing the position of the mouse, I can find out the area that the button is located and hardcode the function of the button into that area. This create a mouseover effect for the button.
Eventually I realise that games really should not be hardcoded. Because the mouse position taken in at resolution 800 X 600 is different from the mouse poistion taken at fullscreen mode so this will cause the button to malfunction in full screen mode. Hardcoding are bad.
Week4
Practical for this week gives us a basic framework which is in OO style. Problem is with this framework, NYPframework cannot be used. Wasted few days keep trying to solve the error. Did everything I could. Including setting the linker and stuff in the visual studio.NET. But it still doesn't work.
Gave up on NYPframework so went online to search for bitmap loader. Found a example on NEHE website. Downloaded the example and try. It crashes my window XP. After restarting my computer, I have to re-activate windows XP. 1st Time I saw such a serious error with windows. Note to self and other team member : Do NOT download codes from NEHE. Jus copy and paste from their webpage. Just to be safe. Their program nearrly destroy my whole windows.
Other team members eventually managed to find a bitmap loader. We can now load a simple game level into the game with all those graphics. But the loader cannot load tga files. I hope we don't need anything transparent for this game project. If we need to use tga, we will have to find another texture loader.
Week 5-6
Created the in-game GUI. Now we can display Speed, Health and Endurance. Also created a function to calculate the Frames per second for our game. Was amazed that our FPS was average less than 20fps on my com. I wonder why half-life 2 have better graphics than our game yet their fps can be higher than our 20fps.
Did some optimizing with all team members. We managed to make our frame rates better by loading our graphics one time instead of loading it in every loop. Also make some function to load one time when it 1st started as its not needed to load on every frame. Also did the function to draw the bounding box for our horse and for our item box. The box should help in Collision detection.
However, my GUI now can only display everything in words and number. Everything is in words. Very dull. I want to use graphics for GUI but somehow it doesn't work. I try to render a picture of a health bar and try to paste it to screen using glOrtho and glRasterPos2d but somehow it will not be displayed. Still trying to paste some graphics on GUI... I need help. On theory, it should work... But somehow I still couldn't get graphics to work with GUI. HELP~~
Week 7
Made the bounding box to be able to disappear when u press the button "B". Also did the GUI for all 3 types of ammo. But the problem is that my GUI is still in words and number. I still cannot load graphics.
I tried loading the graphic of the bar to the gameworld and it can be displayed without any problem. But once I tried to use glOrtho and glRasterPos2d, the game will have problems. Not only does the bar is missing, it causes the other 3D models to lose their texture and change to black colour.
Wasted too much time trying to make graphic GUI. I cant find related info on the internet. Guess I have to ask other teams for help. If this problem drag on, I will become a burden to the team. Our team already got a burden. I don't want to be our team's 2nd burden.
Week8-9
Did the new GUI for the game. Still without graphics. Sad. I still don't know how to load a graphic. But managed to use [][][][][] to show our Health and Endurance bar. Help in some colli detection for the obstacle. Created the colli detection for enemy with the player. Did the function to spawn enemy horses.
Week10-11
Did the framework for AI. Created all the variables needed for the AI to work with. Created most basic function to take in all the variables needed from the gameworld. Set the different state such as aggressive, defensive & racing. Did the framework for most of the state which allows other team member to write in the function if needed. There is 10 different state so each of us might do 3 to 4 of the state.
And our team found out something shocking. Mr Lee Zhi Wei of our team does not have visual C++ at home. He claims he uses notepad to write the codes. I am extremely piss off by his working attitude. Can your notepad complie C++ codes ? I don't think so. For the whole 11 weeks he did no coding. Our team is having hard time to finish this project on time. The 3 of us keep working overtime on our codes. We do until 1am to 2am in the morning. I am going crazy soon. And the funny thing was he got the same grade as us while he did nothing at all. Since week 1 he says he will do the codes for sound and AI. Now its week 11 and he still can't give us a line of code.
Week12-13
Continue to work on the state machine. Wei kar have optimise the state machine until only 4 states are needed. It's more efficient. Created 3 functions to sense whether enemy, items and obstacles are nearby. Those 3 functions are the core functions needed to change the state.
Also completed the state for avoid obstacle. Once the AI sense the obstacle nearby and its right infront of him blocking him, it will jump over the obstacle to avoid collision with the obstacle. The shooting state is only 80% done. We can sense enemy and attack the attack. Only problem is the rate of fire. The AI can shoot more den 5 bullets per sec. Makes the handgun behave like machine gun... LOL. Going to fine tune it tomorrow in school with the rest of my team mates.
Wasted many hours debugging our game... Got some funny exit error in our game. Search the web and found the solution... We need to include some stdlib.h 1st before glut.h... Wierd error. And some careless mistake made all the angle calculation wrong... I need to cout all the values at different part of the code to check it... In the end I realise I never call the function needed to take in some value from other cpp files... Careless... And on the way I found many functions which i wrote a few weeks ago which I thought will be needed but actually is not really needed... So deleted them away. At least our game is optimised a bit more... haha...
Name: Loo Yan Long
Admin: 053305S
Week 1-2
Brainstorming of ideas. Realise that its quite a difficult project. We have to complete this game by 15 weeks. We need to consider the time limit factor while brainstorming for a game. And adding to our problems are not all of the game elements had been taught at this point of time. We haven't even learn how to load a 3D model. We decided to make a simple game 1st and adding more complex feature IF we have the time.
Week 3
Tried to do GUI for the game. Its not as easy as I thought. We learned about how to edit some word button from one of the practical. But when we try to impletement the codes on our game , it just seems to stop working. The main problem was the game framework we are using are using OO style programing with many classes whereas the practical was not written with OO style thus a lot of error came out when we try to port the codes over.
After wasting many hours on trail and error, I decided to use another method. I use codes to print out the x and y location of the mouse on screen. I save those value and hardcode them into the game. By knowing the position of the mouse, I can find out the area that the button is located and hardcode the function of the button into that area. This create a mouseover effect for the button.
Eventually I realise that games really should not be hardcoded. Because the mouse position taken in at resolution 800 X 600 is different from the mouse poistion taken at fullscreen mode so this will cause the button to malfunction in full screen mode. Hardcoding are bad.
Week4
Practical for this week gives us a basic framework which is in OO style. Problem is with this framework, NYPframework cannot be used. Wasted few days keep trying to solve the error. Did everything I could. Including setting the linker and stuff in the visual studio.NET. But it still doesn't work.
Gave up on NYPframework so went online to search for bitmap loader. Found a example on NEHE website. Downloaded the example and try. It crashes my window XP. After restarting my computer, I have to re-activate windows XP. 1st Time I saw such a serious error with windows. Note to self and other team member : Do NOT download codes from NEHE. Jus copy and paste from their webpage. Just to be safe. Their program nearrly destroy my whole windows.
Other team members eventually managed to find a bitmap loader. We can now load a simple game level into the game with all those graphics. But the loader cannot load tga files. I hope we don't need anything transparent for this game project. If we need to use tga, we will have to find another texture loader.
Week 5-6
Created the in-game GUI. Now we can display Speed, Health and Endurance. Also created a function to calculate the Frames per second for our game. Was amazed that our FPS was average less than 20fps on my com. I wonder why half-life 2 have better graphics than our game yet their fps can be higher than our 20fps.
Did some optimizing with all team members. We managed to make our frame rates better by loading our graphics one time instead of loading it in every loop. Also make some function to load one time when it 1st started as its not needed to load on every frame. Also did the function to draw the bounding box for our horse and for our item box. The box should help in Collision detection.
However, my GUI now can only display everything in words and number. Everything is in words. Very dull. I want to use graphics for GUI but somehow it doesn't work. I try to render a picture of a health bar and try to paste it to screen using glOrtho and glRasterPos2d but somehow it will not be displayed. Still trying to paste some graphics on GUI... I need help. On theory, it should work... But somehow I still couldn't get graphics to work with GUI. HELP~~
Week 7
Made the bounding box to be able to disappear when u press the button "B". Also did the GUI for all 3 types of ammo. But the problem is that my GUI is still in words and number. I still cannot load graphics.
I tried loading the graphic of the bar to the gameworld and it can be displayed without any problem. But once I tried to use glOrtho and glRasterPos2d, the game will have problems. Not only does the bar is missing, it causes the other 3D models to lose their texture and change to black colour.
Wasted too much time trying to make graphic GUI. I cant find related info on the internet. Guess I have to ask other teams for help. If this problem drag on, I will become a burden to the team. Our team already got a burden. I don't want to be our team's 2nd burden.
Week8-9
Did the new GUI for the game. Still without graphics. Sad. I still don't know how to load a graphic. But managed to use [][][][][] to show our Health and Endurance bar. Help in some colli detection for the obstacle. Created the colli detection for enemy with the player. Did the function to spawn enemy horses.
Week10-11
Did the framework for AI. Created all the variables needed for the AI to work with. Created most basic function to take in all the variables needed from the gameworld. Set the different state such as aggressive, defensive & racing. Did the framework for most of the state which allows other team member to write in the function if needed. There is 10 different state so each of us might do 3 to 4 of the state.
And our team found out something shocking. Mr Lee Zhi Wei of our team does not have visual C++ at home. He claims he uses notepad to write the codes. I am extremely piss off by his working attitude. Can your notepad complie C++ codes ? I don't think so. For the whole 11 weeks he did no coding. Our team is having hard time to finish this project on time. The 3 of us keep working overtime on our codes. We do until 1am to 2am in the morning. I am going crazy soon. And the funny thing was he got the same grade as us while he did nothing at all. Since week 1 he says he will do the codes for sound and AI. Now its week 11 and he still can't give us a line of code.
Week12-13
Continue to work on the state machine. Wei kar have optimise the state machine until only 4 states are needed. It's more efficient. Created 3 functions to sense whether enemy, items and obstacles are nearby. Those 3 functions are the core functions needed to change the state.
Also completed the state for avoid obstacle. Once the AI sense the obstacle nearby and its right infront of him blocking him, it will jump over the obstacle to avoid collision with the obstacle. The shooting state is only 80% done. We can sense enemy and attack the attack. Only problem is the rate of fire. The AI can shoot more den 5 bullets per sec. Makes the handgun behave like machine gun... LOL. Going to fine tune it tomorrow in school with the rest of my team mates.
Wasted many hours debugging our game... Got some funny exit error in our game. Search the web and found the solution... We need to include some stdlib.h 1st before glut.h... Wierd error. And some careless mistake made all the angle calculation wrong... I need to cout all the values at different part of the code to check it... In the end I realise I never call the function needed to take in some value from other cpp files... Careless... And on the way I found many functions which i wrote a few weeks ago which I thought will be needed but actually is not really needed... So deleted them away. At least our game is optimised a bit more... haha...
