用C++代写一款Agent based Game.
Modern computer games are complex, immersive and engaging entertainment experiences made possible through software that implements complex relationships between and behaviours within the objects and agents we find in these games. Within SIT255 we are investigating the architectural patterns and algorithms used to create agent-based games software. Within this assignment you will write C++ code to extend the software framework that you created for assignment #1, applying object-oriented methodologies, architectural patterns and algorithms that support artificial intelligence for agents in games. Students will implement autonomous agents to produce a playable game or demo that makes use of the features of their software framework.
By completing this assignment satisfactorily, you will have demonstrated competency to at least minimum standards for the following unit learning outcomes:
- [ULO1] Apply knowledge of advanced programming language features, software patterns and game architectures to create complex game software systems
- [ULO2] Employ standard algorithms and data structures to design software solutions to game development problems
- [ULO3] Analyse, modify and extend complex computer code to meet functional and user requirements
- [ULO4] Select and evaluate algorithms with regard to constraints and functional characteristics, to achieve design and performance objectives
Please read the remainder of this document thoroughly and ensure that you understand it completely. In particular, pay attention to due dates. Extensions will not be granted simply because you didn’t allocate enough time to this task, start it early enough, or pay attention to the submission deadline. If you are unsure about any element of this assessment task, contact the teaching team.
This assignment comprises two elements: (1) a report documenting your agent design(s) and the software components that support it (them); and, (2) the software project implementing your framework and game.
Your report must accurately document the algorithmic and structural design of your agents and of the software components that implement them. There should be a clear elaboration of how the information cycle is implemented/supported within your software and how the sequencing and execution of this cycle is managed by the broader game software. Your report should include a brief description of the expected behaviour of the agents in the game, with respect to the major gameplay features. For example, if your agent is able to pursue enemy targets, under what conditions/situations would this behaviour occur. If your agent can hide from enemies, when would it do so? Finally, you must provide any necessary documentation that explains how to run and/or play the game (such as user inputs).
As with assignment 1, you are required to use industry standard techniques to communicate your designs, including class diagrams, entity-relationship diagrams, algorithm flow charts, sequence diagrams, activity diagrams, etc. You may also need to include appropriate diagrams that explain gameplay situations and the algorithms used to create autonomous behaviour in these contexts (such as explanations of Steering Behaviours implemented in your software, or examples of agent coordination).
Your report must include the Assignment Cover Sheet as its first page. This can be downloaded from the Assessment menu tab on the page (the file “Assignment attachment (electronic submission)”).
Your report must be presented professionally: i.e., no hand-drawn diagrams or charts. It should be neatly formatted and use sections with headings as appropriate. You should make appropriate font choices to ensure readability and professional style. Your report should not contain spelling or grammatical errors and should use professional language, rather than casual or conversational language styles. For assistance with report writing. For more details on your report requirements, please read the Assessment Rubric at the end of this document.
You are required to write C++ code that implements an object-oriented software framework supporting autonomous agents within an agent-based game. You are expected to extend the framework you produced for assignment 1. However, a minimal solution to assignment 1 will be released at the end of week 7 and this may be used as the basis for your game for assignment 2. In extending your framework (or the supplied framework) you will implement appropriate data structures and algorithms to support autonomous agents within your game, as well as supporting their interactions, relationships and behaviours. You will also develop an application (executable program) to achieve the functional and design requirements of a game product.
Your application software must compile and execute, demonstrating intelligent, complex behaviour of at least one actor within a game context, where behaviour arises from direct control by an autonomous software agent within your application. This will involve:
- Designing and implementing a structured, complex agent function that maps percepts to actions;
- Demonstrating the creation of localised, context-specific percepts from game and/or entity state information;
- Demonstrating changes in agent state or functionality arising from percepts containing game environment information;
- Demonstrating changes in agent state or functionality arising from percepts containing state information of the controlled actor;
- Demonstrating context-dependent tactical behaviours that achieve clearly identified objectives or goals
To achieve the functional requirements it is expected that you will implement appropriate object oriented data structures and algorithms to achieve:
- An agent function based on a Finite State Machine that encodes a logical set of interrelated behaviours appropriate to the controlled actor;
- Steering Behaviours to affect tactical movement control;
- Appropriate logic or functionality to control non-movement actions;
- Execution management capable of support multiple game agents, ensuring balanced execution (i.e., a fair distribution of computational resources and time).
The above requirements are stated broadly, so as to provide flexibility for students. The following are guidelines that, if followed, would produce a game that likely demonstrates achievement of the requirements.
It is expected that most students will build a game with features similar to the Tank game used as teaching examples in studio classes. Within this game, the following behaviours would meet the requirements above (if implemented using a Finite State Machine and Steering Behaviours). Being able to:
- Perceive and avoid walls and obstacles within the game environment, to prevent collisions;
- Perceive other Tanks within a finite radius of the controlled tank, and to aim and shoot accurately at them;
- Identify the need to acquire resources (such as health, ammunition, shields, etc.) based on actor state and to enact a behaviour to search for and collect such resources; and,
- Display changes in tactical behaviour based on changing actor state (such as pursuit or evasion) given relative health or expected success of combat.
Implementing the State Design pattern using object-oriented principles will provide a basis for a structured, complex agent function. Steering Behaviours will be appropriate for handling most tactical logic relevant to movement of the tank body and tank turret.
To support these features it will likely be necessary that students implement additional data structures and control logic for the controlled actor (Tank), such as one or more sensors that generate percepts for the controlling agent, as well as a control interface that enables the agent to dictate actions for the tank. Additionally, management of agents (storage, lifetime, execution, etc.) will likely require careful augmentation of the entity management system demonstrated in Assignment 1, with particular attention paid to scheduling of agent execution.
Note that it is not required that you build a Tank game and thus there is some flexibility as to how to deliver on the above requirements. You should discuss your project regularly with teaching staff to ensure that it will meet requirements, well before the submission deadline. If you are unsure about any of the requirements, or how you would design or implement software to achieve them, you should discuss this with a member of the teaching team as soon as possible. The requirements in this assignment are non-trivial and it is expected that all students, at some stage, with find this task difficult. Seek guidance and help early and the teaching team will provide advice and support as you undertake your project.
As with the first assignment, assessment of your software will consider the following:
Your code must be robust. That is, it must demonstrate handling of reasonable errors that might arise during program execution (e.g., missing files, files with missing data, memory request failures, container/array index errors, etc.).
Your code must be extensible. That is, the patterns you have implemented should permit you to create and manage any number of new agents, and to easily add additional features or behaviours to your agents. You should minimise coupling and dependencies between classes, where possible (i.e., favour composition over inheritance)
Your code must be maintainable. That is, it should be well documented, clearly laid out and apply modularisation appropriately (including the use of separate files for class definition and implementation, and the use of filters to organise related classes). Data types, functions and methods should have meaningful names and you should apply a consistent coding style throughout your program.
Further to this, an assessment rubric is supplied at the end of this document which details exactly how your report and software will be assessed.
You will submit two components for this assignment. The first is your report as a PDF document and the second is your Unreal Engine project including all code files (.cpp and .h), as well as any additional files required to compile and execute your demo application (including data files, resources files, etc.). If you use the work of others (including code, algorithms, designs, images, ideas, etc.) you MUST cite this usage directly within your code at the point of use. You will NOT be marked on code obtained from external sources (but you can receive marks for your own implementation of algorithms or designs you find elsewhere).
When submitting your Unreal Engine project, you MUST archive your UE project into a ZIP file including a packaged solution for running on Windows (note here). Note that other compression formats, such as RAR, or 7z, are NOT acceptable, as they cannot be extracted using Deakin’s desktop software image. If we cannot extract it, we cannot mark it. Archives that contain executable files (.exe) or are overly large will not upload correctly to CloudDeakin. It is YOUR responsibility to ensure your submission uploads correctly by the due date and meets all submission requirements.
Your final submission should be your ZIP archive, which should include both your Unreal Engine project AND your report document. This archive should be suitably named to include your surname (family name) and student ID. It is suggested that you use the following naming format:
You must submit this archive to the Assignment 2 DropBox on the SIT255 CloudDeakin site no later than the deadline given at the top of this document.
IMPORTANT: A 10% penalty will be applied to any submission that does not meet ALL of the above submission requirements.
You will be provided (at the end of week 7, on CloudDeakin) with a minimal solution to assignment 1, which implements a software framework meeting the minimum standard requirements for that assessment task. You may use this supplied software framework, or your own solution to assignment 1, to get you started in this assignment.
Class notes, recordings and practical activities will likely be of use in completing this assignment. However, alone they will not likely be sufficient to enable you to develop sufficient understanding of the architectural patterns, data structures and algorithms required to be demonstrated in this assignment, nor how to implement these in C++. As such, you should make use of the following resources, as well as carrying out independent study (including finding relevant resources) appropriate to your needs. The suggested starting points for this study are:
- Game Programming Patterns by Robert Nystrom (gameprogrammingpatterns.com)
- Artificial Intelligence for Games, by Millington and Funge (eBook available from Library)
- Design Patterns: elements of reusable object-oriented software, by Gamma, Helm, Johnson, & Vlissides (the “Gang of Four”)
- Effective C++, by Scott Myers
- More Effective C++, by Scott Myers
- Effective Modern C++, by Scott Myers (eBook available from Library)
For those looking for a good reference text on C++, I recommend C++ Primer Plus, by Prata. You will also certainly find useful resources listed in this StackOverflow thread: http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list
This assignment is marked out of 100 points and contributes 30% toward your unit grade. 70 points are assigned to the assessment of the software submission and 30 points to the assessment of the report. Each component of the submission will be marked with regards to the requirements stated previously and in accordance with the assessment rubric given below. The level of achievement against the criteria given in this rubric will be used to assign a proportionate number of points available for each component.
Students are expected to complete their submission individually and all submitted work must be the work of the respective student. However, students are encouraged to work together to discuss the assignment tasks and to help each other to develop understanding of the provided code and possible solutions to the given problems.
Additionally, students should seek guidance and advice from their respective practical demonstrator (for on-campus students) or through the CloudDeakin discussion forums (for all students). Weekly Bb Collaborate sessions are also available for discussing the assignment with your peers and the Unit Chair. DO NOT expect the teaching team to tell you how to solve a given problem. It is up to you to do the relevant learning that underpins this assignment and to formulate your solutions given your knowledge.