lhwlyd / animalinteractionproject Goto Github PK
View Code? Open in Web Editor NEWProject for CSE198 SP 2018
Project for CSE198 SP 2018
Hi, this project is under development by Carlos Chulo @ [email protected] and Roy Luo @ [email protected] under the supervision of Dr. Jürgen P. Schulze [email protected] Feel free to contact us if you'd like to contribute towards this project, have ideas on what should get further implemented, or want to learn more about some implementation details! Here're some tips (we'll move these to somewhere else when they get long!) How to create a fully funcitonal new State: 1. Make a new state script that implements the IState interface, implement all the methods (Enter(), Execute(), and Exit() ) 2. The way the statemachine works is it runs the new State's Enter() when the new state is introduced, run the Execute() of this state inside every Update(), and run the Exit() when some other state is introduced. For example, the WanderAround State does this: Enter(): Set a new location that the animal should move to initially. Execute(): Keep moving to the current destination, or introduce a new destination if the last one is finished. Exit(): Set the NavMeshAgent's destination to the current loc so it doesn't try to go to the old destination. 3. Usually we'll need access to some variables, make sure to set such vars as private, and use a Constructor to pass them in. 4. Implement the statmachine's logic in the actual animal class(Turtle), as it depends on the animal how the would react to different events. 5. Make use of SetBusy() in the baseAnimal class. The principle is to make all activities related to basic needs as "Busy States", by setting the animal to be a proper busy state using SetBusy(). E.g. SearchingForFood, Resting, Grabbed... Other states like WanderAround, PlayWithLaserLight, etc shouldn't be set as a busy state. They should call ExitBusy() in Enter() to make sure animals can turn to satisfy their basic needs when they are doing such activities. 6. Sometimes it will be a better idea to compose a mini-statemachine inside a state, becuase it offers more flexibilities and won't affect the main stateMachine's memory of the last state, or simply because some behaviours compose other minor behaviours(e.g. SearchForFood composes Resting and WanderAround). 7. To create detailed states that only suits a certain type of animal(e.g. RabitWanderAround, which should be implemented as hopping instead of running), extends the general states and override/modify.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.