70 likes | 152 Views
Ted Merchant’s Final Presentation. What I wanted to get done:. Write the special function that will cause the NPC to move to the resources and than back to the base. - Place temp resources (probably vending machines) into the map.
E N D
What I wanted to get done: • Write the special function that will cause the NPC to move to the resources and than back to the base. • - Place temp resources (probably vending machines) into the map. • - Change the resource counting function to be iterated only when the special NPC returns to the base with the resources it has gathered. • - Change the interface so that the played can control where the special NPC’s will gather resources. • - Create a priority system for the resources since there are 3 types. • - Create a limiting system that will limit the amount of resources at one location
What I Got Done • Write the special function that will cause the NPC to move to the resources and than back to the base. • - Place temp resources (probably vending machines) into the map. • - Change the resource counting function to be iterated only when the special NPC returns to the base with the resources it has gathered. • - Change the interface so that the played can control where the special NPC’s will gather resources. • - Create a priority system for the resources since there are 3 types. • - Create a limiting system that will limit the amount of resources at one location
How? • Almost all of what I did was in code. • Mainly I created a new type of NPC very closely related to the npc_citizen17 class. • I changed it’s idle behavior by creating new schedules and task which control what the NPC’s do. • I used the global entity list in order to allow the NPC’s to find and target the different resources. • I also removed a lot of code that handled special citizen types and situations.
How cont. • I created a new class for storing and forming calculations on the resources. • This class used arrays to store the amount of each resource. • It also calculated the average time it took to gather each resource and used that information to assign newly spawned Gatherers.
How cont. • I created three new model enities and added them to the map. • Used the model entity code from the Valve Wiki. • Basically used as a way to connect object on the map to objects in the code.
What’s Left to be Done? • There are a lot of things that I wanted to get to that I did. • Create models for each resource instead of stand in models used now. • Have a better user interface. Right now priorities are hard coded in. It would be nice to have some way to allow the user to change these priorities. • Have constant Gatherer reassignment. Gatherers are assigned what resource to gather when spawned. It would be nice if this could be reassigned during the game. • Give the user the ability to point and click the gathers to collect certain resources. • Have a display and use for all three resources. • Give the Gathers better animations instead of just standing next to resource.