All posts by Mr Stratton

Computing teacher and a PT at Coltness High School.

Computer Graphics

Well Crysis 2 is out and it gives me a chance to talk some more about resolution and graphic quality. The video below shows the same levels on a PC and 360. The video has been captured in HD from both sources and can be best seen if maximised to full screen (make sure to turn up the quality to see the differences). Pay attention not just to the level of detail on both platforms but also to the background, everything in a game needs to be rendered in real time by the CPU & GPU. Could it be that the 360 is starting to show its age?

WARNING Youtube videos, comments and posts often contain unsuitable language and material that may be age sensitive. They are out with the school’s control and should be viewed with caution.

[kml_flashembed movie="http://www.youtube.com/v/7Gj6fgnMvQw" width="425" height="344" allowfullscreen="true" fvars="fs=1" /]

How Stuff Works!

I was using Stumble Upon tonight when I came across the this site explaining how caching works.

It has a good explanation of how a cache works but the rest of the site is a little goldmine of videos and explanations. Take for example part of Tuesday’s lesson on scanners or Wednesday’s image type lesson.

When you are creating blog posts of lessons in the future, use the tools at your fingertips and search and research the topic more, rather than just relying on what you remembered from the day. Take this video as an example

WARNING Youtube videos, comments and posts often contain unsuitable language and material that may be age sensitive. They are out with the school’s control and should be viewed with caution.

[kml_flashembed movie=”http://www.youtube.com/v/vJG698U2Mvo” width=”425″ height=”344″ allowfullscreen=”true” fvars=”fs=1″ /]

A lesson is a lot like that, you will pick the bits that you think are important but you need to remember that there is a lot in there you must read up on later.

Data Flow in Programs

There is a lot of confusion over input and output (ByVal/ByRef).

Consider the following example.

Write a program using procedures that gets 2 numbers, adds them together before displaying the answer.

Structure diagram

Algorithm

1. Get 2 numbers

    Out NumA, NumB

    2. Add the numbers together

      In NumA, NumB

      Out Sum

      3. Display the answer

      In Sum

      Code

      Private Sub Main()

      Dim NumA as Integer

      Dim NumB as Integer

      Dim NumSum as Integer

      Call GetTwoNumbers(NumA,NumB)

      Call AddTwoNumbers(NumA,Numb,NumSum)

      Call DisplayAnswer(NumSum)

      End Sub

      Private Sub GetTwoNumbers(ByRef NumA as Integer, ByRef NumB as Integer)

      NumA=inputbox(“Please enter the first number”)

      NumB=inputbox(“Please enter the second number”)

      End Sub

      Private Sub AddTwoNumbers(ByVal NumA as Integer, byVal NumB as Integer, ByRef NumSum as Integer)

      NumSum=NumA+NumB

      End Sub

      Private Sub DisplayAnswer(ByVal NumSum as Integer)

      Msgbox(“The sum of the two numbers is “ & NumSum)

      End Sub

      Kodu and BYOB Scratch

      At the end of the period today I was showing the class Kodu. You can program it with either a 360 controller or keyboard and mouse, the controller is easier in my opinion.

      BYOB is a modified version of scratch that may make it possible to use scratch in higher in years to come. Google have also used a modified version of scratch for their phone development software it’s called Google App Inventor.

      I had a look at becoming an iOS developer, I’ll let you know how that goes. I want it less for developing paid for apps and more for using in class in the future. However, I am not sure if we will have to pay to use it or if we only have to pay if we want to place the software on the app store. Comment if you know.