Tutorials
GLZelda 1: Introduction and Setup (Updated/Fixed Links)
1And the first tutorial from the repurposed GLZelda tutorial is up! Here’s the PDF, Source, and an OS X binary (sorry, my Windows machine is packed away at the moment).
GLZelda-1-Src
GLZelda-1-Bin-OSX
GLZelda-1-PDF
Update:
Fixed the links… <_<
SFML Tutorial Series Changeover
I’m sorry to the people that have been eagerly anticipating the next tutorials in my SFML-Zelda series (I’m honestly surprised that I’ve gotten any results, especially considering the state of the current tutorials), but I’ve decided to scrap SFML in favor of OpenGL. It will still be a C++ game programming tutorial series, and will be using Legend of Zelda as a backdrop for it, but at this point I’m tired of the problems SFML has given me that shouldn’t exist– at least with OpenGL, I’ll know that the problems lie with me. For those still interested, I still plan to kick the tutorial off no later than early February, though specific dates will depend on when my stuff arrives after the move. I’ll focus the tutorials around OpenGL 2.x because of its wider support base, but we will be using a shader-based graphics pipeline for it. I will try to cover the basics of OpenGL as best I can, but I greatly recommend taking a look at Beginning OpenGL Game Programming, Second Edition– it’s what I learned from, and it served me well.
TGB 1.7.5 – Multiple Animations for Sprite
It seems that once again I’ve heard the call to write a one-shot tutorial (and strangely enough, this one is also one related to animations). This time, the call for help comes from a user on the GarageGames forums, from a user jumping into the Torque engine line with Torque Game Builder 1.7.5. I have a great amount of respect and love for the Torque engines, and the GarageGames team and community have a lot of people that are really fun to be around (in contrast to my experience with the Unity boards, which seems to have no shortage of elitists).
Once again, we will be writing up a Zelda-like animation, because the file’s on-hand and already formatted and somewhat optimized for our use. And so, if you don’t have it from following previous tutorials, here it is again:
(more…)
SFML Zelda Tutorial 3: Events & Design Discussion
Introduction
Welcome to my newest tutorial series: SFML Zelda. Throughout this tutorial series, we will be building a two-dimensional Legend of Zelda fan game. Before we begin, I want to say what this tutorial is and is not. The tutorial is a basic game programming tutorial, written with C++ and the SFML 1.6 game library. The series is not covering advanced game development techniques. There are many things that I will cover in this tutorial that are better handled by other means, and I encourage you to look for other resources and expand your knowledge.
Code License
All code in this tutorial series is released under the zLib 1.2.2 License (can be viewed here).
Tutorial 3 Overview
For this tutorial, I am going to be taking a different approach. There is only a minor amount of code in this tutorial, as I am instead going to focus primarily on an explanation of the system that we are designing for the game, and some of the reasoning behind the decisions that I will be making regarding it. The code will be switching us from using the standard Window class to the RenderWindow class within the SFML Graphics package, and will change our system to use an event structure, rather than relying on the task manager or debugger to kill the application instance.
Table of Contents
SFML Zelda Tutorial 2B:: Project Setup in XCode 4
Introduction
Welcome to my newest tutorial series: SFML Zelda. Throughout this tutorial series, we will be building a two-dimensional Legend of Zelda fan game. Before we begin, I want to say what this tutorial is and is not. The tutorial is a basic game programming tutorial, written with C++ and the SFML 1.6 game library. The series is not covering advanced game development techniques. There are many things that I will cover in this tutorial that are better handled by other means, and I encourage you to look for other resources and expand your knowledge.
Code License
All code in this tutorial series is released under the zLib 1.2.2 License (can be viewed here).
Tutorial 2B Overview
In this tutorial, we are going to establish the SFML Zelda project in Xcode 4. I am using a beta copy of Xcode 4.2, so there may be minor differences between our build environments, but these should be minimal. In this tutorial, we will obtain a copy of the SFML SDK and build a minor test project.
Table of Contents
(I)Obtaining SFML
(II) Creating the SFML-Zelda Project
(III) Project Configuration
(IV) Test Code
Writing a simple 2D Animation system in XNA
A friend of mine recently asked me for some help on 2D animation within XNA, and so I wrote up a quick, and somewhat simplistic, system. Figured it wouldn’t hurt to go ahead and write up a small tutorial and post it here, since it’s similar to the animation system that I’m planning on using in the SFML-Zelda tutorial series (which I’m planning on picking back up, now that I’ve returned from my CCNA course).
Downloads
AnimationDemo Binary
AnimationDemo – Source
Setup
Go ahead and set up an XNA project. The system I’m showing here is rather simplistic, and has many areas in which it can be improved for efficiency, but this isn’t something that’s going to require a complex project setup.
How it will work
This animation system will include a very basic Finite State Machine-style animation, using a single sprite sheet for rendering. While scene objects in this sample only use a single sprite sheet per object, it could be modified so that animation data is stored outside of the scene object, which will pretty much be necessary (you’ll see why in a minute) for anything more complex than this sample.
Sprite sheets are expected to be set up with each included animation in the sheet containing an equal number of frames. Each animation state gets its own row within the sheet, with each frame of the animation taking up one column per row. Every frame must be the same size, and there is no assumed spacing or borders for the sheet or the frame. The image I am going to use in this sample is a running animation from The Legend of Zelda: A Link To The Past.
SFML Zelda Tutorial 2A:: Project Setup In Visual C++ 2010
Introduction
Welcome to my newest tutorial series: SFML Zelda. Throughout this tutorial series, we will be building a two-dimensional Legend of Zelda fan game. Before we begin, I want to say what this tutorial is and is not. The tutorial is a basic game programming tutorial, written with C++ and the SFML 1.6 game library. The series is not covering advanced game engine development techniques. There are many things that I will cover in this tutorial that are better handled by other means, and I encourage you to look for other resources and expand your knowledge.
Code License
All code in this tutorial series is released under the zLib 1.2.2 License (can be viewed here).
Tutorial 2A Overview
In this tutorial, we are going to establish the SFML Zelda project in Visual C++ 2010. I have a copy of Visual Studio 2010 Professional, so there may be some minor differences between my screenshots and what you have, but the functionality and locations of settings should be exactly the same, and there will be no functional difference in the builds for our projects. In this tutorial, we will first retrieve a copy of SFML then recompile it using Visual C++ 2010. We do this because the libraries provided for SFML are compiled against VS2008, and the libraries have incompatibilities that cause problems when attempting to run the program (the program will appear to have compiled with no problems).
After we build the project, we are going to establish the Visual Studio solution for SFML-Zelda and configure Visual C++ to work with our directory structure. Finally, we will test our project setup by building a small sample project with SFML. (more…)
SFML Zelda Tutorial 1:: Introduction & Setup
Introduction
Welcome to my newest tutorial series: SFML Zelda. Throughout this tutorial series, we will be building a two-dimensional Legend of Zelda fan game. Before we begin, I want to say what this tutorial is and is not. The tutorial is a basic game programming tutorial, written with C++ and the SFML 1.6 game library. The series is not covering advanced game engine development techniques. There are many things that I will cover in this tutorial that are better handled by other means, and I encourage you to look for other resources and expand your knowledge.
Code License
I am releasing all code in this tutorial series under the version 1.2.2 (October 2004) zLib license.
/** Copyright (c) 2011 Ken "Minalien" Murray This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. **/
Tutorial 1 Overview
In this tutorial, I am going to cover the basic structure of our engine, and we will create the directory structure and explain my reasoning behind it. The project we will create will work on any platform for which there exists support for SFML, but I will be explaining the creation of the project on Windows and OS X 10.6 using Visual C++ 2010 (Express edition should work fine for this) and XCode 4 (Available from the Apple Developer Center if you are a registered developer, or for approximately $5 USD on the Mac App Store) respectively. Finally, I will be using the Google C++ Style Guide for my code in these tutorials. Style guides aren’t entirely necessary, but they help to ensure that coding style remains consistent across between members of a development team.
Directory Structure
(Root Directory) – I’m calling mine SFMLZelda, to differentiate it from my other projects
bin – This is where we will configure our IDEs to place project executables on build. It will not be included in the source control if you choose to set one up (I’m setting up GIT for this)
ext – This is where I am going to place external libraries. I do it this way because it’s easier for other developers to ensure they are using the same versions of all dependent libraries
src – This is where all of our source files will reside, and will be broken into its own smaller directory setup for each category of source files (video, system, etc).
proj – This is where the editor-specific project files will be placed. Each will have its own subdirectory to keep it separate from the others – msvc2010, xcode4, or whatever other editors you should choose to use.
I choose to set it up this way because it helps to keep external libraries separate (but available), keeps binaries and intermediate build data away from our source code directories, and keeps project directories separate and clean.
The next two tutorials are going to cover creation of the project – one in Visual C++ and one in XCode 4, including setting up SFML. The SFML libraries aren’t pre-built for Visual Studio 2010, so I will cover retrieving the code from the Git repository and building it for our game project. After the project is established, the third tutorial will cover the overall design concept behind our Zelda game, and then we will begin programming the project in earnest.

