- Class Facebook group - Please join!
- Previous lab tests
- Assignment
- A set of out of date course notes
- Forms git repo - Please Fork!
- A spotify playlist of music to listen to while coding
Student | Assignment | Lab Test | CA Overall |
---|---|---|---|
C13443362 | 63 | 70 | 65 |
c13496628 | 60 | 64 | 61 |
D15122839 | 64 | 72 | 66 |
C13383656 | 60 | 61 | 60 |
C13547287 | 74 | 80 | 76 |
C13525117 | 52 | 40 | 49 |
C11454238 | 67 | 40 | 59 |
C13730921 | 72 | 81 | 74 |
c13505347 | 0 | 16 | 5 |
D11124857 | 0 | 31 | 9 |
- Email: bryan.duggan@dit.ie
- Twitter: @skooter500
- Class Facebook group
- 2015-2016
- 2014-2015
- 2013-2014
- FSM's
Try and make this predator prey simulation. The prey will follow a path until the predator comes into range. When the perdator is is range the prey will attack the predator by shooting at it. It only shoots at the predator if it is inside the field of view. The predator will get close to the prey, but will flee from the prey if the prey attacks it:
- Obstacle avoidance behaviour
- Coroutines
Check out these happy, dancing, back flipping tardigrades:
They use a variation of the harmonic behaviour that we learned last week that I call NoiseWander. Instead of using a sin finction to generate the steering, NoiseWander uses Perlin Noise. See if you can implement NoiseWander. Perlin noise is a really cool technique for generating coherent noise that has lots of applications in game development. For example, Perlin noise is used to generate the rolling landscapes in Minecraft. I also add several Perlin noise functions together to generate the landscape of Forms.
In the second video, the dolphin is combining a vertical harmonic steering behaviour with NoiseWander. Both behaviours are active on the dolphin at the same time and the forces are weighted and summed. See if you can make something similar.
In the third video (which you have probably already seen) many of the creatures use another script called HarmonicController. What this does is every few seconds, changes the frequency and amplitude of the harmonic controller. I lerp to the new values so the changes are nice and smooth. See what you can come up with using a similar technique:
- Harmonic steering behaviour
- Spine animator
Have a look at the PathFollowSteering project in the git repo and implement the Harmonic steering behaviour you can see in this video:
You can see from the gizmos what the behaviour needs to do. The harmonic steering behaviour should seek a point on the outside of a sphere whose center is projected in front of the boid on the X-Z plane. The point should move along the circumpherence of the sphere on a harmonic motion. You can specify the frequency and amplitude of the harmonic and the radius and distance to the harmonic sphere. Your harmoinc behaviour should also draw lovely gizmos.
In the class we will implement a lerping spine animator and some other lerping magic which we will use with the harmonic steering behaviour to make all kinds of wriggling creatures.
- Games Fleadh
The aim today is to program a path following behaviour. You can use the steering behaviours notes to figure out how to do it from a blank Unity project or you can start with the project from last week. Whay you should to is:
- Make a Path component
- Make it a field in the Boid
- Make a path following behaviour in the Boid
Things to consider
- How will you store the waypoints?
- Can you add the option of looping the path, so that when the boid reaches the end of the path, it loops back to the start.
- How can you refactor the steering behaviours code to make it better? Consider making each behaviour a seperate component.
- Seek & arrive steering behaviours - Look at the slides for course notes
- Seek and arrive steering behaviours in Unity. These are implemented using my old framework (boolean flags - quick and dirty but ugly)
- Assignment brief! PM me with any comments/ideas
- Craig Reynolds on steering behaviours - Everyone should read!
-
Make this in Unity:
-
What is happening:
-
Third person camera that follows the player tank, which is controlled with the wasd keys. Shoot with the space key
-
The game always tries to keep 5 target tanks around the player
-
Tanks spawn every 2 seconds starting after 3 seconds into the game
-
Bullets disappear after 20 seconds
-
When a bullet hits a target tank, it should explode. After 3 seconds the pieces sink into the floor and a new tank will respawn
-
Lab Solution - Switch branch to tank_ai to get the solution!
- Unity Fundamentals. Maks sure you know about:
- GameObjects
- GameComponents
- Transforms, positions, quaternions
- Lerping, Slerping and LookAt
- Getting and adding gamecomponents programmatically
- Awake, Start, Update
- Instiantiating GameObjects from prefabs
- Using materials an setting colours
- The fundamentals of lighting
- Using tags
- Using Coroutines
- Using Invoke
- Demo project we worked on with the movable tank
- Making creatures with tails and stuff
Use Forms to make a new creature. The steps we followed to make Steve are:
- Make a head:
- Renderer
- Boid
- Harmonic
- Spine Animator
- Optionally add
- Noise Wander
- Obstacle avoidance
- Harmoinc Controller
- Any other behaviours
- Make a body
- Just a renderer, no behaviours
- Make a Creature Generator
- Experiment with the parameters to change the layout of the segments
- Set the head and body prefabs
- Test it!
- Make fins/wings. You need to make seperate left and right wings
- Make the fin head
- Fin Animator
- Spine Animator
- Make the fin body segment
- Just a renderer
- Use a Creature Generator to layout the wing segments
- Make the fin head
- Make the tail
- Make the tail body segment and attach a CreatureGenerator to make the actual tail
- Make the tail head
- Tail Animator
- Spine Animator
- Make the tail body
- Make a procedural fish animation
- Fix bugs in Forms