Thursday, 4 February 2016

Unit 18 Procedural Programming - My Blue Print Lab



Introduction


In this unit we have been asked to get to grips with learning about the prinicipals of procedural programming.  In this we have been asked to design a obstacle course on for two levels, which will then lead on to creating a procedural blue print, by learning about all the aspects that are required to build a successful level.  This will include gathering initial ideas together through the form of mind maps, mood boards, and floor plans detailing what I intend to create in my level and how I would like it to play out.

Requirements of the Unit:  


  • Create a blog called My Blue Print Lab
  • Research and Blogspot information explaining the principles of procedural programming.
  • Mind Maps
  • Mood Boards
  • Plan Blue print game interaction using pseudocode
  • Level floor plan
Principles of Procedural Programming

Procedural programming is a language and what you need to communicate with the computer in terms of telling the computer what you want it to do, in a step by step basis.  This requires being very thorough when starting procedural programming code to make sure you have covered all your bases and that nothing is missing in the program code.  The programming has to be done in a straight forward very logical way or for a better term procedure, to ensure that nothing is missed when asking the program to perform its duties.  In its simpliest terms of what I can gather so far from procedural programming, what goes up must come down, and for every action there is a re-action.  http://www.ukessays.com/essays/computer-science/principles-of-procedural-programming-computer-science-essay.php

When beginning procedural programming the user is giving the program a specified task to fulfil, detailing how to do the job that it is required to do.  For example, for this unit in building a level, I will be constructing in the blue prints page of the level in UDK, and asking it to perform tasks such as move lifts, collapsing floors, or slippery surfaces, and I will have to set up the correct procedures in the blue prints page to get these features and effects to work in the level, how I have designed them to be.  By connecting everything together for example, like in the blueprints of the of the level that will be constructed, each element will connect to the other when the player sets off a trigger, then sending out a call for example a door to open, or explosion to be set off. 




When giving the program its instructions, this called an algorithm, so that it may follow its instructions in what its programmer wants it to do.  In this case setting out what will happen in the level in UDK, setting up an obstacle course, with hazards, lifts and doorways etc to all operate as they are supposed to do by design.  

It is important then to know what you are going to do before hand when doing procedural programming, otherwise there might be a chance of  making mistakes and missing elements out in the algorithm.  

Essentially, procedure programming is setting out what you intend the program to do and when to do it. Much similar mapping everything out like framework or software arctitecture  with everything in its place and knowing its job.  Everything has to have its pattern and rythem.  Once everything is set out, it is then easy for maintenance and knowing if there any problems should occur they should be easily fixable.  

For example, when creating anything like in UDK.  we add new elements or instructions to the blueprints, to let the program know, that it has a new task to fulfill.  Otherwise, if you dont add new instructions to the blueprints and so fourth, when you add a door to the level that is supposed to open when the player goes near it via a trigger, the open will just sit there looking pretty with no functionality.  The same for if adding any effects such as smoke, explosions, or wrecking ball that is uspposed to come near the player at a certain time place in the level.  Thus knowing what your doing when it comes to procedural programming is an essential and basic need.  In this case building a level.




Mind Maps



As is standard, I am trying to gather inspiration and ideas togther for my level, so I began with a couple of mind maps.  The top one more for level and terrain with elements of what obstcales or hazards could be placed in the level, whilst the lower of the two is more for obstacles and hazards.  I ahve tried to write down as many ideas as possible for terrain, obstacles, hazards etc and from there I will begin to narow down with simply what I want and what is also practical with my skill level in the here and now and thinking about time management.  Skill level and time management go hand in hand as I dont want to over comitt to something that I can't achieve just now.  So bareing this in mind, I have begun to look into multiple different terrain types i.e. countryside, urban/ industrial, artic, volcanic, desert, jungle, space/ Science fiction, as well as looking at various different obstacles and hazards that could be used in a level to make it more interesting/ Difficult for the player playing on that said level.  Granted some of these things listed in my mind maps might not be physically possible for one reason or another, that is fore me to do my reaesrch to see what 1. I am cabale of, 2. what is possible to feature in a UDK game level construction.  Right now everything is on the table.  I am tryiung to go for something that is achieveable for my skill level, do able to the given time period, as well as something that looks good to others and potential players but is alos challenging and enjoyable.  I have my work cut out!!

