MonoGame University

The MonoGame Creators University is your one stop shop for educational content produced by the MonoGame Foundation. We will also be promoting other fantastic tutorials and guides produced by the MonoGame community.

Curated by: MonoGame (15 videos)


Currently Playing: MonoGame University - Chapter 6 - SpriteBatch and Textures

An educational stream building games for the MonoGame community, with live tips, tricks and more. This week we are digging deep into Chapter 06: Working with Textures of the Building 2D Games tutorial. Time Codes: 00:15 - Kick off and overview 01:55 - Accessing Learning 03:25 - The API guides 03:55 - HowTo / WhatIs guides 04:30 - Course start - Textures & SpriteBatch 32:00 - Over to the code - recap from last week 35:40 - Coding with the tutorial 01:01:25 - Showcasing the upcoming tutorials (2D Shaders, 3D and Mobile) 01:03: Sign-off Quick Note: The issue at 44:20 had nothing to do with the code! We were getting the screen size BEFORE the graphics had finished initializing in "PresentParameters". In "Initialize", graphics are not resized for the screen yet. This is easily solved by calculating the screen size in LoadContent. I will cover this in the next stream! Basically everything you ever wanted to know about drawing textures to the screen, such as: * The different parameters of the SpriteBatch.Draw method and how they affect sprite rendering. * How the Rotation parameter works and how to convert between degrees and radians using MathHelper.ToRadians. * Using the origin parameter to affect sprite positioning, rotation, and scaling. * Sizing things up using the scale parameter, to resize sprites uniformly or along individual axes. * Flipping textures with the SpriteEffects enum, to flip sprites horizontally and vertically. * How the color parameter can be used to tint sprites and adjust their opacity. * Cutting textures up with the sourceRectangle parameter to draw specific regions from a texture. * Exploring sprite layering using the layerDepth parameter and different SpriteSortMode options. Stay tuned and have your questions ready. This week will focus on working with Textures and the SpriteBatch from Chapter 6 of the 2D Beginner tutorial. - 2D Tutorial - https://docs.monogame.net/articles/tutorials/building_2d_games/index.html - GitHub Project - https://github.com/MonoGame/MonogameUniversity-2D Offline chat available here: https://discord.com/channels/355231098122272778/1429861386690887711


Tracks in this Playlist