Sunday, 29 November 2015

Low Level Programming Sessions Summary 10, 29th November

Low Level Programming Sessions Summary 10

29th November

This session we recapped on the factory software pattern which is again, simply a way of creating a lot of objects quickly. It's a switch statement which returns a type value, which may be useful for the snake coursework if I could figure snake out that is.

We learned about the observer design pattern which seems similar to an event system that is used by the Unreal 4 development tools that we have been using. They are essentially classes which look out for events happening in other classes and then take that data to do something. They seem to be very but an 'fire and react' system. There is a trigger, and then something that happens as a result of that. These kinds of events are called announcements and can be done to reduce coupling. This can be done as an enum so that the whole system knows about the announcement. The problem with these event systems is there is a lot of overhead at runtime and can cause the game to stutter or lag.

We talked a little about linked lists to be used instead of a vector for storage. We can use the concept of node objects to speed up access time. I think a linked list seems like a good way to go, the GEA coursework seems to utilise them. However, I could just be talking crap. I'm not really sure what the benefits of using either are. A list... I think... can store things of different types, which would be very good. I think this might be applicable to the coursework, if I could figure that portion of the coursework out, which I can't.

We talked about the component pattern, which is what Unity uses for it's gameobjects as far as I know. Each individual part of the code base is broken up into 'components'. A player might have an audio component and a graphics component. Seems kind of complicated, but makes sense in a way. Would be easier to work with I imagine, but also more complicated because one would have to manage all the dependencies.

We also talked about the type pattern which is a flexible way of creating new classes by creating a single class and then creating instances from this as different types. This is mostly useful when creating lots of different 'types' of the same thing, like varieties of monster. I imagine the total war games must utilise this somehow to create a base troop type, and then vary that troop type ever so slightly in a whole unit to create a more realistic looking group of soldiers rather than simple clones. 

Overall these lectures are okay, but I'm very worried about simply passing this module. I've been trying my best with the assignment, but I'm having a hell of a time of it. I was told that I could come into this course and not know any programming at all, so I've only been doing it for a year. 

No comments:

Post a Comment