Mood Boards

Mood board1 Countryside: https://uk.pinterest.com/stewartmarr/level-1-greenery-woodland-forrest-countryside/ 




With my mood boards I have catorgorised them into different terrain elemenst I have been looking into for ideas. Although it has been mostly looking at terrain for the level, I have also made notes/ comments under the pictures to what I think might be good as pathways, roads, obstacles, hazards or tools to help or kill the player.  From what I have already seen and done in UDK so far, this moodboards simple ideas seem quite achievable, and triggers could be set up on various things to again aide the player or cause a obstacle or hazard.  For example with this falling trees and rivers could be a hazard or the rivers could have to be navigated in some fashion whilst not falling into the river.  Signposts could be checkpoints, bridges could collapse, and a trre house could be the objective.

Mood Board 2, Desert: https://uk.pinterest.com/stewartmarr/level-2-desert/



  
With this mood board, I thought more about a desert level.  Remote, harsh enviroement where not much can survive, dangers of falling rocks and bolders, dangerous creatures i.e. snakes lying in wait, dangerous plants, i.e. poisonous caktus's, checkpoints, can be sihgnposts again, roads can be for survival back to civilization, a random old abandoned house can be the objective, maybe even throw in (if possible) some wreckage in one form or another for a secret place or objective again.  Like the countryside idea, it seems pretty straight forward and feasible.  However, It might seem to simple. Same with the countryside level, so I might need to develop something that if I choose either one of these ideas that makes them stand out and become difficult, eye catching and interesting all in one.  Entertaining to some up.  

Mood board 3, Artic: https://uk.pinterest.com/stewartmarr/level-3-icefrozen-antartic/ 





 This mood board I have gone for a ice/ Arctic feel.  Like the desert, a dangerous hazards enviroment that one must survive in but not much or anything to live off.  Survival of the fittest.  So continuing the theme of not just looking at the terrain but how I can turn elements of the terrain in obstacles and hazards.  Slippery ice for speed, or will the ice crack underneath the players feet after a set period of time?  Sharp falling frozen ice that will fall on  the player once triggered and impale the player to the ground if they don't move fast enough, or setting up rocks of frozen ice which again give way aftyer a period of time if the player doesn't move fast enough.  Giant snowballs, landslides surely to send anyone to their maker.  Also, looking how an ice cave could be the objective and frozen river or log cabin could be a checkpoint.  For me, this level idea has a grander vision than the others so far, but all still very much the same in a lot of elements.  As I have said, I need to see what I can achieve in UDK to make my vision a reality.  Depending on which vision I choose! Ha! 

Mood board 4, Volcano: https://uk.pinterest.com/stewartmarr/level-4-volcanic/



Obviously, this time I have looked at a more volitile, hostile enviroment for a level.  Where the player would have to avoid the volcano spitting ash and lava, and rivers of lava, occasionally maybe a few bolts of random lightening that player might set off un-wittingly.  Added with effects of smoke and steam with the occasional volcaic explosion just for good measure.  In some ways, I could mix one of the other terrains in with the volcano.  Maybe more the green  and artic level.  Whilst trying to avoid the hazards of the volcano, the volcano could be the objective in a perverse sense of irony.  Maybe like Lord of the rings, the player has to get to the top of mountain/ Volcano.  More food for thought.  This might depend more on my skill level and time management in implementing what I want on the level for obstacles and hazards as well as looking good.

Level 5, Urban/ Industrial:    https://uk.pinterest.com/stewartmarr/level-5-urban-industrial/




With this level, I thought about a urban scene, either a lively city enviroemnt or a more battered run down twon/ factory/ warehouse.  Collapsing floors, like collapsing ice prevsiously, swinging girders or other falling objects that the player must avoid to survive, maybe even some booby traps, sentry guns, mines etc.  I also added a couple images of doors, stairways and lifts again for design ideas.  Again doorways could be the objective for one place or another and maybe the lift could be the checkpoint, maybe even adding random signposts.  This might have a lot more detail involved in building the level to a decent sucessful standard that I would want.  So its whether i could do it in time with my novice skill level, or could be a watered down version.  There are elemenst that I have already discussed for the other levels that could be transferred into this one or vice versa, depending on what I choose.

Mood board 6, Jungle:  https://uk.pinterest.com/stewartmarr/level-6-jungle/



