• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
ThomasK

Can someone link me to some tutorials?

16 posts in this topic

I have a ton of things I want in my SDL game, But I can't find any tutorials on specifically what I want. If someone could link me to a tutorial of anything on the following list. That would be great.

 

 

Basic Game Menu,

Screen follows player,

Inventory,

Attack/Defense System,

Animations and

And NPC's.

 

Thanks!

Edited by ThomasK
0

Share this post


Link to post
Share on other sites

Lazyfoo

 

http://www.lazyfoo.net/SDL_tutorials/

 

Best place for SDL by far. 12-12-2012 was the last update so you'll be good. That is where I started when I was learning SDL. I didn't get very far as at the time I was already into Allegro. GL with lazyfoo there is a lot of information there that wasn't 5 years ago when I was learning off lazyfoo.

Edited by 0Circle0
0

Share this post


Link to post
Share on other sites
Lazyfoo

 

http://www.lazyfoo.net/SDL_tutorials/

 

Best place for SDL by far. 12-12-2012 was the last update so you'll be good. That is where I started when I was learning SDL. I didn't get very far as at the time I was already into Allegro. GL with lazyfoo there is a lot of information there that wasn't 5 years ago when I was learning off lazyfoo.

 

Thanks. But I can imagine my file becoming very large with everything I want. Do you know of a way to make different files work together in 1 game? 

0

Share this post


Link to post
Share on other sites

EDIT: Sounds like you want to work with DLL files. Which is not SDL specific but C specific when it comes to programming in SDL.

 

I always seperated my functions, variables, and DATA files into separate files and put them into *.h headers.

Then in my main.c I'd just do this

 

 

#include "data.h"
#include "Variables.h"
#include "Functions.h"

 

 

And if you're making a game it is going to be very large to begin with. It is all how you code and how much you are going to put into it. In (WOW)Wrath of the Lich King, there were approximately 5.5 million lines of code in the game, not including database entries and what not. I don't understand what you mean by your game will get big.

Edited by 0Circle0
0

Share this post


Link to post
Share on other sites

Ugh. Those tutorials won't work for me. I need a tutorial where you don't have to do ALL the lessons to get to that lesson.

0

Share this post


Link to post
Share on other sites
I always seperated my functions, variables, and DATA files into separate files and put them into *.h headers.

Then in my main.c I'd just do this

 

 

#include "data.h"
#include "Variables.h"
#include "Functions.h"

 

 

And if you're making a game it is going to be very large to begin with. It is all how you code and how much you are going to put into it. In (WOW)Wrath of the Lich King, there were approximately 5.5 million lines of code in the game, not including database entries and what not. I don't understand what you mean by your game will get big.

Thanks. This helps alot.

0

Share this post


Link to post
Share on other sites
Lazyfoo

 

http://www.lazyfoo.net/SDL_tutorials/

 

Best place for SDL by far. 12-12-2012 was the last update so you'll be good. That is where I started when I was learning SDL. I didn't get very far as at the time I was already into Allegro. GL with lazyfoo there is a lot of information there that wasn't 5 years ago when I was learning off lazyfoo.

 

Thanks. But I can imagine my file becoming very large with everything I want. Do you know of a way to make different files work together in 1 game? 

 

First learn the language. If you don't know how to use the header files, it means that you don't know the language.

0

Share this post


Link to post
Share on other sites
Ugh. Those tutorials won't work for me. I need a tutorial where you don't have to do ALL the lessons to get to that lesson.


I am unfamiliar with a way of learning where you don't need any information about how it works or how it can be applied without investigation of what you're working with.

 

That would be like building a spaceship right now with only what you know at this exact moment.

 

Or writing a game in SDL right now with only what you know at this exact moment. Wouldn't be possible.

Edited by 0Circle0
0

Share this post


Link to post
Share on other sites
Ugh. Those tutorials won't work for me. I need a tutorial where you don't have to do ALL the lessons to get to that lesson.


I am unfamiliar with a way of learning where you don't need any information about how it works or how it can be applied with out investigation of what you're working with.

 

That would be like building a spaceship right now with only what you know at this exact moment.

 

 

I do want to know how it works, But I don't want to do 19 other lessons just to finally get my animations done.

Edited by ThomasK
0

Share this post


Link to post
Share on other sites
Ugh. Those tutorials won't work for me. I need a tutorial where you don't have to do ALL the lessons to get to that lesson.


I am unfamiliar with a way of learning where you don't need any information about how it works or how it can be applied with out investigation of what you're working with.

 

That would be like building a spaceship right now with only what you know at this exact moment.

 

 

I do want to know how it works, But I don't want to do 19 other lessons just to finally get my animations done.

