Introduction to SDL 2.0

By: George Hayes
Project / Source
SDL201.zip

How to setup codeblocks, mingw and SDL2.0

The tutorial shows how to install and setup SDL2.0 in with codeblocks and mingw. The tutorial provides instruction and code to create the window along with proper project settings and so on.

By: George Hayes
Project / Source
SDL202.zip

SDL 2.0 tutorial 2 loading and displaying and image

How to load and display an image or texture using SDL2.0

By: George Hayes
Project / Source
SDL203.zip

SDL2.0 tutorial 3 event handling

This tutorial is an introduction into event handling for mouse and keyboard.

By: George Hayes
Project / Source
SDL204.zip

SDL2.0 tutorial 4 Clipping textures and displaying them

The tutorial shows how to use SDL_RenderCopy to clip a portion of a texture and display it. A texture with 8 colors is clipped and used to create a random 12x9 map on the display. In addition it is compared to using 3 separate textures to do the same.

By: George Hayes
Project / Source
SDL205.zip

SDL2.0 tutorial 5 timers SDL_GetTicks

This tutorial shows how you can use SDL_GetTicks for timing. The tutorials example uses the timer to ensure vehicles travel at the same rate from system to system.

By: George Hayes
Project / Source
SDL206.zip

SDL2.0 tutorial 6 Mixer Music and Soundeffects

The tutorial show you how to use the SDL_Mixer library to play music and soundeffects

By: George Hayes
Project / Source
SDL207.zip

SDL2.0 tutorial 7 background scrolling and looping

This tutorial is teaches how to scroll and loop the back ground as used in a side-scroller game.

By: George Hayes
Project / Source
SDL208.zip

SDL2.0 tutorial 8 a better scrolling background

This tutorial shows a better means of creating a background than the previous video. It uses smaller object to create a background that allows for a much larger map to scroll through. You should note that it isn't necessary to set building positions based off a modulus of the position. One could use an array to store building positions and the building id. This would allow you to plan your map.

By: George Hayes
Project / Source
SDL209.zip

SDL2.0 tutorial 9 Display text using ttf(true type font)

This tutorial is a basic tutorial on how to display text using true type font. It is a fairly basic tutorial it does not show how to build a full keyboard handler. That will have to be done in another video.

By: George Hayes
Project / Source
SDL210.zip

SDL2.0 tutorial 10 better keyboard handling and more on fonts

This tutorial covers better keyboard handling so that more than 1 key can be used at a time. It also covers fonts in greater detail such as using multiple lines and covers some issues with converting keyboard input to font. It is not a tell all in solving all the problems. The keyboard handler is usable code as is. The console portion of the code is purely meant for demonstration purposes.

By: George Hayes
Project / Source
SDL211.zip

SDL2.0 tutorial 11 manipulate pixels of surface, save surface as png, resize screen, display surface

This tutorial covers manipulating the pixels of a surface, saving the surface as a png, displaying the surface as a texture, and re-sizing the screen contents.

By: George Hayes
Project / Source
SDL212.zip

SDL2.0 tutorial 12, SDL_UpdateTexture, SDL_LockTexture, SDL_UnlockTexture, SDL_memcpy

This tutorial covers SDL_UpdateTexture, SDL_LockTexture, SDL_UnlockTexture, SDL_memcpy. It uses a modified version of tutorial 11 to create constantly new random height maps and display them to the screen