Difference between revisions of "Intermediate C++ Game Programming Tutorial 12"

From Chilipedia
Jump to: navigation, search
(Video Timestamp Index)
(Video Timestamp Index)
Line 10: Line 10:
 
== Video Timestamp Index ==
 
== Video Timestamp Index ==
 
[https://youtu.be/KXn7-5zg3J4 Tutorial 12]
 
[https://youtu.be/KXn7-5zg3J4 Tutorial 12]
* ... [https://youtu.be/KXn7-5zg3J4?t=1m0s 1:00]
+
* Introducing the <code>Character</code> and <code>Animation</code> classes [https://youtu.be/KXn7-5zg3J4?t=0m20s 0:20]
  
 
== Source Code ==
 
== Source Code ==

Revision as of 04:51, 8 September 2019

In this tutorial Chili shows us an example of how to create a class for an animated sprite, and how to use a collection of these animated sprites to create a walking character class.

Topics Covered

  • Animated sprite class design
  • Walking character class design

Notes

The technique we use of storing a reference to Surface in each Animation object will work for now, but it will cause us a pain in the dick in the future when we start using our characters in containers like std::vector. The reason for this is because you cannot assign a reference to refer something else after it has been bound, and so the compiler cannot generate copy assign for us by default. We will fix this problem when it becomes an issue for us (in the Action RPG Project).

Video Timestamp Index

Tutorial 12

  • Introducing the Character and Animation classes 0:20

Source Code

Sprite Repo

Download Materials

Homework

None!

See also