Visual Simulation

Case 1- 2,5

Joakim Fossan:(group 10)
Focused on: I focused a lot on doing things in phases. First i tried adding background and character, then movement to the character, then npc etc.
Problems: I had a few problems, the worst was when the maincharacter didn't move, and no one found the problem. Due to this we had to recreate the code (Trym did the most of the work here).

Trym Bendik D. Hjermstad: (animation, group 10)
Due to some problems with the script of Joakim and lack of meeting on time within the group, it made us have a bad start at solving of the cases. Then we found out that it would be easier if I did the most of the scripting for group 10. The reason for this was that we felt that we needed to get the animations and objects drawn and added to the game, and chose to spend a week where we focused on this task, as we were a bit behind our work schedule.
What I've done so far:
I had a rather complete script from the cases last semester, so I just this as a starting point for the new flash game. One of the main problems i met in the scripting was a "invisible" argument error, and that flash didn't check if the SWF-file had built the stage before the contructor was done. Besides that I also had a problem with the attack animation, as it didn't play all the frames when the attack button was pressed down. Still working on getting the Level manager in order, and put all the scenes into the level manager.


Bjørnar Dervo (group 7)
The first question I asked for this project was: How advanced am I able to script? The theme/idea about what the game was going to be about was formed from what I believed I would be able to script. I believed that I could manage to script a hero defense game, but with a normal arcade game as backup. I made a box version of the game and put in a version of the lord. Afterwards I worked on making the NPCs AI (Artificial Intelligence). Since this is going to be a hero defence, it was wished that the enemy doesn't aimlessly wander and stands crashing into objects. I spent a lot of time on the contruction of the AI, and after three versions, a version for the beast npcs were done. In other words: I made each npc class gain "will". When an enemy meets a problem, I called it a "waypoint", then questions were activated: "Should I go on, or try to avoid the waypoint problem?". The question led to a yes/no answer, and this answer decided what the enemy was going to do. Regarding where the npc is standing, it could also receive several question, for instance if it's on ground level and such.
I also worked with a spawningsystem, where the enemy come in waves. This will be more developed in case 2.

Case 2

Bjørnar Dervo
The first focus here was to get a proper structure in the files. I decided that I didn't wish to let the levelmanager decide which of the levels that was going to be active. This would be decided by a file which received info about what level it would create, and then load the information from other files. This is method for making it easier for the game(if we add many levels), to get information to the different levels. - Instead of making it so that each level has its own scriptfile. I'm going to use the levelmanager to choose between the menu, cut scene and levelfile. A problem I faced this case was to script through nearly the whole week, without compiling the scipts. This lead to that I sat for several days trying to correct the different errors, and I could no longer show an expanded content in relation to case 1.

Case 3

Bjørnar Dervo - Captn_B
It was first in this case that I implemented the level manager which was a requirement to start on at case 2. Though I did start on creating another type of Level manager system in case 2, so I would say we still met the requirements. After this I started trying to get more of the different files/classes to connect and share information between them. I've made a menu system based on the array command function. The menu made an array out objects, and according to which menu that is active and which button pressed, a commando will be activated. Due to this menu system, I can easily expand it with up to 9 buttons on each menu.
During these cases, I've had two big problems(and many minor ones), and both of the big ones showed up in case 3. The first big problem was that items/objects didn't manage to be put on stage, then I added a stage-parameter which tells the which stage the object is to be added to. After this I got an error which said that "stage" didn't exist at all, and after much research on various forums, I concluded that a lot had to be changed. For example: I had forgotten to add the "super" function which sends information between the stages. Problem fixed and that part put on hold. Next I had to create a new sidefunction which added objects to the stage, and then implement this function into the mainfunction. I don't really know the logic behind that, as in actionscript 2.0, the mainfuction would have been enough, but it apparently isn't in 3.0.
My second big problem which I spent awfully amounts of time at was the loading of the levels. I had misunderstood the meaning/and use of the "extends" function, hence making all the objects on the stage extend the level file. So in theory: when file "A" extends file "B", then the file B is created anew due to the extension. This I didn't know then, and made the mistake of creating file "A" inside of file "B", which lead to an endless loop, causing the files(and flash) to crash. Remi from the class helped me with this problem, but aside from that, I've mainly written everything myself by searching on the net and reading scripting books.

case 4

Bjørnar Dervo
The game demo that we handed in after case 3 had a lot of bugs so before starting on the cases that were given, I focused on fixing these bugs. After the bugs were fixed, I started learning about adding sound to the game. I've never worked with sounds in scripting before, so understanding the functions became a challange. Our scripting teacher couldn't help us regarding adding more sound channels (one for various sounds and one for background music), so we had to find out for ourselves. My solution to this was to create a soundmanager as file, and a scipt file that handled one sound each. I'm guessing this isn't the best method to do it, but it atleast got it done.

case 5

Bjørnar Dervo
Fixed some more bugs, and added a few functions that we originally wanted from the beginning. I've added boss scripts, making them more unique than regular NPCs. I've also fixed a bit on the NPC's AI scripts, giving them more uniqueness and making them able to take different paths in game. I've created two different NPC scripts, one where the NPCs will go for the cake and ignore the player, and vice versa. All the bosses will be targeting the player instead of the cake.

Through all these cases I've mostly relied upon books and various internet sites for learning.
Here's a list of the books I've used and found very useful:
- "Learning ActionScript 3.0 - A beginner's guide" by Rich Shupe with Zevan Rosser
- "Essential ActionScript 3.0" by Colin Moock
- "Object-Oriented ActionScript 3.0" by Peter Elst, Sas Jacobs and Todd Yard.
Regarding the webpages I just searched for my problem on google, and found various forums where those questions had already been asked, and answered by someone else.
I would have liked to receive more help from our programming teacher, but he was hardly at school when he was needed (and supposed to be in his office).