{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Reminder there is this legal framework called

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: rrent node (compare G values). G score is always higher going through current node. Need to pick another node. Go through list of open nodes, and pick one with lowest F cost. There are two choices with equal F cost. Pick the lower one (could have picked upper one). Check adjacent nodes. Ignore walls and closed list. Ignore diagonal under wall (game ­ specific corner rule). Add two new squares to open list (below and below diagonal). Check G value of path via remaining square (to leg) – not a more efficient path. UC Santa Cruz Computer Science – Game Design Example conDnued Repeat process unDl target node is added to the closed list. Results in situaDon above. To determine final path, start at final node, and move backwards from one square to the next, following parent/ child relaDonships (follow arrows). UC Santa Cruz Computer Science – Game Design Some issues •  Collision avoidance –  Need to avoid other units in the game –  One approach: make squares of non ­moving units unwalkable –  Can penalize nodes on movement paths of other units •  Variable terrain cost –  In many games, some terrain costs more to move over than others (mountains, hills, swamps) –  Change movement costs for these terrains –  But, can cause units to preferenDally choose low ­cost movement paths • Example: units always go through mountain pass, and then get whacked by big unit camping at exit •  Add influence cost to nodes where many units have died UC Santa Cruz Computer Science – Game Design More issues •  Unexplored areas –  Pathfinding can make units “too smart” since their movement implies knowledge of unmapped areas of the map –  Have a knownWalkable array for explored areas –  Mark rest of the map as walkable, unDl proven otherwise –  Algorithm can use a lot of memory –  Can also slow things down •  Memory/speed •  Spread A* computaDons over many game Dcks UC Santa Cruz Computer Science – Game Design Sound in games •  Think about truly memorable games –  They almost always have excellent background music and sound effects –  Legend of Zel...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online