Back to a natural hostile enviroment.  Inspired by Indiana Jones, and thoughts of Vietnam war films.  Similar thoughts of using the terrain as part of the obstacles and hazards. Dangerous plants, sinking swamps the player can't enert otherwise certain death, abandoned temples as objectives or checkpoints.  Collapsing bridges, even other tools to simulate a replacement for a rope swing as well as slides that could send the player back to beginning.  Snakes and ladders springs to mind, (board game).  As well as ading other hazards or obstacles to keep things interesting that arn't native to the jungle.  Like the city idea, a bit more to it in terms of terrain.  Again, I need to see what is achievable for me at this skill and what can be done in the given timescale.  Also, what UDK can and can not do in terms of features and terrain.  I might not be able to have a pit of snakes or a ranom sentry gun shooting at the player.  
Mood board 7, Space/ Science Fiction:   https://uk.pinterest.com/stewartmarr/level-7-space-sci-fi/


This time looking at space/ science fiction influence level.  Another hostile enviroment, (surprise, surprise!)  This is quite a vast area that could be used for a level, and just in the obvious way being space! Meaning more in terms, it could on a asteriod, moon, space station, space ship, alien world.  Even a futurisitc city on earth, a colony or alien world.  Adding crashed or not crashed space ships for checkpoint or objectives, as part of obstacles and so on.  The ideas and potential are quite vast.  Should I go with this idea, I would be temted to do another mood board or two, to narrow down my exact vision on what I would want the level to look like.  A lot of the previous thing I have mentioned on the other mood boards could be used on this level, including maybe more man made non natural onstacles and hazards that I would have used on other level ideas, guns, knives etc that could be done here.  Again, constraints are, my skill level, time, also adding this time, a certain amount of leeway should things not go according to plan and might take longer to complete.





This moodboard is more of a generic moodboard, ideas for obstacles, hazards, lifts, stairways etc for implentation on which ever terrain level I choose to do.  As you can see I've looked at many different elements and ways of killing or harming a player! ha! Getting inspiration from Indiana Jones, the news in general, obstacle courses and basic training for the military, as well as James Bond and the James Bond game Goldeneye for the N64.  The idea, just to get as many ideas as possible for hazards and obstacles to be used on the level.  Wrecking balls, axes, knives, guns, remote sentrys, bolts of lightening, lava, water, bolders, tunnels, slides, flamethrowers etc etc.  It will be a case of adding what again, I can achieve, I ahve time for, but also what is suitable and fits into the enviroment and terrain I eventually choose to go with.  Again, like the previous mood board, I could end up doing another mood board just to narrow down on what ideas I have finnaly chosen.





I came up with the idea for a temple level once I started looking at the obstacle and hazard mood board, as I was inspired by Indiana Jones and James Bond N64 Goldeneye as well as other Jmaes Bond films.  player would have to navigate their way through the temples mazes without getting killed to see the light of day again.  Elements of the temple could be used as obstacles and hazards whilst like previously using non native elements thrown in the mix to cause more issues for the player on the level.  Very grand idea, just depends on skill level and time to achieve what I want out the level to an acceptable standard.  
Floorplan idea




 A very basic and simple idea so far for a floorplan for a level.  Both images are of the same level, I wasn't sure which would come out better after the camera shots.  I am not a 100% sure on what the level terrain will be or from there what obstacles and hazards will be in the level at this point, I have just done a simple, and tried to do a generic level that might a good basis and cross over point and can be changed as the project goes on and my skills improve.  Starting point, then moving over a bridge, proceeding on to a doorway/ Gateway checkpoint.  Player being forced to cross a pit of death, either empty, full of snakes or spikes.  Player proceeds then a collapsing floor the player needs to navigate over otherwise if falls through floor, player dies.  Then has to dodge a hole in the ground that will send them back to the beginning of the level.  Then player will have to cross a stream , leaping from rock to rock without falling in otherwise player will die.  Also rocks sink after a time period and rocks a re spread out reasonably to be difficult.  Player proceed to end of level but before objective has to jump another pit of death, snakes or spikes, the end.  Very basic as I said.  Straight away I need more hazards & obstacles at the beginning.  I should also move the tunnel before the checkpoint to back to the beginning and moving the checkpoint further up the level to be more challenging and make more sense.  Also make the objective something than just writing objective at the end.  So a lot of food for thought, with a lot of research and development required!!  Once I 've decided on a terrain, I'm sure I'll be changing things again and designing a level with hazards and obstacles more suitable to that terrain. 

