Download presentation
Presentation is loading. Please wait.
Published byJoseph Mitchell Modified over 8 years ago
1
Pirates & Ninjas
2
P&N: Plan Project summary Architecture User Interface World Creation (town) World Content Creation Game Play Artificial Intelligence
3
Project summary Presentation Technologies used Architecture User Interface World Creation (town) World Content Creation Game Play Artificial Intelligence →Project summary P&N: Plan
4
Project summary Presentation Technologies used →Project summary P&N: Plan
5
Project summary Presentation Technologies used →Project summary P&N: Plan
6
Architecture Data Flow Buffer Management Tool Game Application Aggregator Video Manager Audio Manager Network Manager Main AI →Architecture
7
P&N: Architecture Game application + player input Main AI Aggregator Buffer Video Manager Buffer Network Manager Buffer Audio Manager Buffer
8
P&N: Architecture AI Aggregator Buffer Video Manager Buffer Network Manager Buffer Audio Manager Buffer →Data Flow Read Write Game application + world data + player input Player Management Buffer Management Tool
9
P&N: Architecture →Data Flow Why so many buffers? –Multi threaded applications Calls must be ‘safe’ –No simultaneous writes to data –Less lock necessary for synchronization –Easy duplication of information –Thread info transmission and network works the same way Use the same buffers Buffer management tool
10
P&N: Architecture →Buffer Management Tool Aggregator Packet Destination: Packet Source:Anywhere AggregatorVideoAudioNetwork Buffer Management Are we playing a multiplayer game ? Should the packet be copied to the network ? No AudioVideo
11
P&N: Architecture →Buffer Management Tool Aggregator Packet Destination: Packet Source:Anywhere AggregatorVideoAudioNetwork Buffer Management Are we playing a multiplayer game ? Should the packet be copied to the network ? Yes No AudioVideo Network or Video PM Yes AI
12
P&N: Architecture Game application + player input Main AI Aggregator Buffer Network Manager Buffer Audio Manager Buffer →Game Application Video Manager Buffer
13
P&N: Architecture →Game Thread Game Application World player elements monster elements room listInteractible elements Player Management Graphic Renderer Manages Player Input Holds Game Data Renders Graphics Manages Player Menu Manages Main Menu
14
P&N: Architecture Initialize Data references (Resources) Initialize Data holder (World) Initialize Monster Type Generator (MTG) Initialize Audio Manager thread (AM) Initialize Aggregator thread (Agg) Initialize Artificial Intelligence thread (AI) Initialize Network thread (Net) (multiplayer) →Game Thread: Init
15
P&N: Architecture →Game Thread: Running For each player: –Create a player management (PM) –Treats input via the PMs from the players Manages main menu Manages play time initialization Updates the graphics Renders the graphics
16
Player Management P&N: Architecture →Game Thread: PM Inputs Buffer Management Tool
17
Game application + player input Main AI Aggregator Buffer Network Manager Buffer Audio Manager Buffer P&N: Architecture →Aggregator Video Manager Buffer
18
P&N: Architecture →Aggregator Thread AGGREGATORAGGREGATOR Handles its buffer Updates spell position Handles spell effects Updates spell cool downs Handles dynamic elements Handles interactive elements Buffer Management Tool
19
P&N: Architecture →Aggregator Thread Two working mode: –Master mode Single player or multiplayer and host –Slave mode Multiplayer and client Difference in the working mode: –A master aggregator will calculate spell effects regarding life –It will also create the world and send it to the slave aggregators
20
Game application + player input Main AI Aggregator Buffer Video Manager Buffer Network Manager Buffer Audio Manager Buffer P&N: Architecture →Video Manager
21
P&N: Architecture →Video Manager
22
Game application + player input Main AI Aggregator Buffer Network Manager Buffer Audio Manager Buffer P&N: Architecture →Audio Manager Video Manager Buffer
23
P&N: Architecture →Aggregator Thread AUDIOAUDIO Handles its buffer Play sound with 3D effects Play music in random loop Buffer Management Tool
24
Game application + player input Main AI Aggregator Buffer Video Manager Buffer Network Manager Buffer Audio Manager Buffer P&N: Architecture →Main AI
25
P&N: Architecture →Main AI Thread Wakes Monster Main AI Monster Element MovementDecision Making Monster Element MovementDecision Making Monster Element MovementDecision Making Monster Element MovementDecision Making Monster Element MovementDecision Making Monster Element MovementDecision Making Monster Element MovementDecision Making Monster Element MovementDecision Making When the Main AI thread wakes a monster it: Creates a decision making thread Creates a movement thread A monster can also ‘learn’
26
Project summary Architecture User Interface World Creation (town) World Content Creation Game Play Artificial Intelligence →User Interface P&N: Plan
27
Project summary Architecture User Interface World Creation (town) Parameters Room Generation World Content Creation Game Play Artificial Intelligence →World Creation P&N: Plan
28
Project summary Architecture User Interface World Creation (town) Parameters Room Generation World Content Creation Game Play Artificial Intelligence →World Creation P&N: Plan
29
P&N: World Creation Number of rooms in the world Common border size between 2 room Size of doorway between 2 room Compacity level of the world Max number of branching room Straightness of the walls between 2 room Number of test made to place a room →World Creation: Parameters
30
Project summary Architecture User Interface World Creation (town) Parameters Room Generation World Content Creation Game Play Artificial Intelligence →World Creation P&N: Plan
31
P&N: World Creation Respects set of constraints: Border overlapping for 1 pixel The world must stay close at all time to keep players in Respects the parameter inputted by the player You must be able to go from any room to any other room →World Creation: Room Generation
32
P&N: World Creation →World Creation: Room Generation We use logical operation to combine rooms together 28 & 193 = 0 124 & 193 = 64 28 & 199 = 4
33
P&N: World Creation →World Creation: Room Generation
34
Project summary Architecture User Interface World Creation (town) World Content Creation Building Creation Monster Generator Game Play Artificial Intelligence →World Content Creation P&N: Plan
35
Project summary Architecture User Interface World Creation (town) World Content Creation Building Creation Monster Generator Game Play Artificial Intelligence →World Content Creation P&N: Plan
36
P&N: World Creation →World Content Creation: building
37
Project summary Architecture User Interface World Creation (town) World Content Creation Building Creation Monster Generator Game Play Artificial Intelligence →World Content Creation P&N: Plan
38
P&N: World Creation →World Content Creation: Monster
39
Project summary Architecture User Interface World Creation (town) World Content Creation Game Play Artificial Intelligence →Game Play P&N: Plan
40
Project summary Architecture User Interface World Creation (town) World Content Creation Game Play Artificial Intelligence →Artificial Intelligence P&N: Plan
41
Artificial Intelligence –Movement Path finding Orientation –Decision Making –Learning Methods Decision per decision AI versus AI AI versus player →Artificial Intelligence
42
P&N: Plan Artificial Intelligence –Movement Path finding Orientation –Decision Making –Learning Methods →Artificial Intelligence
43
P&N: Plan Artificial Intelligence –Movement Path finding Orientation –Decision Making –Learning Methods →Artificial Intelligence
44
P&N: Artificial Intelligence →Decision 6 possible decisions –Move (towards and away from target) –Flee –Switch target –Counter target –Cast offensive spell –Cast defensive spell We sort the efficiency of the decisions and then act on the best one
45
P&N: Artificial Intelligence →Decision: Move Movement is based on answers to: –Am I already moving? –Am I casting a spell? (instant? Y/N) –Need to move to cast best offensive spell? –Need to move to cast best defensive spell? –Is my target immune? –Where can I go? (number of directions)
46
P&N: Artificial Intelligence →Decision: Flee Fleeing is based on answers to: –Am I fleeing? –Are some of my friends fleeing? (contagion) –Is my group well? (Sufficient life) –Can I kill my target before it kills me? –Do I have lots of friends?
47
P&N: Artificial Intelligence →Decision: Switch & Counter Counter is based on answers to: –Is my target casting? –Is the counter useful? (right magic school) –Is the counter on cool down? Target switching is based on answers to: –Is my target immune to my spells? –What is the best spell I can cast on any enemy? –Am I cornered?
48
P&N: Artificial Intelligence →Decision: Offense Offense is based on answers to: –Am I already moving? –What is the best offensive spell I can cast? –Is my group well? –Is my target well? –Can I kill my target before it kills me?
49
P&N: Artificial Intelligence →Decision: Defense Defense is based on answers to: –Am I already moving? –What is the best defensive spell I can cast? –Is my group well? –Is my target well? –Can I kill my target before it kills me?
50
P&N: Plan Artificial Intelligence –Movement Path finding Orientation –Decision Making –Learning Methods →Artificial Intelligence
51
P&N: Artificial Intelligence →Learning Methods Decision per decision For each decision we say it is good or bad Long process and un-scalable since an AI takes a decision every second AI versus AI If the AI loses then it means the decision it made were wrong AI versus player Same as AI vs AI however it a player playing. It should make the AI stronger
52
Questions ? Thank you for listening
53
P&N: Plan Data Description –Elements DynamicInteractiveStatic –Rooms –Spells –Talents →Data Description
54
Game application + player input Main AI Aggregator Buffer Video Manager Buffer Network Manager Buffer Audio Manager Buffer P&N: Architecture →Network Manager
55
P&N: Architecture →Network Manager Thread Client Buffer Client Buffer Host AI Buffer All aggregators do not do everything Why ? Because the data would become incoherent
56
P&N: Plan 2 Buffers –In –Out Each buffer has a read and write method –Write is a locked operation because different thread may access it –Reads are made by the network manager –Reads write data to: Aggregator Network Stream →Network Manager Thread
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.