DD – Design Patterns – Factory

This is an outline of the topic. I will revisit this topic latter and expand on this outline.

What are Design Patterns? They are different styles of programming to help with the constant change, modification, addition, and scrapping of features, functionality, and structure of a code base.

The Factory Pattern is one of the most commonly used (Purdy, 2002). But what is the Factory pattern, well lets find out!

The logical model.

Factory’s are an object designed to wrap the actualization if the instantiation process up inside the factory. The Client orders a Product from the Factory instead of instantiating it directly. This abstracts the client from the objects production method. This way if their is ever a need to change the production method, all other interactions remain unaffected.

The Physical Model

The implementation is commonly enacted through the creation of two abstract classes these being the AbstractProduct and the AbstractFactory and then inherting from these are the concrete classes ConcreteProduct and ConcreteFactory The reason for these two layers is that the abstract classes can be used as the interaction much like an interface, while the concrete classes are the implementation of the production method, opening up the possibility for as many concrete classes as are needed, this will also allow endless possibility for the aforementioned modifications that are often ongoing throughout development and post development of a project.

References

Purdy, D. (2002). Exploring the Factory Design Pattern. [online] Msdn.microsoft.com. Available at: https://msdn.microsoft.com/en-us/library/ee817667.aspx [Accessed 5 Mar. 2018].

Advertisements

Banksy Patrol

Banksy Patrol is a game about avoiding the authority, to upset the status quo through street art.

Check out the game here!

We had to do a video Pitch, Here is mine.

Art

I used a lot of Banksy’s work in this project, I lay no claim to any of their work. But I also made a bunch of custom art assets for this project as well, using my personal style;

I can create these assets rather quickly, as I find a silhouette that I like as a base, use Adobe Photo-shops warp tools to adjust it to my needs. Then I have two workflows depending on if the asset is for a grayscale finish or a colour finish.

The former being start with the silhouette in black, and use a soft edged brush on 1%-8% fill depending on the size and focus of the area being worked on, and I paint in the light, with #fff for the highlights, and #000 for the shadows, this gives a very high contrast, glossy, faked detail look, where they can pass for high detail assets, but they take relatively little time to produce. The quality scales well with time spent. For quick colour, you can simply use Photoshop’s colour overlay tools to add a single colour, Like I have done with the spraycan as seen above, or spot colours with masked colour overlay, this method is quick but returns a limited quality.

The later of the two workflows is a longer process for a colour version. Start with a picked colour pallet, keep the colour pallet locked and on a separate layer to avoid misrepresenting the colours through paint overs and smudges(what I call miss-click’s when painting in Photoshop) you want this layer at the top of the stack as well. You also want a #808080 or 50% grey fill of the silhouette at the bottom of the layer stack, you want to lock this layer and never touch it again. Once you are set up you want to work on the project in a number LOD(level of detail) passes. Start by block colouring the areas of the silhouette, I find using a solid colour fill and a mask makes this step easier, as you can quickly change a colours fill, without messing up the mask. Now comes the first lighting pass, you want to make a copy of the silhouette layer and put that layer above the block colours, but below the colour pallet layer. The layers lighting mode should be switched to “Overlay” this will effectively make it completely transparent, but that is what we want, next same as the grayscale workflow we want a soft edged brush on 1%-8% fill depending on the size and focus of the area being worked on, but as you work change the layers Opacity to see the colour come through, this is useful to adjust how aggressive the lighting is, I like to start out with the Opacity on 65%, but be sure to adjust it as you work, moving it up and down to help you keep perspective of the colour to light mixture. Now this is only LOD 1 so don’t worry too much on how realistic the lighting is, this is just to help you confirm the block colour on the silhouettes. Once you are happy, you want to hide top colour pallet layer and make a flat layer of everything so far, the Photoshop hotkey for this is “shift+ctrl+alt+E” then you want to continue adding detail in steps, but instead of using black and white, you want to spread the light and dark areas of colour around while using them to add detail, for this use the eye dropper, keep the fill rate very low, and work slowly, every time you are happy with a “step”, continue working on another layer up as to not ruin past work as painting with dynamic grabbed colour is destructive (cannot be reverted past the undo limit) method. Keep working and adding layers until you are happy or hit the deadline. I bet it’ll be the deadline. Happy painting!

Notes:

Thanks Sey for all the help and motivation on this project.

I’ll add pictures to better show how I do my art, later if I remember.

This project did not turn out as successful as I would have liked, and I plan on revisiting my coverage of this project on this blog when I feel I have the motivation, and time to do so. (but I make no promises)

 

APOCALYPSE FALLING

Missile Command In The Style Of Olly Moss

Parallaxing

Upon analysing Olly Moss’s work, a lot of the work is in portrait, so I have made the decision to lean into that, and lock my project to a portrait 3:2 ratio. But by making this decision the necessary width to fit the 1:3 base to city ratio, did not fit with the level of detail that I would like to achieve with the silhouette design of the missile bases and the cities that they defend. Looking into Moss’s works for inspiration to abate this issue looking at this piece in particular.

firewatch2

This piece of work has great use of depth stepped through very defined layers. I would like to take advantage of the layers by parallaxing my Bases and Cities. My first test below.

Art Mockup

I really like the result of this test, as it allowed me to discover solutions to problems that I had not even begun to think about like how the layers would affect interactions with Bases, Cities, and the missiles sent to destroy them. After what I believed a successful result in the first art test. I Decided to lean heavy into the idea of layers and create a more polished concept to better test the idea of one Base/City per layer. This is the finished concept.

Clean

I am very happy with the result, the level of detail is less than I would like in the final version, but I definitely believe that this is very representative of the final work.

Fight Mock up

Colour and Colouring.

Early on while researching ‘Missile Command’ I had decided that I wanted a Monochromatic look to lean into the dystopian mood set by the context with which the game is played, Although I had intended to use a method that I have used in previous work by making all the work grayscale and colouring through a simple post effect through the use of an overlay colour, but while discussing my ideas on the colour style that I had planned and the methought that I just described with Erika Verkaaik, a talented artist, and Photoshop wizard. Erika showed me a way of creating a much more reliable and controllable post effect that replicates the end result without affecting the clarity of the blacks and whites that come with colour overlay effects, through using Colour Balancing. Here are the Results below.

Art Mockup_OverlayVsBalance

Using this method Allows the Dark and light tones that to keep their clarity while allowing me to play with the colour as needed, this also simplifies the asset creation with grayscale assets.

Missile Trails

I wanted to make the missile trails very defined, so I used a solid black, with a puffy cloud style inspired by Vlambeer’s LUFTRAUSERS fluffy clouds as well as the fluffy clouds in the previous Firewatch example. More discussion with Erika, by her suggestion to work with the silhouette created by the clouds in the way Olly Moss often adds double meanings in his silhouette design. And the way the shadows are used in ‘Serial Experiments Lain’. Example Below.

download

So from this we added a red, not grayscale to the smoke trails. As seen below.

Art Mockup

This evolved as I created the more detailed concept, making the explosion of the defence missiles a solid circle like in the original missile command. As seen below.

Missiles Incoming.

To stop any issue with the mechanics, regardless of the layer an explosion from a defence missile will span the entire depth of the game, while the incoming missiles will target a specific base/city.

Thanks for reading.