Pseudo Code

Pseudo code can be simply described as instructions to plan out programs, rather than being a language to program.   Algorithms are usually written in Pseudo code and are to be understood be the user rather than by a computer.  Flowcharts are usually the easiest way of relaying the information of pdeudo code by using simples to relay the information most accuratly.





Above examples used from tutorial pdf example.





Screenshots


Layout of level.  Starting from bottom right hand corner, working your way through the maze to the bottom left hand corner.



As you can see, the collision surrounding the switches and the doors, as well as the lift, jump pad and the ragdoll zone.



First door activation switch.  Press E to open door.


Door opens.


Second switch.  Press E to activate and reveal another switch which will open second door.


Secret switch to open second door.


Second door opens.


Switch to activate lift.


Lift activated.


Jump pad.


Ragdoll collosion zone.


Re-spawn point.

Teleport


I also added a teleport and a another door.  I did this to the part of the level that was not being used but I had originally wanted to use but as it turned out until now, had not.  I added a teleport point at the top of the stairs which would then teleport the player to the other side of the level, similar to where the jump pad and lift directed the player to.  This, as stated used up more of the level, and forced the player to move back round to the centre.  






Here you can see the target point for the teleport, and I then added a extra door and switch to add an extra obstacle in order for the player to get back round to the main point in the centre.  As you can see below are the blueprints for the teleport and the switch and door.  I eventually got the door to work as before by using a cube and shaping it appropriately, and then getting the matinee sequence to work correctly.  This could be awkward but manged to work in the end.  Just a case of following the correct sequence through and remembering the correct sequence in order for the door and switch to function.  The key for the teleport's success, was to make I had the right co-ordinates for the player to re-emerge on the other side of the level.  Co-ordinates are provided at the right of the screen once you place the target on the spot you want, its just a case of entering the co-ordinates in the blueprints on the dest. location as can be seen below.




Here is the finished product.  


Evaluation


For this unit, we were asked to design and develop a level(s) for the unreal tournament.  The level(s) would have obstacles and traps etc to provide the player with a level of difficulty in order to complete the level.  The level could be set out how we chose, in any environment and using different assets.  With this, we also had to show our understanding and knowledge of pseudo code and how to get the traps etc to work by implementing their purposes in the blueprints area in unreal.  We also began research on pseudo code in how it works, so before we began work on the level in unreal tournament, we would have a basic understanding of how it worked and how we could improve our level, skills and problem solving that would mostly likely occur during the level construction in the blueprints.

After getting to know how things work in the blueprints area worked in getting the traps, doors and lifts etc to work on the level, we began to gather ideas in the form mind maps and mood boards in putting our thoughts together for the level.  For the mood boards this was mostly done through Pinterest.  I decided to try putting together as many ideas as possible that came to mind for the level.  Which was quite a lot.  After the mind mapping and mood boards were complete, it was a case of narrowing down what I wanted my level to look like and what obstacles and traps etc I wanted in the level.  As doing a sketches on how we wanted our levels to look like, top down drawings of where traps, doors etc would be place, checkpoints, re-spawn points and start and finish areas.

This first part of the unit was very straight forward, pleasurable, dare I say easy.  However, I soon became unstuck once the level construction began.  The pseudo code and blueprints ending up becoming very overwhelming to the point of much anger and frustration.   As always.  Sadly, from this point I tried to keep the level as basic as possible.  A simple maze for the player to follow around.  My main focus at this point was to get the doors, switches, lifts etc working.  Eventually, once doing it enough, the blueprints were beginning to make more sense.  Although there is not much sense to the level, everything does work which is a good start. 

Although I am satisfied with the fact I have been able to get elements working in the level, I feel I have left myself down by letting my anger and frustration get the better of me, when I have could have added more traps etc, as well as develop the landscape of the level to one of the ideas I had in my original mood boards.  As it stands, I do not think what I have done is much of a level, however I am the one responsible.  Moving for new projects, would be to be prepared but staying calm, and finding a solution or a better balance.  

No comments:

Post a Comment