\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{Jonathan\_Walsh1999} \pdfinfo{ /Title (games-dev-2.pdf) /Creator (Cheatography) /Author (Jonathan\_Walsh1999) /Subject (Games Dev 2 Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{A3A3A3} \definecolor{LightBackground}{HTML}{F3F3F3} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Games Dev 2 Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Jonathan\_Walsh1999} via \textcolor{DarkBackground}{\uline{cheatography.com/81859/cs/22597/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}Jonathan\_Walsh1999 \\ \uline{cheatography.com/jonathan-walsh1999} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 3rd May, 2020.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{3} \begin{tabularx}{5.377cm}{x{1.9908 cm} x{2.9862 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Influence Map}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Influence Map}} & Way of viewing the distribution of control over a map. \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} & Grid out the world and provide a numerical estimate of the influence of every unit on the cell it is in and its neighhbouring cells. \tn % Row Count 9 (+ 6) % Row 2 \SetRowColor{LightBackground} & Influence diminishes over distance. \tn % Row Count 11 (+ 2) % Row 3 \SetRowColor{white} & The influence of all units in the game are summed in order to generate an influence map which is a representation of influence and location which can be used for strategic analysis. \tn % Row Count 19 (+ 8) % Row 4 \SetRowColor{LightBackground} & An example can be using the euclidean distance to calculate influence on each square/cell. influence = 0.5\textasciicircum{}distance\textasciicircum{} \tn % Row Count 24 (+ 5) % Row 5 \SetRowColor{white} & Calculation is done for every unit with positive values used for friendly units and negative for enemies. \tn % Row Count 29 (+ 5) % Row 6 \SetRowColor{LightBackground} {\bf{Front line}} & Line that can be traces at the edge of positive and negative cells. \tn % Row Count 32 (+ 3) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.9908 cm} x{2.9862 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Influence Map (cont)}} \tn % Row 7 \SetRowColor{LightBackground} {\bf{Concentration of forces}} & The areas with the highest positive values are where the influence of the friendly forces are strongest. \tn % Row Count 5 (+ 5) % Row 8 \SetRowColor{white} {\bf{Maths}} & The influence falls off over distance which can be linear or exponential with distance. Influence is represented by the type of weapons for example. ie a sword is less powerful than a gun \tn % Row Count 13 (+ 8) % Row 9 \SetRowColor{LightBackground} & Because inflenuence never reaches 0, use a cut off point for very small values to avoid unnecessary calculations. \tn % Row Count 18 (+ 5) % Row 10 \SetRowColor{white} {\bf{Desirability}} & A weighted sum which would change accordingly to the context or type of decision. \tn % Row Count 22 (+ 4) % Row 11 \SetRowColor{LightBackground} {\bf{Time \& distance}} & Even though influence diminishes over distance it can still have an impact on decisions taken by other units far away \tn % Row Count 27 (+ 5) % Row 12 \SetRowColor{white} {\bf{Time \& probability}} & Can suggest how we use influence maps to represent potential actions \tn % Row Count 30 (+ 3) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.9908 cm} x{2.9862 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Influence Map (cont)}} \tn % Row 13 \SetRowColor{LightBackground} {\bf{Interpreting Results}} & Influence state decision such as combat want to choose acell in which enemy is weak but in which we are strong \tn % Row Count 5 (+ 5) % Row 14 \SetRowColor{white} & Examine the distance of units to the front-line both friendly and enemy which can help indicate areas to which we should be paying special attention to. \tn % Row Count 12 (+ 7) % Row 15 \SetRowColor{LightBackground} {\bf{Terrain}} & Can increase or decrease the propagation of influence according to terrain. e.g. take obstacles into account \tn % Row Count 17 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.54287 cm} x{3.43413 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Trees}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Decision Trees}} & A decision tree is way of representing knowledge. \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} & A decision tree is a way of using inputs to predict future outputs. \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} & It is a classification method, decision trees learn from examples using inductions. They can deal with uncertainty. thye dont use ranges because of large numbers of branching alternatives. \tn % Row Count 12 (+ 7) % Row 3 \SetRowColor{white} {\bf{Sequence}} & Execute the first node that has not yet succeeded. Keep executing a task until it returns a success. Any failure in the sequence is a failure overall. Fix or continue to next sequence. \tn % Row Count 19 (+ 7) % Row 4 \SetRowColor{LightBackground} {\bf{Selector}} & Selects one child node to execute. Could be random or some sort of control mechanism. \tn % Row Count 23 (+ 4) % Row 5 \SetRowColor{white} {\bf{Decorator}} & Single child node. Allows for other types of operation such as repetition, filter or an inventor. \tn % Row Count 27 (+ 4) % Row 6 \SetRowColor{LightBackground} {\bf{ID3 algorithms}} & Note: Look at Tree PP for method \tn % Row Count 29 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.04057 cm} x{2.93643 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Production Systems}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Knowledge Representation}} & Knowledge is representation and the methods for manipulating it \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} {\bf{Procedural Knowledge}} & Is operational ie what to do when \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} & Most common method is production rules \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{} \tn % Row Count 7 (+ 0) % Row 4 \SetRowColor{LightBackground} {\bf{Production Rules}} & New knowledge is derived using various reasoning mechanisms. IF AND THEN \tn % Row Count 11 (+ 4) % Row 5 \SetRowColor{white} & A deductive argument can only bring out what is already implicit in it premises but can give rise to questions. \tn % Row Count 16 (+ 5) % Row 6 \SetRowColor{LightBackground} & Reasoning is carried out by an interpreter \tn % Row Count 18 (+ 2) % Row 7 \SetRowColor{white} & 2 methods: forward chaining from assertions and backward chaining from hypotheses \tn % Row Count 22 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.64241 cm} x{3.33459 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Blackboard Model}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Blackboard Model}} & Is a decision making method. \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} & Problems and all workings out are written on the blackboard. \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} & The insight is that a collective understanding of a problem may be better than an individual understanding. \tn % Row Count 10 (+ 5) % Row 3 \SetRowColor{white} & May be more efficient to have many experts each with a partial understading of a problem than one expert that has a full understanding. \tn % Row Count 16 (+ 6) % Row 4 \SetRowColor{LightBackground} {\bf{Specialists}} & No specialist understands the whole problem \tn % Row Count 18 (+ 2) % Row 5 \SetRowColor{white} & Component that can operate on the data written p on the blackboard. The area of expertise of each specialist is narrow. A specialist may indicatate a relevance value indicating how they can deal with the problem. \tn % Row Count 27 (+ 9) % Row 6 \SetRowColor{LightBackground} & No communication allowed between experts. Everything goes through the medium of the blackboard. \tn % Row Count 31 (+ 4) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.64241 cm} x{3.33459 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Blackboard Model (cont)}} \tn % Row 7 \SetRowColor{LightBackground} {\bf{Arbiter}} & Selects which of the specialists to execute \tn % Row Count 2 (+ 2) % Row 8 \SetRowColor{white} {\bf{Architecture}} & 2 types of architecture \tn % Row Count 4 (+ 2) % Row 9 \SetRowColor{LightBackground} & A) Multiple specialists each with their own area of expiertie. It is assumed that only one specialist at a time will be dealing with a specific problem. \tn % Row Count 10 (+ 6) % Row 10 \SetRowColor{white} & B) Specialists with overlapping areas of expertise. More than 1 specialist can signal relevance. More than one specialist can deal with a problem at a time. \tn % Row Count 16 (+ 6) % Row 11 \SetRowColor{LightBackground} {\bf{Characteristics}} & Blackboard offers flexibility \tn % Row Count 18 (+ 2) % Row 12 \SetRowColor{white} & Order of reasoning not pre-determined \tn % Row Count 20 (+ 2) % Row 13 \SetRowColor{LightBackground} & At any given point that most relevant specialist will be selected \tn % Row Count 23 (+ 3) % Row 14 \SetRowColor{white} & Specialists can act in a variety of ways like requesting more data etc. \tn % Row Count 26 (+ 3) % Row 15 \SetRowColor{LightBackground} & A specialist need not know how its assertions or signals are going to be used. \tn % Row Count 29 (+ 3) % Row 16 \SetRowColor{white} & The specialist is only concerned with fulfilling a request. \tn % Row Count 32 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.33919 cm} x{2.63781 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Entity IDs And Communication}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Forms of Entity Identification:}} & Pointers, Names, Entity UIDs (Evaluate these) \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} {\bf{Entity Pointers(pros/cons)}} & Problems occur when entities are destroyed. For example when an entity high up in the chain dies, therefore, making the pointer invalid. Can lead to exceptions \tn % Row Count 11 (+ 8) % Row 2 \SetRowColor{LightBackground} {\bf{Entity UIDs(Unique Identifier}} & + Holds a UID instead of a pointer \tn % Row Count 13 (+ 2) % Row 3 \SetRowColor{white} & + Uses a function to safely convert into pointer \tn % Row Count 16 (+ 3) % Row 4 \SetRowColor{LightBackground} & + An error is returned when resource doesn't exist. A lot easier to handle than invalid pointers. \tn % Row Count 21 (+ 5) % Row 5 \SetRowColor{white} & + Hash tables are used which provide efficency. Keys are converted into integers. \tn % Row Count 25 (+ 4) % Row 6 \SetRowColor{LightBackground} & - Collisions can occur in hash tables \tn % Row Count 27 (+ 2) % Row 7 \SetRowColor{white} {\bf{Entity Messaging}} & Better to send messages to entities than to use getters and setters \tn % Row Count 31 (+ 4) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.33919 cm} x{2.63781 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Entity IDs And Communication (cont)}} \tn % Row 8 \SetRowColor{LightBackground} & + Entities only need to know messaging types \tn % Row Count 3 (+ 3) % Row 9 \SetRowColor{white} & + Can make interactions more complex, by having replies for example. \tn % Row Count 7 (+ 4) % Row 10 \SetRowColor{LightBackground} & Need a system messenger class. Avoid using new and delete. Use statics \tn % Row Count 11 (+ 4) % Row 11 \SetRowColor{white} & - Finding the position of another entity can be clumsy \tn % Row Count 14 (+ 3) % Row 12 \SetRowColor{LightBackground} & - There is latency between responses \tn % Row Count 16 (+ 2) % Row 13 \SetRowColor{white} & + Entity UIDs can be converted to pointers to access generic or commonly used data \tn % Row Count 20 (+ 4) % Row 14 \SetRowColor{LightBackground} & + Could implement an ImmediateMessage function where message is sent directly to entity and return value is response \tn % Row Count 26 (+ 6) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{0.9954 cm} x{3.9816 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Tools Programming}} \tn % Row 0 \SetRowColor{LightBackground} Tool Chain & Sequence of tools needed to convert raw assets through to usable game data. \tn % Row Count 3 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.04057 cm} x{2.93643 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Camera Projection/Picking}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Model Space}} & Entity's mesh is defined in its own local coordinate system \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} {\bf{World Space}} & Transforming a model in the world \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} {\bf{World Matrix}} & Transforming model from model space to world space with a matrix. \tn % Row Count 8 (+ 3) % Row 3 \SetRowColor{white} {\bf{Camera Space}} & The scene as view from the camera's position. \tn % Row Count 10 (+ 2) % Row 4 \SetRowColor{LightBackground} {\bf{View Matrix}} & Transformation from world space to camera space is done with the view matrix. \tn % Row Count 14 (+ 4) % Row 5 \SetRowColor{white} {\bf{Camera to Viewport space}} & Project camera space into 2D. \tn % Row Count 16 (+ 2) % Row 6 \SetRowColor{LightBackground} & This is done with the projection matrix \tn % Row Count 18 (+ 2) % Row 7 \SetRowColor{white} {\bf{Projection Details}} & {\bf{Near clip distance}} is from camera position to viewport. \tn % Row Count 21 (+ 3) % Row 8 \SetRowColor{LightBackground} & {\bf{Far clip distance}} is furthest we can see from camera position. \tn % Row Count 24 (+ 3) % Row 9 \SetRowColor{white} & FOV - field of view \tn % Row Count 25 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.18988 cm} x{2.78712 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Component-Based Entities}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Problems with OO}} & Tight couping between parent and child. Features of parents affect or limit the features of children \tn % Row Count 5 (+ 5) % Row 1 \SetRowColor{white} & Hierarchies are static, games need more flexibility \tn % Row Count 8 (+ 3) % Row 2 \SetRowColor{LightBackground} & Multiple inheritance can be use but causes confusion \tn % Row Count 11 (+ 3) % Row 3 \SetRowColor{white} {\bf{Component-based Architecture}} & Entity holds a dynamic list of components \tn % Row Count 13 (+ 2) % Row 4 \SetRowColor{LightBackground} & Each component has an update function called when entity is updated \tn % Row Count 17 (+ 4) % Row 5 \SetRowColor{white} & Messages to entity passed to each component. e.g. health component reacts to a damage message \tn % Row Count 22 (+ 5) % Row 6 \SetRowColor{LightBackground} & Send messages to components/entities within the same entity \tn % Row Count 25 (+ 3) % Row 7 \SetRowColor{white} & +Litte coupling between components \tn % Row Count 27 (+ 2) % Row 8 \SetRowColor{LightBackground} & +Easy to add/remove functionality \tn % Row Count 29 (+ 2) % Row 9 \SetRowColor{white} & +Simple to conceptualise \tn % Row Count 31 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.18988 cm} x{2.78712 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Component-Based Entities (cont)}} \tn % Row 10 \SetRowColor{LightBackground} & +Easily built from script/data files \tn % Row Count 2 (+ 2) % Row 11 \SetRowColor{white} & -Much more message passing \tn % Row Count 4 (+ 2) % Row 12 \SetRowColor{LightBackground} & -May be too flexible \tn % Row Count 5 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.89126 cm} x{3.08574 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Concurrent Programming}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Concurrent Program}} & Simultaneously executes multiple interacting computational tasks. Not the same as parallel program \tn % Row Count 5 (+ 5) % Row 1 \SetRowColor{white} {\bf{Processes/threads}} & The tasks may be separate programs or a set of processes/threads created by a single program. \tn % Row Count 9 (+ 4) % Row 2 \SetRowColor{LightBackground} & Focus of concurrent programming is the interaction between tasks and the coordination of shared resoruces. \tn % Row Count 14 (+ 5) % Row 3 \SetRowColor{white} {\bf{Parallel Programming}} & Simultaneously exutes a single task across several processors \tn % Row Count 17 (+ 3) % Row 4 \SetRowColor{LightBackground} {\bf{Processes}} & A program is just a passive set of instuctions whereas a process is an active instance of a program, acually being executed \tn % Row Count 23 (+ 6) % Row 5 \SetRowColor{white} & Each process has a distinct set of resources. A section of memory (RAM, cache). System Resources. Security settings (perms), processor state \tn % Row Count 29 (+ 6) % Row 6 \SetRowColor{LightBackground} {\bf{Threads}} & A program may in turn contain several threads of execution \tn % Row Count 32 (+ 3) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.89126 cm} x{3.08574 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Concurrent Programming (cont)}} \tn % Row 7 \SetRowColor{LightBackground} & Threads conatin process resources Look Above \textasciicircum{}\textasciicircum{} \tn % Row Count 2 (+ 2) % Row 8 \SetRowColor{white} & Processes can be single threaded or multi-threaded \tn % Row Count 5 (+ 3) % Row 9 \SetRowColor{LightBackground} & Multi-threaded can be more efficent if done right \tn % Row Count 8 (+ 3) % Row 10 \SetRowColor{white} & Multi-threaded processes are more efficient than multi-process programs due to less setup and communication since threads share resources. \tn % Row Count 14 (+ 6) % Row 11 \SetRowColor{LightBackground} {\bf{Data Coordination}} & Major issue with concurrent is preventing concurrent processes from interfering with eachother. \tn % Row Count 18 (+ 4) % Row 12 \SetRowColor{white} {\bf{Resource Coordination}} & Preventing sharing of resources from interfering. e.g. One process rewrites content of the file while another is in the process of reading it. \tn % Row Count 24 (+ 6) % Row 13 \SetRowColor{LightBackground} {\bf{Race Conditions}} & 2 processes racing to complete their task first \tn % Row Count 26 (+ 2) % Row 14 \SetRowColor{white} & A flaw in a concurrent system where the exact sequence or timing of events affects the output. \tn % Row Count 30 (+ 4) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.89126 cm} x{3.08574 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Concurrent Programming (cont)}} \tn % Row 15 \SetRowColor{LightBackground} & Hard to track down due to shared data/resources being accesses almost simultaneously. \tn % Row Count 4 (+ 4) % Row 16 \SetRowColor{white} {\bf{Locking}} & A resource, piece of data or section of code can be locked to a single process or thread. \tn % Row Count 8 (+ 4) % Row 17 \SetRowColor{LightBackground} {\bf{Critical Section}} & A section of code that can only be accessed by a single thread at a time.. The section of code is aasumed to be accesing data that needs careful synchronisation. Only locks code not data. \tn % Row Count 16 (+ 8) % Row 18 \SetRowColor{white} {\bf{Mutex}} & An object that can only be owned by a single thread on a single process at a time. \tn % Row Count 20 (+ 4) % Row 19 \SetRowColor{LightBackground} {\bf{Semaphore}} & An obkect that can be held by up to N threads simultaneously. Section can be shared by a few processes but not an unlimited number, which limits the number resources that can be opened simultaneously. \tn % Row Count 29 (+ 9) % Row 20 \SetRowColor{white} {\bf{Timers}} & Can pause a thread until a certain time or repeatedly wake/sleep a thread. \tn % Row Count 33 (+ 4) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.89126 cm} x{3.08574 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Concurrent Programming (cont)}} \tn % Row 21 \SetRowColor{LightBackground} {\bf{Blocking}} & When a thread or process is prevented from accessing data or executing code due to synchronisation object is said to be blocked. \tn % Row Count 6 (+ 6) % Row 22 \SetRowColor{white} & When a thread is blocked wait for the code/data to become available by allowing the thread to stall (sleep) , which loses the advantages of concurrency. And can add a timeout to help limit how long to wait. Or simply skip the task that requires the blocked data/code \tn % Row Count 18 (+ 12) % Row 23 \SetRowColor{LightBackground} {\bf{Deadlocks}} & When 2 threads try to lock 2 resources they stall waiting for eachother causing a deadlock and each thread will wait forever for the other. Can only be resoved by better synchronisation of objects. ie associate a single mutex to the ownership of any part of the group. \tn % Row Count 30 (+ 12) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.33919 cm} x{2.63781 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Text-based Game Data}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Hard-coding}} & Embedding of data in program code \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} & - Requires recompilation to change data which can be slow for large project. \tn % Row Count 6 (+ 4) % Row 2 \SetRowColor{LightBackground} & - Cannot be done at runtime \tn % Row Count 8 (+ 2) % Row 3 \SetRowColor{white} & To improve this we can use data files. \tn % Row Count 10 (+ 2) % Row 4 \SetRowColor{LightBackground} & + Hard coded data is stored in a text format which means it is human readable/writable. \tn % Row Count 15 (+ 5) % Row 5 \SetRowColor{white} & Text based data will need to be parsed at run-time. \tn % Row Count 18 (+ 3) % Row 6 \SetRowColor{LightBackground} {\bf{Binary data files}} & Can help in large data sets as it's quicker to parse but they're not human readable \tn % Row Count 22 (+ 4) % Row 7 \SetRowColor{white} {\bf{Issues with Text-based data}} & Slower than using hard-coding \tn % Row Count 24 (+ 2) % Row 8 \SetRowColor{LightBackground} & Text need more storage than binary \tn % Row Count 26 (+ 2) % Row 9 \SetRowColor{white} & Need good test cases to have good text validation. \tn % Row Count 29 (+ 3) % Row 10 \SetRowColor{LightBackground} & Additional code development required \tn % Row Count 31 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.33919 cm} x{2.63781 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Text-based Game Data (cont)}} \tn % Row 11 \SetRowColor{LightBackground} {\bf{XML (eXtensible Mark-up Language}} & Structured data \tn % Row Count 2 (+ 2) % Row 12 \SetRowColor{white} & Not a programming language \tn % Row Count 4 (+ 2) % Row 13 \SetRowColor{LightBackground} & Stream-oriented parsing - Uses callbacks as tags that are opened and closed \tn % Row Count 8 (+ 4) % Row 14 \SetRowColor{white} & Tree-traversal parsing - Reads entire document and passes back as a complete hierarchical structure \tn % Row Count 13 (+ 5) % Row 15 \SetRowColor{LightBackground} {\bf{{\emph{XML Disadvantages}}}} & The redundancy of syntax causes higher storage making parsing take longer. \tn % Row Count 17 (+ 4) % Row 16 \SetRowColor{white} & XML is less readable compared to other text-based document formats such as JSON. XML doesn't support arrays. \tn % Row Count 23 (+ 6) % Row 17 \SetRowColor{LightBackground} & XML files are usually larger due to being verbose therefore it totally depends on who is writing it. \tn % Row Count 28 (+ 5) % Row 18 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{} \tn % Row Count 28 (+ 0) % Row 19 \SetRowColor{LightBackground} {\bf{Advantages XML}} & XML is platform and programming language independent therfore can be used by any system and supports hardware and software change. \tn % Row Count 35 (+ 7) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.33919 cm} x{2.63781 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Text-based Game Data (cont)}} \tn % Row 20 \SetRowColor{LightBackground} & Support Unicode and international encoding standard for use with different languages and scripts. \tn % Row Count 5 (+ 5) % Row 21 \SetRowColor{white} & The data stored and transported using XML can be changed at any point of time without affecting the data presented. XML allows validation using DTD and Schema. This validation ensures that the XML document is free from any syntax error. \tn % Row Count 17 (+ 12) % Row 22 \SetRowColor{LightBackground} & XML simplifiesdata sharing between various systems because of its platform independent nature. \tn % Row Count 22 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.4977 cm} x{4.4793 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Planning}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{{\bf{STRIPS (Stanford Research Institute Problem Solver)}}} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} & Formal language that assumes that all conditions not stated to be true are false \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} & Planning is a process of divising a sequence of actions to achieve a goal. \tn % Row Count 8 (+ 3) % Row 3 \SetRowColor{white} & Pathfinding is an example of planning \tn % Row Count 10 (+ 2) % Row 4 \SetRowColor{LightBackground} & Uses actions, states and goals \tn % Row Count 11 (+ 1) % Row 5 \SetRowColor{white} & In language can be expressed as logical statements like At(B). They can be combined like At(door) AND holding(key) \tn % Row Count 15 (+ 4) % Row 6 \SetRowColor{LightBackground} & Actions can be specified in terms of preconditions. Like Move(A, B), Preconditions: At(A), Postconditions: not At(A), At(B) \tn % Row Count 19 (+ 4) % Row 7 \SetRowColor{white} & Precondition = entry state \tn % Row Count 20 (+ 1) % Row 8 \SetRowColor{LightBackground} & Postcondition = exit state \tn % Row Count 21 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.69218 cm} x{3.28482 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Finite State Machines (FSM)}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{FSMS model states, transitions and actions} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} {\bf{Probablistic FSM}} & Describe any FSM which includes probabilities \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} & Probabilities are placed on transitions out of states \tn % Row Count 6 (+ 3) % Row 3 \SetRowColor{white} & Can have an output state which has a probability associated with it. \tn % Row Count 9 (+ 3) % Row 4 \SetRowColor{LightBackground} & Multiple output states with probability scores used to select between them \tn % Row Count 12 (+ 3) % Row 5 \SetRowColor{white} & Probabilities could be fixed or could change over time. Can extend probabilities in lots of ways e.g. trigger functions. \tn % Row Count 17 (+ 5) % Row 6 \SetRowColor{LightBackground} {\bf{Stack-(based FSM)}} & Track past states using a stack \tn % Row Count 19 (+ 2) % Row 7 \SetRowColor{white} & Stacks are pushed on and popped off the stack at transitions. This means that an agent can be interrupted and later return to a previous state. \tn % Row Count 25 (+ 6) % Row 8 \SetRowColor{LightBackground} & Stack based FSM can produce a simple FSM than a standard FSM but not always appropriate tor return to a previous state. \tn % Row Count 30 (+ 5) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.69218 cm} x{3.28482 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Finite State Machines (FSM) (cont)}} \tn % Row 9 \SetRowColor{LightBackground} {\bf{Hieracrchical FSM}} & A state may link to another FSM or set of FSMs \tn % Row Count 2 (+ 2) % Row 10 \SetRowColor{white} & Transition from a state leads to a brand new FSM. Use the stack to store the initiating state. \tn % Row Count 6 (+ 4) % Row 11 \SetRowColor{LightBackground} & If control is passed down the hierarchy then the new FSM starts at its own initial state. Allow you to identify and separate out behaviour or tasks. Helps reduce size and complexity of a FSM \tn % Row Count 14 (+ 8) % Row 12 \SetRowColor{white} & Record the original state and any associated data because control may pass back at some point. \tn % Row Count 18 (+ 4) % Row 13 \SetRowColor{LightBackground} & - May lead to code re-use since a task could be used in several different situations \tn % Row Count 22 (+ 4) % Row 14 \SetRowColor{white} & To avoid code repitition allow the re-use of FSMs. \tn % Row Count 24 (+ 2) % Row 15 \SetRowColor{LightBackground} & The hierarchy of states can produce behaviour unique to an agent even if states are shared with other agents. \tn % Row Count 29 (+ 5) % Row 16 \SetRowColor{white} & It is possible to swap FSMs in and out. \tn % Row Count 31 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.69218 cm} x{3.28482 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Finite State Machines (FSM) (cont)}} \tn % Row 17 \SetRowColor{LightBackground} & This can be done with any one of the FSM layers. \tn % Row Count 2 (+ 2) % Row 18 \SetRowColor{white} & Hence an agent could exhibit different implementations of a task in different situations, e.g. different combat FSMs. \tn % Row Count 7 (+ 5) % Row 19 \SetRowColor{LightBackground} & A state could have sub states \tn % Row Count 9 (+ 2) % Row 20 \SetRowColor{white} & This can bypass the need to have a new FSM but avoid doing it too much or else it can lead to the FSM becoming broken. \tn % Row Count 14 (+ 5) % Row 21 \SetRowColor{LightBackground} {\bf{Subsumption FSM}} & Intelligent behaviour can be built from a collection of simple machines. \tn % Row Count 17 (+ 3) % Row 22 \SetRowColor{white} & Decompose complex behaviour into simple modules, operations or tasks. \tn % Row Count 20 (+ 3) % Row 23 \SetRowColor{LightBackground} & The modules are implemented as layers of FSMs \tn % Row Count 22 (+ 2) % Row 24 \SetRowColor{white} & Thje layers of FSMs all operate at the same time. \tn % Row Count 24 (+ 2) % Row 25 \SetRowColor{LightBackground} & Lower layers deal with short-term goals and higher layers deal with long-term goals. \tn % Row Count 28 (+ 4) % Row 26 \SetRowColor{white} & Lower layers have priority \tn % Row Count 29 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.84149 cm} x{3.13551 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Entity Update and Rendering}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Entity Update}} & Each entity has its own update function \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} & Can be called every frame or less frequently \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} & Recieves/processes messages \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} & Send messages \tn % Row Count 7 (+ 1) % Row 4 \SetRowColor{LightBackground} & Decision making \tn % Row Count 8 (+ 1) % Row 5 \SetRowColor{white} & + Entity behaviour and state collected together \tn % Row Count 10 (+ 2) % Row 6 \SetRowColor{LightBackground} & +Easy to maintain \tn % Row Count 11 (+ 1) % Row 7 \SetRowColor{white} & + Easier to comprehend behaviour \tn % Row Count 13 (+ 2) % Row 8 \SetRowColor{LightBackground} & - Overall game behaviour is distributed, can get unexpected interaction \tn % Row Count 16 (+ 3) % Row 9 \SetRowColor{white} & - Messaging between entities can be long-winded \tn % Row Count 18 (+ 2) % Row 10 \SetRowColor{LightBackground} {\bf{Scene Update}} & In the TL-Engine a single global update function is used \tn % Row Count 21 (+ 3) % Row 11 \SetRowColor{white} & Can become bloated/hard to maintain \tn % Row Count 23 (+ 2) % Row 12 \SetRowColor{LightBackground} & No attempt to encapsulate behaviour \tn % Row Count 25 (+ 2) % Row 13 \SetRowColor{white} & Using entity-based update still uses Scene Update to do certain global update work \tn % Row Count 29 (+ 4) % Row 14 \SetRowColor{LightBackground} & + Global function easy to work with \tn % Row Count 31 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.84149 cm} x{3.13551 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Entity Update and Rendering (cont)}} \tn % Row 15 \SetRowColor{LightBackground} & - Model state tends to become a set of globals \tn % Row Count 2 (+ 2) % Row 16 \SetRowColor{white} {\bf{Entity Rendering}} & Each entity gets its own render function. A function that's called every frame to update animations, positions, textures etc. \tn % Row Count 7 (+ 5) % Row 17 \SetRowColor{LightBackground} {\bf{Pre/Post Rendering}} & Called for entities before and after the main rendering calls. E.g. Calculating camera view matrix \tn % Row Count 11 (+ 4) % Row 18 \SetRowColor{white} {\bf{Dot Product Formula}} & X.T = |X||T|cos(B) \tn % Row Count 13 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.89126 cm} x{3.08574 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Scripting for Games}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Why Scripting}} & Ease of development - Less prone to erros and less intricate \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} & Much easier to change and test \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} & No recompilation, change at runtime \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} & Think about Unity - Use scripts to control entities(game objects) player as an example \tn % Row Count 11 (+ 4) % Row 4 \SetRowColor{LightBackground} {\bf{Scripting (pros/cons)}} & - Performance - Scriping language often interpreted. Can be 10x slower than C++ \tn % Row Count 15 (+ 4) % Row 5 \SetRowColor{white} & - No control of memory management can cause issues \tn % Row Count 18 (+ 3) % Row 6 \SetRowColor{LightBackground} & - Limited tool support \tn % Row Count 19 (+ 1) % Row 7 \SetRowColor{white} & - Hard to spot errors \tn % Row Count 20 (+ 1) % Row 8 \SetRowColor{LightBackground} & - Need to write interface to our c++ \tn % Row Count 22 (+ 2) % Row 9 \SetRowColor{white} & Don't neccessarly need to use scripting languages \tn % Row Count 25 (+ 3) % Row 10 \SetRowColor{LightBackground} & Consider language based on performance needs and memory footprint, feature set etc. \tn % Row Count 29 (+ 4) % Row 11 \SetRowColor{white} {\bf{Python}} & Portable, interpreted, OO programming language \tn % Row Count 31 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.89126 cm} x{3.08574 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Scripting for Games (cont)}} \tn % Row 12 \SetRowColor{LightBackground} & Dynamically typed \tn % Row Count 1 (+ 1) % Row 13 \SetRowColor{white} & Automatic garbage collection \tn % Row Count 3 (+ 2) % Row 14 \SetRowColor{LightBackground} & Blocks are defined by indentation \tn % Row Count 5 (+ 2) % Row 15 \SetRowColor{white} {\bf{Lua}} & Lightweight scrupting language \tn % Row Count 7 (+ 2) % Row 16 \SetRowColor{LightBackground} & Not OO \tn % Row Count 8 (+ 1) % Row 17 \SetRowColor{white} & Small/Simple feature set \tn % Row Count 9 (+ 1) % Row 18 \SetRowColor{LightBackground} & Small memory \tn % Row Count 10 (+ 1) % Row 19 \SetRowColor{white} & Small but powerful feature set \tn % Row Count 12 (+ 2) % Row 20 \SetRowColor{LightBackground} & Dynamically typed \tn % Row Count 13 (+ 1) % Row 21 \SetRowColor{white} & Only one kind of data structure - the table \tn % Row Count 15 (+ 2) % Row 22 \SetRowColor{LightBackground} & Simple integration with C API \tn % Row Count 17 (+ 2) % Row 23 \SetRowColor{white} & Less high level than Python \tn % Row Count 19 (+ 2) % Row 24 \SetRowColor{LightBackground} & Rather niche language outside games \tn % Row Count 21 (+ 2) % Row 25 \SetRowColor{white} & Better performance, less memory use \tn % Row Count 23 (+ 2) % Row 26 \SetRowColor{LightBackground} & Simple interface for C and C++ \tn % Row Count 25 (+ 2) % Row 27 \SetRowColor{white} & Lends itself well to game entity scripting \tn % Row Count 27 (+ 2) % Row 28 \SetRowColor{LightBackground} & Interfacing LUa with C++ is fairly simple since Lua is itself a C program and has a direct C API. \tn % Row Count 32 (+ 5) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.74195 cm} x{3.23505 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Cellular Automata}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Cellular Automata}} & Are machines which model problems as a set of discrete cells. \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} {\bf{Game of Life}} & John Conway \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} & Uses a 2D grid as a map to lay out the actions of the game. \tn % Row Count 8 (+ 3) % Row 3 \SetRowColor{white} & Binary cells used to represent entities on the map with either alive or empty where empty is dead. \tn % Row Count 12 (+ 4) % Row 4 \SetRowColor{LightBackground} & Each cell only considers its 8 neighbouring cells: orthogonal and diagonal \tn % Row Count 15 (+ 3) % Row 5 \SetRowColor{white} & All cells are examined simultaneously \tn % Row Count 17 (+ 2) % Row 6 \SetRowColor{LightBackground} & Each cell considered in its own right. \tn % Row Count 19 (+ 2) % Row 7 \SetRowColor{white} {\bf{Game of life rules}} & A live cell with less than two live neighbours dies. Analogous to loneliness or underpopulation. A live cell with more than three live neighbours dies. Analogous to overpoulation or crowding. A live cell with two or three live neighbours survives. It becomes part of the next generation of cells. An empty cell with three neighbours becomes a live cell. \tn % Row Count 33 (+ 14) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.74195 cm} x{3.23505 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Cellular Automata (cont)}} \tn % Row 8 \SetRowColor{LightBackground} & Need to seed the system with alive cells to start the game otherwise nothing happens. \tn % Row Count 4 (+ 4) % Row 9 \SetRowColor{white} {\bf{Rules}} & 1. A live cell with less than two live neighbours dies. Analogous to loneliness or underpopulation. A live cell with more than three live neighbours dies. Analogous to overpoulation or crowding. A live cell with two or three live neighbours survives. It becomes part of the next generation of cells. An empty cell with three neighbours becomes a live cell. \tn % Row Count 18 (+ 14) % Row 10 \SetRowColor{LightBackground} & 2. A live cell with more than three live neighbours dies. Analogous to overpoulation or crowding. \tn % Row Count 22 (+ 4) % Row 11 \SetRowColor{white} & 3. A live cell with two or three live neighbours survives. It becomes part of the next generation of cells. \tn % Row Count 27 (+ 5) % Row 12 \SetRowColor{LightBackground} & 4. An empty cell with three neighbours becomes a live cell. \tn % Row Count 30 (+ 3) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.74195 cm} x{3.23505 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Cellular Automata (cont)}} \tn % Row 13 \SetRowColor{LightBackground} & {\emph{Refer to lecture powerpoint for game of life examples}} \tn % Row Count 3 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.4885 cm} x{2.4885 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Terrain Analysis}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Applicability}} & Wide variety of approaches. From Team based games, squads, enemy AI, moving into cover, adopting to a good firing position etc. \tn % Row Count 7 (+ 7) % Row 1 \SetRowColor{white} {\bf{Specific Requirements for terrain analysis}} & Representation of terrain \tn % Row Count 10 (+ 3) % Row 2 \SetRowColor{LightBackground} & Reason about that representation \tn % Row Count 12 (+ 2) % Row 3 \SetRowColor{white} & Difficult to generalise \tn % Row Count 14 (+ 2) % Row 4 \SetRowColor{LightBackground} & Typically custom built \tn % Row Count 16 (+ 2) % Row 5 \SetRowColor{white} & General points can be made \tn % Row Count 18 (+ 2) % Row 6 \SetRowColor{LightBackground} {\bf{Initial Analysis}} & Need to decide the attributes being used in the reasoning. Cannot recognise a choke point unless you hae already decided that these are of use to your game. \tn % Row Count 26 (+ 8) % Row 7 \SetRowColor{white} {\bf{Waypoints}} & Reasoning using waypoints \tn % Row Count 28 (+ 2) % Row 8 \SetRowColor{LightBackground} & Need a representation of the world. \tn % Row Count 30 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.4885 cm} x{2.4885 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Terrain Analysis (cont)}} \tn % Row 9 \SetRowColor{LightBackground} & For each waypoint calculate its offensive and defensive value \tn % Row Count 4 (+ 4) % Row 10 \SetRowColor{white} & Directional information needed \tn % Row Count 6 (+ 2) % Row 11 \SetRowColor{LightBackground} & Can take various factors into consideration including cover, lack of target etc. \tn % Row Count 10 (+ 4) % Row 12 \SetRowColor{white} {\bf{Static and Dynamic - Preprocessing}} & Some static analysis is comparatively easy. Hills shore etc. \tn % Row Count 13 (+ 3) % Row 13 \SetRowColor{LightBackground} & This can be pre-processed \tn % Row Count 15 (+ 2) % Row 14 \SetRowColor{white} & More difficult with dynamic terrain though \tn % Row Count 18 (+ 3) % Row 15 \SetRowColor{LightBackground} {\bf{Clustering}} & A strategory game needs to be able to recognise dynamic areas like towns and forests. \tn % Row Count 23 (+ 5) % Row 16 \SetRowColor{white} & The region is complex. Better to convert into convex hull. \tn % Row Count 26 (+ 3) % Row 17 \SetRowColor{LightBackground} {\bf{Convex Hulls}} & Easy to reason with. \tn % Row Count 27 (+ 1) % Row 18 \SetRowColor{white} & eed to know what points are inside the convex hull. \tn % Row Count 30 (+ 3) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.4885 cm} x{2.4885 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Terrain Analysis (cont)}} \tn % Row 19 \SetRowColor{LightBackground} {\bf{Choke points}} & Use an influence that can grow.Each region is surrounded by a uniform area. Arny areas that overlap are considered to be choke points. \tn % Row Count 7 (+ 7) % Row 20 \SetRowColor{white} & Choke points can be extended to show where to hide. This is done by tracing along the edge of a region going away from the choke point until there is no direct line of sight to the choke point. \tn % Row Count 17 (+ 10) % Row 21 \SetRowColor{LightBackground} & Influence maps have been used for terrain analysis to identify locations such as resource points, building routes for attack or staging areas for attack. \tn % Row Count 25 (+ 8) % Row 22 \SetRowColor{white} {\bf{Cover behind objects}} & Simplest case is single opponent firing at you and you track a line of sight to the edges of the object. Any point in between the two edge points is in cover. Can be used for multiple opponents. Perfect location for cover can be calculated by calculating the centre of gravity of the object. Assume that the object is 2D and that mass is evenly distributed. \tn % Row Count 43 (+ 18) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.4885 cm} x{2.4885 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Terrain Analysis (cont)}} \tn % Row 23 \SetRowColor{LightBackground} & Simply trace a line from centre to oppoent or opponents \tn % Row Count 3 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.9908 cm} x{2.9862 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Resource Management}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Resource/Asset}} & Any file that is loaded and used by elements in the game \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} {\bf{Asset Management}} & PRogramming involved in loading and working with asset files \tn % Row Count 6 (+ 3) % Row 2 \SetRowColor{LightBackground} {\bf{Resource Template}} & Template that stores the information about the assets in the game. \tn % Row Count 9 (+ 3) % Row 3 \SetRowColor{white} {\bf{Resource loading issues}} & System automatically loads all the level resources at setup time. No hard coding \tn % Row Count 13 (+ 4) % Row 4 \SetRowColor{LightBackground} & Repeatition of resource loading. Therefore, need to identify resources that have already loaded. \tn % Row Count 17 (+ 4) % Row 5 \SetRowColor{white} & Could load resources on demand when entity is needed \tn % Row Count 20 (+ 3) % Row 6 \SetRowColor{LightBackground} {\bf{Shared Resources}} & Find if resource has already been loaded. Can serach the entire list but may be slow \tn % Row Count 24 (+ 4) % Row 7 \SetRowColor{white} & Use hash map instead for efficency. Could use UIDs like with entities. \tn % Row Count 27 (+ 3) % Row 8 \SetRowColor{LightBackground} {\bf{Resource Destruction}} & Could destroy all objects at the end of level \tn % Row Count 29 (+ 2) % Row 9 \SetRowColor{white} & Could destroy exlicitly so each entity has a delete function. \tn % Row Count 32 (+ 3) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.9908 cm} x{2.9862 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Resource Management (cont)}} \tn % Row 10 \SetRowColor{LightBackground} {\bf{Track Resources}} & Track resources and delete them when they're not being used. \tn % Row Count 3 (+ 3) % Row 11 \SetRowColor{white} {\bf{Smart Pointers}} & Pointer that manages its own memory and atomatically detect the reference count which is increased/decreased according to the reference count. \tn % Row Count 9 (+ 6) % Row 12 \SetRowColor{LightBackground} {\bf{Reference count issues}} & If reference count reaches 0 they are deleted and may need to be used later on \tn % Row Count 13 (+ 4) % Row 13 \SetRowColor{white} & Reloading can cause stutter in game, which we want to avoid. \tn % Row Count 16 (+ 3) % Row 14 \SetRowColor{LightBackground} & To deal with this issue we can store a single persistent reference throughout the game. \tn % Row Count 20 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.94103 cm} x{3.03597 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Turing Machine}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Turing Aproach}} & Turing defined a class of abstract machines now called Turing Machines \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} & Turing is breaking maths down to its most basic operations. \tn % Row Count 6 (+ 3) % Row 2 \SetRowColor{LightBackground} {\bf{Turing Machine}} & Recasts this idea as a machine he supposes can perform all of the functions that the man does. \tn % Row Count 10 (+ 4) % Row 3 \SetRowColor{white} & Turing defined a class of of abstract machines now called Turing Machines. \tn % Row Count 14 (+ 4) % Row 4 \SetRowColor{LightBackground} & A mathematical model of computation that defines an abstract machine which manipulates symbols on a strip of tape according to a table of rows. \tn % Row Count 20 (+ 6) % Row 5 \SetRowColor{white} {\bf{Relevance to computers}} & Turing machines can do recursions, add and do functions. You can create any mathematical operation we know about using these basic operations. \tn % Row Count 26 (+ 6) % Row 6 \SetRowColor{LightBackground} {\bf{Universal TM}} & A basic TM can compute only one particular function. Where Universal TM is one which can simulate any other machine. \tn % Row Count 31 (+ 5) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.94103 cm} x{3.03597 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Turing Machine (cont)}} \tn % Row 7 \SetRowColor{LightBackground} {\bf{Turing's Thesis}} & The definition of computation is "something which can be done by TM". \tn % Row Count 3 (+ 3) % Row 8 \SetRowColor{white} {\bf{Church}} & Demonstrated that any computation can be done using Lambda calculus. \tn % Row Count 6 (+ 3) % Row 9 \SetRowColor{LightBackground} {\bf{Issues with TM}} & The halting problem: the determination of whether a TM will come to a halt given a particular program. Disproof by showing a contraction. It posits the existence of a program to solve the Halting Problem and then demonstrates that it would lead to a contradiction. \tn % Row Count 17 (+ 11) % Row 10 \SetRowColor{white} {\bf{Proof}} & Testing proves in general halting problem cannot be solved. The reason is that it gives rise to an inherent contradiction. \tn % Row Count 23 (+ 6) % Row 11 \SetRowColor{LightBackground} {\bf{Humans}} & Human minds might be Universal TMS as it has been argued that a Universal TM should in principle be capable of intelligence. \tn % Row Count 29 (+ 6) % Row 12 \SetRowColor{white} {\bf{Real computers}} & Universal TM is comparable to real computer. Anything that a real computer can compute a TM can compute. It is easier to describe certain algorithms using a TM than using a real computer. \tn % Row Count 37 (+ 8) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.94103 cm} x{3.03597 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Turing Machine (cont)}} \tn % Row 13 \SetRowColor{LightBackground} & Universal TM are unbounded with infinite space, where computers are bounded both time and space are limited. TM express algorithms in general terms where as a real computer needs to consider other things such as precision and error conditions. \tn % Row Count 11 (+ 11) % Row 14 \SetRowColor{white} & A TM uses a sequential tape. A real computer uses registers and random access storage. TMs do not model concurrency easily i.e. different tasks performing at the same time. \tn % Row Count 19 (+ 8) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}