You can't learn to run without learning to crawl

0

Share this post


Link to post
Share on other sites

How do you expect to be able to draw the animation, The Screen, Scroll, Create menus, create controls after you learn how to make your sprite animated? And you can skip around the tutorials. If you don't understand how something works read the commented code that is all over the place on that site.

 

I barely know SDL and by reading the site I can tell what each line of code does just by the little comments lazyfoo placed. I am able to skip around the tutorial.

 

Learn how to create a blank screen first. Then you'll be able to learn how to load an image. Then learn to move it. Once you can move it learn to animate it. Skipping around tutorials has steps too.

Edited by 0Circle0
1

Share this post


Link to post
Share on other sites
How do you expect to be able to draw the animation, The Screen, Scroll, Create menus, create controls after you learn how to make your sprite animated? And you can skip around the tutorials. If you don't understand how something works read the commented code that is all over the place on that site.

 

I barely know SDL and by reading the site I can tell what each line of code does just by the little comments lazyfoo placed. I am able to skip around the tutorial.

 

Learn how to create a blank screen first. Then you'll be able to learn how to load an image. Then learn to move it. Once you can move it learn to animate it. Skipping around tutorials has steps too.

I already have basic movements, But when my character turns left I want it the play the animation of the character walking left. Is it really necessary to 19 tutorials just to get my character walking? 

0

Share this post


Link to post
Share on other sites
If you know how to handle keyboard inputs already, then you should be able to figure out how to do animation. Animation is really just changing images very fast.
1

Share this post


Link to post
Share on other sites

Animation is as easy as splitting the image into an array. Figure how to split the image and put each part into the same array and Animating is as easy as...

 

Image[15];
i++;
if (i > 14)
    i = 0;
Draw Image[i];

 

BOOM animated. Don't really need a tutorial on animation. Just need to know how to load the image properly. This is just sudo code

 

EDIT: Not sure if SDL has an easier way of doing it, I know Allegro does but that is irrelevant unless you use Allegro and SDL. As you can use both at the same time.

Edited by 0Circle0
0

Share this post


Link to post
Share on other sites
Animation is as easy as splitting the image into an array. Figure how to split the image and put each part into the same array and Animating is as easy as...

 

Image[15];
i++;
if (i > 14)
    i = 0;
Draw Image[i];

 

BOOM animated. Don't really need a tutorial on animation. Just need to know how to load the image properly. This is just sudo code

 

EDIT: Not sure if SDL has an easier way of doing it, I know Allegro does but that is irrelevant unless you use Allegro and SDL. As you can use both at the same time.

Animation should be timed with the game loop. If he has nothing slowing down the loop then this will run at different speeds on various machines. But yea it's the basics of it and would give him what he wants for now and good leaning experience. You will want proper timing in your game eventually.

 

@OP see theres no point in skipping steps to end up with a program that is half functional. If you already know some of the steps then that means you skip tho's tutorials and you do the one's that you don't already know. Programming takes time and patience so if you don't have the patience to do simple tutorials then programming might not be for you. And by the way lazy foo does have animation tutorial witch you could run without doing any other tutorial.

 

Another thing is you never mentioned what version of SDL you are using, there is 1 official release of SDL 1.2 and the one still in progress SDL 2.0 but stable enough and yes there are differences in them both. SDL 2.0 has a better rendering system then 1.2 and some of the calls are different. So lazyfoo is in 1.2 so if you are running 2.0 a few things will need to be changed. 

 

If you really need a full game example SDL creator also offer source of the game maelstorm found here http://www.libsdl.org/projects/Maelstrom/source.html

 

I might as well note this also, I'm not sure what skill level your C++ if that's what you are using, but your game should be well object oriented, meaning you will need to know how to properly uses multiple classes and properly structure your game. For example in my game I might have a class that builds a space ship but is bases on my drawing class witch will load the images and draw to the screen. So then anything drawing to the screen will be based of it. So you want animation you will have another class handling your animation and doing the proper loading for your sprite sheet. Obviously people don't use the exact same procedure in setting there class's but the idea is the same. And this is just one of many things that is useful, other things are good to know is link list, vector, deque, virtual functions, pure virtual functions, base class, friends class... and the list goes on.

 

If your goal is too succeed in this then I would suggest to put a bit more effort and possibly try to make a more simple game at first. If you think it's a waste of time then tell that to the other thousands of programmers who all started with baby steps. First semester at the college we made text base apps in C/C++, then we moves to allegro with is a 2D library then we did SDL. So still in 2D doing some of the same things as before but with a different library. Was it a waste of time? No because I learnt a lot out of it and another thing it teaches you is to adapt to new code/library's. 

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0