SDL Collision

Posted by Tim Jones on October 31st, 2008

If you are still trying to catch your breath from the last tutorial, I recommend you sit down, because this next tutorial won’t be any nicer. In this tutorial we will be extending our entity class a bit further with collisions, and movement. So hold on to your pants, and get ready.

Read the rest of this entry »

I need You

Posted by Tim Jones on October 22nd, 2008

Hey everyone, I know things have been slow going. So, in an effort to keep things from becoming dry and stale on this site, I want ideas from all of you of how I can keep things interesting. I know a new tutorial would do that, but I am looking for other things. Perhaps a forum, challenges (with rewards), and whatever. I tried user tutorials, but not very many of your are the teaching type I guess. Let me all know what you come up with (leave your idea in the comments).

Linux Files Back Up

Posted by Tim Jones on October 22nd, 2008

Unfortunately, Gaten is unable to continue hosting of the files. So, he has sent me over all of the files and I have put them all back up. If anyone is interested in hosting any mirrors, let me know.

So, all of you that have been unable to grab the tar files shouldn’t have a problem now.

What’s been keeping me busy

Posted by Tim Jones on August 22nd, 2008

No, I did not fall off of the face of the earth, get blown up, fall in a neverending pit of doom, or get eaten by a thousand piranhas. I’ve actually just been way busy; I’ve tried to keep up with comments and help, so all you people out there feel free. Regarding the next tutorial, it’s still sitting right here in its unfinished glory. I won’t give any dates when it will come out, just look for it.

To help illustrate my point, see the pictures below:

Read the rest of this entry »

SDL Scale Surface

Posted by Tim Jones on July 15th, 2008

The following user tutorial was created by Mod J., for the purpose of expanding upon the SDLTutorials.com series, and expounding upon the use of SDL. This tutorial, though not purposely a part of the SDLTutorials.com or created for the series, may be a branch or addition to the series. Please read notes by the author for any additional code and/or framework used by the author. If you wish to submit your own tutorial to this site, please visit the “User Tutorials” page.


Today we’re going to learn something about extending the capabilities of SDL_Surfaces. If we take a look at OpenGL, what happens when we load a Surface and we render it specifying a width and height bigger than the Surface’s original width and height? It gets automatically scaled (unless you specify you want to be repeated). In SDL there is no automatic way of scaling surfaces, so we’re going to make a (relatively simple) routine that does the trick.

Read the rest of this entry »

SDL Sokoban (User Tutorial)

Posted by Tim Jones on June 9th, 2008

The following user tutorial was created by Arseniy B., for the purpose of expanding upon the SDLTutorials.com series, and expounding upon the use of SDL. This tutorial, though not purposely a part of the SDLTutorials.com or created for the series, may be a branch or addition to the series. Please read notes by the author for any additional code and/or framework used by the author. If you wish to submit your own tutorial to this site, please visit the “User Tutorials” page.


IMPORTANT NOTE: I DON’T NAME SURFACES LIKE TIM DOES. WHEN HE CALLS IT Surf_Display, MINE IS SIMPLY SurfDisplay, WITHOUT THE UNDERSCORE. MAKE SURE YOU KNOW THIS, AND ADAPT TO THE TUTORIAL ACCORDINGLY. ALSO, WHEN I MAKE PROTOTYPES IN CLASS DEFINITIONS, THE ONLY STUFF I WRITE IN THE PARAMETERS AREA (I.E. THE PARENTHESES) IS THE TYPE OF DATA TAKEN, NOT THE NAME OF THE DATA TAKEN. THAT NAME IS ONLY IN THE ACTUAL FUNCTION DEFINITION, AT LEAST FOR ME.

This tutorial is based on everything you’ve learned by now, if you’ve been following the tutorials in order and have just finished the Maps tutorial. Get ready to get a glimpse of creating your first real game! (Not counting that fabulous tic-tac-toe.) Similarly, the code this comes from is from all the code you’ve written up to the Maps tutorial, and including it. It would be wise to make a new Code::Blocks project (or a new DevC++ project, or whatever), because this tutorial will delve a different way for a bit, and you don’t want to mess up your existing code for the upcoming Collision Detection tutorial. Speaking of that, this tutorial will introduce you to very simple collision detection, on a tile-based board.

Read the rest of this entry »

Wiki

Posted by Tim Jones on June 4th, 2008

Sorry guys, still no new tutorial yet, but I will have it ASAP. I did want to say though that I started a sort of User Project Wiki, to house projects that I have going on, or that many of you people might have going on. You can reach it here:

http://wiki.sdltutorials.com/

It will help me keep things organized, and prioritized; and hopefully that will help me push out tutorials faster.

Upcoming Tutorials

Posted by Tim Jones on May 2nd, 2008

Sorry guys, been busy in life again. The wife and I have been looking into buying some land, and building a house. So some good news in the real world. I have started the next tutorial, hopefully I can get that out to everyone as soon as possible; I feel a little bad for not putting it out sooner, I know that everyone is eagerly awaiting it. For now I encourage everyone to look at a new game I am working on called Charlie and the Banana in the SDL Games section. It has Entity to Map collision, as well as Entity to Entity collision already in place (though it uses OpenGL + SDL). That may provide a bit more help than the current Kizare release.

I also have a few side tutorials in the works (SDL_ttf), but they won’t be released until the collision tutorial. Sorry to keep everyone waiting (this is a hobby you know ;) ).

SDL SoundBank

Posted by Tim Jones on April 11th, 2008

In this side tutorial we are going to be adding a soundbank that will load all of our sounds, and then we call play them via an ID whenever we want. This tutorial will only deal with sounds, not music, and mind you it’s a very basic tutorial that gets the job done. There is much that can be added to this class, for channels, groups and such, but we’re dealing with basics here. We’ll base this tutorial off of my SDL Events tutorial. So use those project files if you need something to work off of.

The first thing you need to do is download SDL mixer from the SDL website. It’s also included in the SDL library I provide on my website. Be sure to put the include files in the same directory as your SDL include files, and your lib files in the same directory as your SDL lib files to make things easier.

Read the rest of this entry »

SDL Maps

Posted by Tim Jones on March 15th, 2008

As I stated in the last lesson, we’re going to be looking at making a Map class that will be tile based. In addition to the maps, we’ll be creating Areas that enhouse many Maps. While we could create one giant map, it’s far easier to manage many smaller maps, and also opens the possibility of tiling maps as well. By the way, head on over to the SDL Image tutorial if you haven’t already done so, we will be making the switch over to SDL Image and stop using SDL_LoadBMP. No more chatter, lets get started.

Read the rest of this entry »



bottom
© SDLTutorials.com, 2007 - 2009, All rights reserved. | Powered by: JH Specialty, Inc. - Fort Wayne Web Design