PlayStation 2 (September 2011 - December 2012)
In the second and third year of study at Abertay University, I worked on creating applications for the Sony PlayStation 2 (PS2) console.
The University possessed Linux dev kits and used these to help teach us about console development as well as hardware architecture.
One of the first things I made on the PS2 was a game where you control a slingshot and release to fire a ball from the centre of the screen. Gravity acts towards the centre so the ball always comes back and you have to use this to hit points. Later levels then introduce obstacles that take a certain amount of damage, which is displayed via their colour (green = full health, red = nearly destroyed). It was a neat little game and allowed me to put into practice what we were learning at the time regarding matrix transforms, most notable of which was rotation.
Next we had to extend what we'd learnt to allow us to create a pseudo 3D game. That of course leaves itself to interpretation; some people made games using the method utilised in Doom and Wolfenstein, others created isometric games. I went with scaling based on perspective. Having the game simulate 3D meant that sprites no longer sat at the same depth and so their rendering order was important. So I put the sprites in arrays to be ordered each from based on their depth. The game I was creating was a racing game, based on the PodRacing in Star Wars (please don't sue me George/Walt). I added very basic AI racers and the game was actually pretty fun. What I realised however was that I knew the racer order (because it was their render order) and thus, I was able to have a real-time leader board. I thought this was pretty cool. I added other extras as well; the player had a top speed but could go faster than this. If they did, their engine would begin to overheat, which was represented by it going redder. There was also health bars for each of the two engines; when overheating, they deteriorate so never return to 100% health. They also can be smashed by on coming obstacles - which I added to bring more of a challenge to the race for it was a straight line race. I also added a timer, which would allow for a "score" at the end. I only knew how to make it work in seconds and so, to get the extra precision, I added a random number to the end of the text. This meant that each frame a number appeared and it would appear so quickly that to the average observer, it was counting with high precision. So technically, you could beat a time by a few milliseconds, but the game might end up informing you that you were unfortunately slower than you actually were.
I put so much into this game. I worked late hours, determined to make as good of an application as I possibly could. It was the first time I'd felt capable. I'm fiercely self critical, but it means that I know when work I produce is of a sufficient quality. I knew this was a good game and this was only confirmed by people from years above complimenting the game. Below is a screen capture from the game running on the PlaySation 2. Click the image to be taken to my video on Vimeo of gameplay. There was sound implemented; I actually had the raw buffer altered so that I could introduce distance based volume. Unfortunately, this didn't get preserved on the capture.
The University possessed Linux dev kits and used these to help teach us about console development as well as hardware architecture.
One of the first things I made on the PS2 was a game where you control a slingshot and release to fire a ball from the centre of the screen. Gravity acts towards the centre so the ball always comes back and you have to use this to hit points. Later levels then introduce obstacles that take a certain amount of damage, which is displayed via their colour (green = full health, red = nearly destroyed). It was a neat little game and allowed me to put into practice what we were learning at the time regarding matrix transforms, most notable of which was rotation.
Next we had to extend what we'd learnt to allow us to create a pseudo 3D game. That of course leaves itself to interpretation; some people made games using the method utilised in Doom and Wolfenstein, others created isometric games. I went with scaling based on perspective. Having the game simulate 3D meant that sprites no longer sat at the same depth and so their rendering order was important. So I put the sprites in arrays to be ordered each from based on their depth. The game I was creating was a racing game, based on the PodRacing in Star Wars (please don't sue me George/Walt). I added very basic AI racers and the game was actually pretty fun. What I realised however was that I knew the racer order (because it was their render order) and thus, I was able to have a real-time leader board. I thought this was pretty cool. I added other extras as well; the player had a top speed but could go faster than this. If they did, their engine would begin to overheat, which was represented by it going redder. There was also health bars for each of the two engines; when overheating, they deteriorate so never return to 100% health. They also can be smashed by on coming obstacles - which I added to bring more of a challenge to the race for it was a straight line race. I also added a timer, which would allow for a "score" at the end. I only knew how to make it work in seconds and so, to get the extra precision, I added a random number to the end of the text. This meant that each frame a number appeared and it would appear so quickly that to the average observer, it was counting with high precision. So technically, you could beat a time by a few milliseconds, but the game might end up informing you that you were unfortunately slower than you actually were.
I put so much into this game. I worked late hours, determined to make as good of an application as I possibly could. It was the first time I'd felt capable. I'm fiercely self critical, but it means that I know when work I produce is of a sufficient quality. I knew this was a good game and this was only confirmed by people from years above complimenting the game. Below is a screen capture from the game running on the PlaySation 2. Click the image to be taken to my video on Vimeo of gameplay. There was sound implemented; I actually had the raw buffer altered so that I could introduce distance based volume. Unfortunately, this didn't get preserved on the capture.
That takes us to the end of year 2. In third year, we revisited the PlayStation 2 to explore the programmable pipeline. Up until that point, we had been dealing with the fixed function pipeline. The PS2 was a good learning platform for this due to it's architectural design with the multiple paths to rendering. With the help of the lecturer, we were able to create an efficient manner of packing instructions for rendering. The other introduction provided was the shaders that are introduced through the programmable pipeline. While the PS2 doesn't support shaders specifically, we were able to learn the various steps that are now associated with shaders. This was my initial introduction to graphics programming and I loved it. I was able to directly control how things looked on screen. I pushed myself once more to try and create a really good looking application on the PlayStation 2. Taking in my low level of skill at the time, what I ended up with wasn't too bad:
I managed to implement not only a point light, but a specular reflection as well to create the effect you see with the moon/sun on the sea. I actually ran out of time as I was planning on rendering the moon without lighting so that it would glow. My understanding on how to calculate normals was in it's infancy at this time and as such, the wave's shading is a convenient coincidence. I can't remember quite how I went about calculating the shading, but I do remember that it wasn't correct, but as I had it set up, it looked correct. As I saw it, if it looks as it should, then there was no need to make it work. The application was rather neat, using sine waves based on time, I was able to create a rather nice uniform sea demo. As can be seen by the onscreen text, the waves were adjustable, they could be scaled in frequency as well as amplitude. I carried on my learning of graphics programming as I moved on into the world of procedural programming which can be followed on from my Honours Project section.
What did I actually do?
Using PlayStation 2 Linux development kits, I was able to build on top of provided frameworks to create applications that took advantage of various features of the console such as interaction through the gamepad and the ability to use a programmable pipeline. The most notable application I created was my pseudo 3D racing game that had a large amount of features that came together to make a rather enjoyable game.