Another week, another topic, we are moving through reasonably fast, there is a lot to learn still before we focus more on the Designer’s games which they will present to us on Tuesday this week coming.
Tuesday’s lesson we were reminded of an optimisation method called Object Pooling. I didn’t recognise the name at first, but then as soon as Anthony (oh yeah, Anthony is our Programming Facilitator this trimester) started talking about a way of not having to instantiate a new object every time we need it and then delete it when it is not used anymore, everything came back to me. I remembered all of it from back in Scripting 1 with James Bowling. Again, we were given a UML Class diagram which would lead us in the right direction when implementing an Object Pool, but we were also instructed to first write a ‘story’ of what an object pool would do and what would happen for it to be called etc, basically a game loop for a system, then we were to create our own Class diagrams to implement this based on the story we wrote, picking out possible fields and methods that may exist based on our story.
We were asked to create a Breakout clone on Wednesday for Thursday’s class, and were also asked to integrate the Object Pool we wrote into our little game we had been creating last week. The Breakout clone went wonderful, I couldn’t have asked for it to go any better, except in class 3 bugs appeared whilst I was showing it off, which I never saw, but they weren’t game-breaking bugs, so over the weekend I fixed them.
Thursday’s class was focussed on building a level from a CSV file. I have messed with CSV stuff previously, the most I did would have been last trimester when helping Gareth and Toby in their second game brief when importing musical notes. That was reasonably simplistic, it used Unity’s simplified methods of importing and splitting a CSV. The way we did it on Thursday was way harder, but it made a lot of sense how it was done, not like the way I implemented it last trimester. We worked on importing bricks into our Breakout clones instead of manually placing them ourselves. I had two problems by the end of the lessons still though, where the bricks would spawn on the same X location but the Y-axis was fine, and the other problem was the bricks wanted to start spawning from 0,0, not the spawn location I wanted them to start from. Both issues were fixed on Friday, reasonably easily, I think it was just getting too late on Thursday, as it was at the end of our 6-hour day, which starts at 3pm and ends at 9pm.
We were instructed to improve our Object Pools over the weekend, as at it’s current state, it only supports one type of object, and it needs to support holding multiple objects in the pool. I haven’t done this yet, but I plan to do it tomorrow.
This is Daniel Jochem, signing out.