søndag 8. november 2009

Case 8 Report

Case 8 has now come to an end. The problem this time was adding objects to the game that the main character can pick up, as well as objects to avoid. Making a timer, as well as a point system, was also part of the case.

The main new things introduced in this case were arrays, and the "for" loop.

This week started off like the previous one, with the exception that everyone in the group showed what they had done to the others on Monday (this might have been done for case 7 too, though I can't remember it). Still, everyone sort of did their own thing after the initial meeting, instead of looking more at each other's work, and trying to help those who find this hard out. In my opinion, there could be at least a few changes here, as people in the group, myself included, seems a bit self-centered, and afraid to ask the others for help. It is generally very quiet every Monday. If this is because everyone understands everything they need to, then everything is fine. However, this is undoubtedly not the case for everyone. Of course, it is hard to know exactly what to do at the start of each case, but even just throwing some ideas out there for each other on what to do, and how to do it, would probably be of great help to anyone who does not have any idea where to start. In addition, it could be a great thing for the ones who already know where to begin to get some alternative input.

In the end, nothing was done this Monday on my part. In the lab that Thursday, the instructors had a very good presentation and introduction to Arrays and the for loop. These things probably made a lot more sense to many after this lab, at least it helped clear things up for me. However, there was still nothing done on my part to complete the case, even after that great lab session.

That Friday, however, there was finally some progress made on the case. After having briefly examined one of the examples uploaded to Fronter, the case was completed with relative ease. Most of it was done in about ten minutes, which really goes to prove that, once it makes sense, the Arrays and the for loop are among the easiest, and perhaps most logical things to do in ActionScript 3.0 that we have learned yet. It was not neccesary to read any tutorials or even the Beginner's Guide after reading the example, as it all made perfect sense after the lab on Thursday.

As for the case itself, there was made two different arrays for the objects that are to be picked up, so that there would be possible to implement two different types of objects to pick up. One for the point system, and one for the health system that was developed during the case. As for the objects to avoid, the enemy has been coded to work in conjunction with the health system, basically taking one hitpoint each time the main character hits it. The health object then refills one hitpoint as long as the hitpoint gauge is not full. If the gauge is full, the object is simply picked up and removed from the stage without doing anything. Even though it is technically a part of case 9, some sounds have already been coded in, as I learned a way of doing it from my dad a while ago. After careful consideration, a timer was not implemented. In its place, my dad helped me make a function for displaying a constantly updating framerate, which shows the framerate the game is running in at all times. This helps quite a lot in testing lag in the game.
On a side note, the graphics were almost totally remade for this case. See previous post for a link to the current version of the game.

Upon completion of the case, I realized that, for me, this has probably been the easiest case yet. This is undoubtedly closely related to a growing understanding for coding in ActionScript 3.0, and an above average amount of interest for the subject. The final two cases are highly anticipated.

1 kommentar:

  1. Veldig god og utfyllende blogg.
    Det ble prøvd forklart om arrays på mandag. Jeg prøver også å få dere til å komme med ideer og løsningsforslag, men det er litt vanskelig å få en respons. Dette er noe jeg burde finne en løsning på. Du har rett i at det er viktig å finne ut av hvem som ikke får det til og skaffe disse hjelp. Er kanskje lettere å snakke med alle individuelt i steden for å prøve å ta det i plenum.

    Fy for å ikke være med i timen i dag btw >.<

    Men du har lagt ut spillet og det fungerer bra. Liker måten du har løst ting på.

    Godkjent

    SvarSlett