Difference between revisions of "Intermediate C++ Game Programming Tutorial 11"
From Chilipedia
(Created page with "In this tutorial we learn how to draw parts (subregions) of images, we learn how to clip our shit so that it don't go off the screen (or off of any arbitrary rectangle we defi...") |
m (Text replacement - "http://www.planetchili.net/" to "https://www.planetchili.net/") |
||
(23 intermediate revisions by 2 users not shown) | |||
Line 7: | Line 7: | ||
== Video Timestamp Index == | == Video Timestamp Index == | ||
− | [https://youtu.be/ | + | [https://youtu.be/uHZmTmTRdkA Tutorial 11] |
+ | * Drawing subregions of a sprite sheet [https://youtu.be/uHZmTmTRdkA?t=57s 0:57] | ||
+ | * Using a <code>RectI clip</code> object, clip a (subregion of a) sprite [https://youtu.be/uHZmTmTRdkA?t=6m45s 6:45] | ||
+ | * Chili's Dank Meta Nugs - teacher's advice [https://youtu.be/uHZmTmTRdkA?t=13m16s 13:16] | ||
+ | * Code clean up. Have different overloaded definitions of <code>DrawSprite()</code> call the most advanced version with clipping [https://youtu.be/uHZmTmTRdkA?t=13m57s 13:57] | ||
+ | * Implement <code>DrawSprite</code> functions that apply chroma keying (transparent pixels) [https://youtu.be/uHZmTmTRdkA?t=15m03s 15:03] | ||
+ | * Adding <code>operator==</code> and <code>operator!=</code> member functions (comparison operators) to the <code>Color</code> class [https://youtu.be/uHZmTmTRdkA?t=17m37s 17:37] | ||
+ | * Homework assignment [https://youtu.be/uHZmTmTRdkA?t=19m00s 19:00] | ||
== Source Code == | == Source Code == | ||
[https://github.com/planetchili/sprite Sprite Repo]<br /> | [https://github.com/planetchili/sprite Sprite Repo]<br /> | ||
+ | [https://github.com/planetchili/poo_game Poo Game Repo] | ||
== Download Materials == | == Download Materials == | ||
− | * [ | + | * [https://www.planetchili.net/downloads/I11-Images.zip Tutorial and Homework Images] |
== Homework == | == Homework == | ||
− | The homework is to use the images provided in the above zip file to upgrade the Poo Game to no longer | + | The homework is to use the images provided in the above zip file to upgrade the Poo Game to no longer use compiled sprites. |
+ | * [https://youtu.be/BPExmXz0Luk Homework solution video ] | ||
== See also == | == See also == | ||
* [[Intermediate C++ Game Programming Tutorial 12|Next in series (Tutorial 12)]] | * [[Intermediate C++ Game Programming Tutorial 12|Next in series (Tutorial 12)]] | ||
* [[Intermediate C++ Game Programming Series]] | * [[Intermediate C++ Game Programming Series]] |
Latest revision as of 13:26, 5 May 2022
In this tutorial we learn how to draw parts (subregions) of images, we learn how to clip our shit so that it don't go off the screen (or off of any arbitrary rectangle we define in fact), and we learn to draw sprites with transparent pixels.
Contents
Topics Covered
- Drawing image subregions
- Clipping sprites
- Drawing sprites with chroma keying (transparent pixels)
Video Timestamp Index
- Drawing subregions of a sprite sheet 0:57
- Using a
RectI clip
object, clip a (subregion of a) sprite 6:45 - Chili's Dank Meta Nugs - teacher's advice 13:16
- Code clean up. Have different overloaded definitions of
DrawSprite()
call the most advanced version with clipping 13:57 - Implement
DrawSprite
functions that apply chroma keying (transparent pixels) 15:03 - Adding
operator==
andoperator!=
member functions (comparison operators) to theColor
class 17:37 - Homework assignment 19:00
Source Code
Download Materials
Homework
The homework is to use the images provided in the above zip file to upgrade the Poo Game to no longer use compiled sprites.