IMGD 4100 (B 11)
Homework Assignment #4
Due by Web Turn-In: Midnight, Sunday, November 6
(See general homework instructions for turn-in details.)
The purpose of this assignment is to start the process of developing your personal soccer team implementation, which will eventually be submitted as Homework #7 for entry into the soccer tournament.
- First you need to make your own modifiable copy of the code for a soccer team:
- The name of your team will be your last name, e.g, "Smith", with "Team" appended, e.g., "SmithTeam".
- Create a new folder with your team name in SimpleSoccer/Teams and add a corresponding new node in VS Solution Explorer under Teams (right click > Add > New Filter).
- Copy all the files from Teams/BurkeTeam to your new folder.
- Change the name of all the files in your new folder by replacing "Burke" with your last name, e.g., "SmithFieldPlayerStates.cpp", etc. In VS Solution Explorer, add these files to your new team node (right click > Add > Existing Item).
- In all your new files, replace every occurrence of "Burke" with your last name. (Use the Find and Replace edit command in Visual Studio to help you.)
- At the end of Params.ini, change the name of the blue team to be your team name, e.g, "SmithTeam".
- Now, to test your work:
- Build and run (in debug mode) the SimpleSoccer solution.
- The game window should display your team's name as the blue team.
- If you get a run-time error, check the output window in VS for an error message indicating that the blue team name in Params.ini is not exactly the same as your team name in your version of SoccerTeamMaker.cpp. If that's ok, then make sure you added all your new files to the VS project (fifth step above), especially your new file corresponding to SoccerTeamMaker.h.
Of course, your new team just does exactly what Burke's team did.
As a first step of heading off in your own strategic directions, choose different home positions for your field players on offense and defense by modifying both of the two arrays in the Enter methods of each of the states corresponding to Attacking and Defending in your version of TeamStates.cpp. (Mark your changes with "//*" comments.)
Build and run (in debug mode) the SimpleSoccer solution to confirm that your team is using the new home positions. (Note that the kickoff positions will not change, since these are set by the arguments to the player constructors in SoccerTeam.cpp.)
Hint: See Buckland, Chapter 4, page 191 for use of debug_con.
- You will need to uncomment line 41 in Common/Debug/DebugConsole.h (#define DEBUG)
In preparation for Monday's discussion and Homework #5, spend some time carefully observing and analyzing the Simple Soccer game play between Buckland's Team, your team and Burke's Team (which is also included in the source distribution)
- You can easily change team assignments (without recompilation) by changing Params.ini.
- Use the P key to pause and resume play.
- You can slow down the frame/update rate by changing FrameRate in Params.ini
- The soccer simulation itself has some bugs. Occasionally the ball will leave the field, with unpredictable consequences. Occasionally, all action will just stop, for no apparent reason. There's nothing you can do except restart using the R key.
- Does your new team play better or worse than Buckland's team? Why?
- What is the most severe deficiency that you see your team exhibit? How do you think it could be solved?
What to Turn In
- Zip file containing new team folder only.
- Text file containing answers to questions in last two bullet points above.
Please post any questions to the myWPI forum for the course.
- 2 points - Correct new team execution with new home positions.
- 1 point - Answers to questions
Acknowledgement: I would like to thank Robin Burke for allowing the reuse of this assignment.