Can someone link me to some tutorials?

Started by
15 comments, last by stevo5800 11 years, 3 months ago
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

Advertisement

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.

Sprite Creator 3 VX & XP

WARNING: I edit my posts constantly.

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?

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.

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.

Sprite Creator 3 VX & XP

WARNING: I edit my posts constantly.

Ugh. If only LazyFoo had video tutorials.

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.

This topic is closed to new replies.

Advertisement