【转】Beginning Game Programming v2.0
Beginning Game Programming v2.0
Last Updated 8/19/18
Greetings everyone, welcome to the ground up recoding of Beginning Game Programming with SDL. This time we will be coding with SDL 2 which has been released on the SDL website.
These tutorials were designed for C++ programmers who want to move from text based games to real time games with graphics. By the end of these tutorials, you'll know the basics to make your first real video game!
Follow @lazyfoo_net
Table of Contents | |
Lesson 01 Hello SDL |
In this tutorial we will be setting up the SDL library and creating our first window. |
Lesson 02 Getting an Image on the Screen |
Now that we can get a window to appear, lets blit an image onto it. |
Lesson 03 Event Driven Programming |
Here we'll start handling user input by allow the user to X out the window. |
Lesson 04 Key Presses |
Here we'll learn to handle keyboard input. |
Lesson 05 Optimized Surface Loading and Soft Stretching |
Now that we know how to load and blit surfaces, it's time to make our blits faster. We'll also take a smaller image and stretch it to fit the screen. |
Lesson 06 Extension Libraries and Loading Other Image Formats |
Here we'll be using the SDL_image extension library to load png images. |
Lesson 07 Texture Loading and Rendering |
A big new feature in SDL 2.0 is hardware accelerated texture based 2D rendering. Here we'll be loading an image to render it using textures. |
Lesson 08 Geometry Rendering |
Another new feature in SDL 2.0 is hardware accelerated primitive rendering. Here we'll be using it to render some common shapes. |
Lesson 09 The Viewport |
SDL 2.0 also lets you control where you render on the screen using the viewport. We'll be using the viewport to create subscreens. |
Lesson 10 Color Keying |
Here we'll use color keying to give texture transparent backgrounds. |
Lesson 11 Clip Rendering and Sprite Sheets |
Using clip rendering, you can keep multiple images on one texture and render the part you need. We'll be using this to render individual sprites from a sprite sheet. |
Lesson 12 Color Modulation |
We'll be altering the color of rendered textures using color modulation. |
Lesson 13 Alpha Blending |
Here we'll be using SDL 2.0 new hardware accelerated alpha blending. |
Lesson 14 Animated Sprites and Vsync |
Here we'll be using a sequence of sprites to animate them. |
Lesson 15 Rotation and Flipping |
Here we'll be using SDL 2.0's new texture rotation and flipping. |
Lesson 16 True Type Fonts |
Here we'll be rendering text from true type fonts using SDL_ttf. |
Lesson 17 Mouse Events |
Here we'll learn to read mouse input using mouse events. |
Lesson 18 Key States |
There's other ways to read the keys besides event polling. Here will get the current states of the keyboard using get states. |
Lesson 19 Gamepads and Joysticks |
Here we'll learn to read input from a game controller. |
Lesson 20 Force Feedback |
Another new feature for SDL 2.0 is rumble support using the SDL haptics. We'll make our controller rumble when a button is pressed. |
Lesson 21 Sound Effects and Music |
Here we'll be using SDL_mixer to add music and sound to our SDL App. |
Lesson 22 Timing |
Here we'll be using SDL's time capabilites. |
Lesson 23 Advanced Timers |
Here we'll extend SDL time capabilities to make our own custom timer. |
Lesson 24 Calculating Frame Rate |
Here we'll use the timers we built to measure frame rate. |
Lesson 25 Capping Frame Rate |
If you need a constant frame rate when vsync isn't available, frame rate capping can be used as a fall back. |
Lesson 26 Motion |
Here we'll be taking what we learned about render and handling input to make a dot move around the screen. |
Lesson 27 Collision Detection |
Here we'll have two objects interact with each other using bounding box collision detection. |
Lesson 28 Per-pixel Collision Detection |
Here we'll have two object collide using per-pixel collision detection. |
Lesson 29 Circular Collision Detection |
Here we'll learn to detect collisions with circles and boxes. |
Lesson 30 Scrolling |
Here we'll be implement a camera to scroll levels larger than the screen. |
Lesson 31 Scrolling Backgrounds |
Here we'll using a scrolling background to give the illusion of an infinite level. |
Lesson 32 Text Input and Clipboard Handling |
Here we'll using SDL 2.0's new way of handling text input and its new clip board handling feature. |
Lesson 33 File Reading and Writing |
Here we'll using SDL's RWOps API to do binary file IO. |
Lesson 34 Audio Recording |
SDL 2.0.8 supports audio recording. Here we'll be copying from the audio device to record and copying to the audio device to play back. |
Lesson 35 Window Events |
Here we'll be handling events from a resizable window. |
Lesson 36 Multiple Windows |
A new feature in SDL is the ability to support more than one window. Here we'll make an application that has 3 windows. |
Lesson 37 Multiple Displays |
Another new feature of SDL 2.0 is the ability to handle more than one physical display. Here we'll make our window jump from display to display. |
Lesson 38 Particle Engines |
Here we'll use a simple particle effect to create a simple trail effect. |
Lesson 39 Tiling |
Here we'll make a simple level using a tiling engine. |
Lesson 40 Texture Manipulation |
Here we'll be directly accessing and manipulating a texture's pixels. |
Lesson 41 Bitmap Fonts |
Here we'll be using a texture as a font using bitmap font techniques. |
Lesson 42 Texture Streaming |
Here we'll be rendering from a streaming data source using texture streaming. |
Lesson 43 Render to Texture |
Here we'll be taking a scene and rendering it to a texture. |
Lesson 44 Frame Independent Movement |
Here we'll be making the dot move independent of the current frame rate. |
Lesson 45 Timer Callbacks |
SDL has another timing mechanism called timer callbacks. Here we'll be setting a function to be called back after a certain amount of time. |
Lesson 46 Multithreading |
Multithreading allows your program to do things simultaneously. Here we'll make things print to the console from outside our main thread. |
Lesson 47 Semaphores |
A major issue in multithreaded applications is that you need to make sure that they don't try to access the same data at the same time. Semaphores are a way to make sure only a certain amount of threads are performing an action at the same time. |
Lesson 48 Atomic Operations |
Atomic operations are another way to synchronize threads. Here we'll be redoing the previous tutorial with atomic counters. |
Lesson 49 Mutexes and Conditions |
Mutexes and conditions are yet another way to synchronize threads. Here we'll be using the added benefit that they allow threads to communicate with each other. |
Lesson 50 SDL and OpenGL 2 |
SDL is a powerful tool when combined with OpenGL. If you're just starting out with OpenGL or want to maximize compatibility, you can use SDL with OpenGL 2.1. In this tutorial we will make a minimalist OpenGL 2.1 program. |
Lesson 51 SDL and Modern OpenGL |
SDL 2.0 now has support for OpenGL 3.0+ with context controls. Here we'll be making a minimalist OpenGL 3+ core program. |
Lesson 52 Hello Mobile |
Here we'll be loading and displaying an image in our first mobile app! |
Lesson 53 Extensions and Changing Orientation |
Here we'll be using SDL extension libraries and handling changing orientation. |
Lesson 54 Touches |
Here we'll be handling single touch input. |
Lesson 55 Multitouch |
Here we'll be handling multitouch events like pinches and rotation. |
FROM: http://lazyfoo.net/tutorials/SDL/index.php
【转】Beginning Game Programming v2.0的更多相关文章
- [Android]Android端ORM框架——RapidORM(v2.0)
以下内容为原创,欢迎转载,转载请注明 来自天天博客:http://www.cnblogs.com/tiantianbyconan/p/5626716.html [Android]Android端ORM ...
- JuCheap V2.0响应式后台管理系统模板正式发布beta版本
JuCheap V1.* 查看地址: http://blog.csdn.net/allenwdj/article/details/49155339 经过半年的努力,JuCheap后台通用响应式管理后台 ...
- python gettitle v2.0
#!/usr/bin/env python # coding=utf-8 import threading import requests import Queue import sys import ...
- ".NET Compact Framework v2.0 could not be found."
参考: http://blog.csdn.net/godcyx/article/details/7348431 问题原因: That's a known issue where VS can't di ...
- 【JS】heatmap.js v1.0 到 v2.0,详细总结一下:)
前段时间,项目要开发热力图插件,研究了heatmap.js,打算好好总结一下. 本文主要有以下几部分内容: 部分源码理解 如何迁移到v2.0 v2.0官方文档译文 关于heatmap.js介绍,请看这 ...
- 怎样在IDEA中使用JUnit4和JUnitGenerator V2.0自动生成测试模块
因为项目的需要,所以研究了一下自动生成测试代码.将经验记录下来,总会有用的.我个人认为,好记性不如多做笔记多反思总结. 1. 前提条件 开发环境已正确配置 工程已解决JUnit依赖关系(pom ...
- 微信快速开发框架(六)-- 微信快速开发框架(WXPP QuickFramework)V2.0版本上线--源码已更新至github
4月28日,已增加多媒体上传及下载API,对应MediaUploadRequest和MediaGetRequest ------------------------------------------ ...
- 【原创】风讯DotNetCMS V1.0~V2.0 SQL注入漏洞
文章作者:rebeyond 注:文章首发I.S.T.O信息安全团队,后由原创作者友情提交到乌云-漏洞报告平台.I.S.T.O版权所有,转载需注明作者. 受影响版本:貌似都受影响. 漏洞文件:use ...
- API Monitor v2.0 Alpha-r13 (32+64) 汉化版
API Monitor v2.0 Alpha-r13 (32+64) 汉化版: 链接: https://pan.baidu.com/s/1jIx5znC 密码: 4538 本软件已最大化汉化,已经趋于 ...
随机推荐
- 译注(3): NULL-计算机科学上最糟糕的失误
原文:the worst mistake of computer science 注释:有些术语不知道怎么翻译,根据自己理解的意思翻译了,如有不妥,敬请提出:) 致谢: @vertextao @fra ...
- 数据定义语言(DDL Data Definition Language)基础学习笔记
创建数据库 create database if not exists STUDY character set utf8 ; 查看新建数据库的语句 SHOW CREATE DATABASE STUDY ...
- pixy&STM32使用记录(串口&SPI外设)
先踏踏实实的把stm32的外设串口,SPI搞清楚,不要眼高手低,看不起小事.用SPI通信将pixy的数据读出来,将数据用串口发到串口助手上,然后处理数据,利用STM32的定时器调节pwm,控制电机,先 ...
- 【LUOGU???】WD与地图 整体二分 线段树合并
题目大意 有一个简单有向图.每个点有点权. 有三种操作: 修改点权 删除一条边 询问和某个点在同一个强连通分量中的点的前 \(k\) 大点权和. \(n\leq 100000,m,q\leq 2000 ...
- [leetcode] 5.Longest Palindromic Substring-1
开始觉得挺简单的 写完发现这个时间超限了: class Solution: def longestPalindrome(self, s: str) -> str: # longest palin ...
- Java算法 -- 二分查找
折半查找,要求待查找的序列有序.每次取中间位置的值与待查关键字比较,如果中间位置的值比待查关键字大,则在前半部分循环这个查找的过程,如果中间位置的值比待查关键字小,则在后半部分循环这个查找的过程.直到 ...
- 重学JavaScript - 数组
作者:狐狸家的鱼 GitHub:surRimn 整理自MDN文档 数组 数组是一种类列表对象,长度和元素类型不固定. 描述 访问数组 JavaScript数组的索引是从0开始的,第一个元素的索引为0, ...
- FTP文件上传并支持断点续传(一)—— win10 本地环境 ftp站点构建
由于之前项目开发是采用是采用的FTP文件上传,就一直想学习,但由于FTP服务器是公司的,为了方便就像把本地变成ftp站点,其实很简单,但也有很多坑 这里简单介绍一下自己遇到的坑 一:开通本地的ftp权 ...
- loj6074 子序列
题目链接 思路 首先考虑暴力\(dp\) 用\(f[i][j]\)表示前\(i\)个字符,以\(j\)这个字符结尾的本质不同的字符串个数. 然后就有如下的转移 \(if(s_i==j)\) \[f_{ ...
- vs 开发 win32 程序,调出控制台窗口,方便调试
设置方法 项目 -> 属性 -> 生成事件 ->后期生成事件 -> 命令行 中添加 editbin /SUBSYSTEM:CONSOLE $(OutDir)\$(Project ...