Jump to content
  • Advertisement
Sign in to follow this  
Coder21

This thing got me desperate. How do you learn these stuff?

This topic is 4999 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm getting really really desperate of this game programming thing. I started with SDL two days ago , most (or all) beginner SDL tutorials sucked till i found Cone3D site providing a simple tutorial. So i learned lessons 1 and 2 with no problems. But when i reached lesson 3, the code got rediculously bigger and hard to memorize. I shouldn't even memorize stuff in programming , but even if i try to understand it , there is too much info for a single lesson. So i made a simplified version of lesson 3 that uses only 1 source file with much much less code and works the same way. At lesson 4 the author started to stuff info again that i couldn't take it anymore so i stopped reading. Am i supposed to spend days on one lesson or what? You know , i didn't have a problem learning standard C\C++ because books and tutorials usually tech each concept individually with its own examples so i can play with it a little before moving to the other one. Aren't there game tutorials like that? SDL seem low on recources. Whats the second best API for beginners? and whats a good tutorial for it? I really feel like i reached a dead-end. any help is MUCH appreciated

Share this post


Link to post
Share on other sites
Advertisement
I found the same thing about SDL when I started using it, There aren't very many tutorials for how to get started in it and the documentation is a little limited at times, but before I started I had read alot of tutorials on how to work with graphics, and learn how to go about displaying things on the screen. So once I was able to have SDL show me part of an image on the the screen, I knew enough to get started and began working on what I wanted to do..

This worked for me because I don't really like tutorials, they only teach you how to do things the way the author thinks they should be done, and they don't really help you learn how to solve the problems on your own.

I'm guessing by now you have something on the screen, well why don't you try writing some code to make a small map, or place an image on the screen and move it around with the arrow keys.. just think about what you want to know and then see if you can figure out what you need to do..

Share this post


Link to post
Share on other sites
Quote:
I'm guessing by now you have something on the screen, well why don't you try writing some code to make a small map, or place an image on the screen and move it around with the arrow keys.. just think about what you want to know and then see if you can figure out what you need to do..

I actually made my own way of animating sprites. I didn't need all those useless variables , classes and structures in the Cone3d tutorial 3. I made a little program where i can control a megaman sprite and it won't animate untill i hit right or left. And im afraid i'm not capable of doing more.

I still lack knowledge on these essential elements :
1. Collision detection
2. Including other moving objects.
3. simple AI
4. printing text and counters on the screen (for "lives" or "points" for example)
5. Game menus


and maybe more. Cone3d tutorials aren't hard. They just stuff too much info in one tutorial. Thats why i thought i need another tutorials.

I agree with you though that tutorials are sometimes useless. But i my case i need them , because i still don't know how to implement those essential things i've mentioned. :(

Share this post


Link to post
Share on other sites
A possible recommendation I could make is to get the book Game Programming: All in one. It takes you through most of the steps you mention with very simple examples. It uses Allegro though, and not SDL. Still, Allegro is a nifty library, so you will not be wasting your time by learning it.

Share this post


Link to post
Share on other sites
Quote:
Original post by Coder21
Am i supposed to spend days on one lesson or what?
Yes. Your problem appears to be that you think you can pick up this stuff in just a few hours - probably because you've seen books with titles proclaiming Learn X in Y Hours/Days! That's just marketing. It takes time for you to really "get" the material being presented. A lot of tutorials go at a fast pace, but you'll have to go over them several times on your own to grasp the concepts if you're not already familiar with them.

Quote:
You know , i didn't have a problem learning standard C\C++ because books and tutorials usually tech each concept individually with its own examples so i can play with it a little before moving to the other one. Aren't there game tutorials like that?
Don't overestimate your comprehension of standard C/C++. Given that you found it necessary to reduce Lesson 3 to a single file to successfully build it, I suspect you're not as adept as you think you are. This may be a huge part of your problem.

Game programming is hard. It takes time to understand the languages, the concepts, the constructs, the idioms. It takes effort to become comfortable enough with them to reproduce them in the absence of hand-holding resources. It takes constant practice not to forget, though it comes back more easily the more experienced you are. I'm in Central New York right now (I live in Long Island) and I'll be setting up a basic game architecture from scratch over the weekend with no books and without Internet connectivity for my laptop; it's taken me 10 years to get to the point where doing that is not a problem at all.

Take it easy, and take your time. You'll be fine. Don't jump ship at the first hint of frustration. Work through it, accept that your first few attempts will mostly serve to show you how not to do things, but the end result will be an intuitive comprehension.

Good luck, and happy hacking.

Share this post


Link to post
Share on other sites
Coder21, everything that you have mentioned in your post has nothing to do with what API you are using, it makes no difference that you are using SDL to do any of these things.

Okay maybe point #4 but that can be done so many different ways its not funny, you an grab a library that is already made and let it handle any TTF you want to use, or you can do it like I did and make your own font class..

All I did was make a large image with all the characters in it, then the image has a txt file that goes with it to say how wide each letter is, all the information is loaded into the system and then I made a little function that accepts a string and outputs it using the image.

Anyways if your able to have a sprite react to your keyboard input then your ready to start playing around yourself. The next step I would say would be to make a little mapping system that will show you a 10X10 grid and then you place your character on the grid. Then you can start having your character walk on the grid, maybe make certain tiles blockable so you have to keep track of where you character is and if he is trying to step on a blocking tile. (just check to see if the box around the character is overlapping the box of the tile)

Trust me, if you know the parts to make the game then just take it slow you'll figure it out.

*EDIT* - One thing you need to know is that you need to learn the theory behind why you are doing things when your programming, the language you are using is not important.

Share this post


Link to post
Share on other sites
The thing is games can be a bit complicated in their architecture and all this stuff can be a bit overwhelming.

You might like to try C#, the .NET has the MSDN, and the DirectX SDK has awesome tutorials and examples. The priniciples in design you'll get through learning with C# (rather then worrying about COM pointers releasing, memory pointers and stuff) will be easily transferable back to C++. That and you can worry about higher level stuff and things are quickly to screen... with C++ the slightest mistake could lead to nothing happening at all or a crash.

Otherwise just have a go at delving in to the C++ Direct X SDK tutorials. They've got ones that show you how to start off with a triangle, working up to displaying a model.

As for getting the entire game together... reacting to keypresses... forming a game structure... well... that's almost always an exercise left for the reader. Thus whatever language you start off in, always start off with achievable goals. That way you build up your own library and understanding of code.

I find books much easier to learn from then web stuff when I'm doing things completly new to me, as often typing out examples reinforces what you are learning.

I'm sure some peeps here will recommend decent books, that and gamedev has some ones on the site rated.

Share this post


Link to post
Share on other sites
Quote:
Don't overestimate your comprehension of standard C/C++. Given that you found it necessary to reduce Lesson 3 to a single file to successfully build it, I suspect you're not as adept as you think you are. This may be a huge part of your problem.

Actually i think im stupid because i can't grasp game programming concepts as fast as standard C\C++. I thought that i'm either stupid or this thing really takes time to get into. So i'm actually kinda underestimating myself.

Quote:
Coder21, everything that you have mentioned in your post has nothing to do with what API you are using, it makes no difference that you are using SDL to do any of these things.

Thats not what i ment. I ment that i have no idea of how to implement those stuff whatever the API im using is.


Quote:
All I did was make a large image with all the characters in it, then the image has a txt file that goes with it to say how wide each letter is, all the information is loaded into the system and then I made a little function that accepts a string and outputs it using the image.

Since you mentioned it , i have a little question about it.

Lets say i made an image like yours (with characters) and a function that accepts a string. How do i print the string? shall i blit the first character , increase X axis , blit second letter untill the whole string is shown?


paulecoyote , thanks for the advice but i have no intentions to learn C# whatsoever.



Guys, i want to make something clear ...

Game Development won't be my career. I have no intentions to make 3D games or to participate in projects to make serious games. I just want to be able to make cool 2D side scrolling games such as classic mario or megaman , or at least a space shooter. I want to make games for the fun of it , thats all.

So shall i stick to SDL in that case or check Allegro? (i heard its good and easy)

Share this post


Link to post
Share on other sites
Quote:
Original post by Coder21
Guys, i want to make something clear ...

Game Development won't be my career. I have no intentions to make 3D games or to participate in projects to make serious games. I just want to be able to make cool 2D side scrolling games such as classic mario or megaman , or at least a space shooter. I want to make games for the fun of it , thats all.


The book I recommended will help you do exactly that. I definetly suggest giving it a try.

Share this post


Link to post
Share on other sites
Quote:
Original post by Coder21
Guys, i want to make something clear ...

Game Development won't be my career. I have no intentions to make 3D games or to participate in projects to make serious games. I just want to be able to make cool 2D side scrolling games such as classic mario or megaman , or at least a space shooter. I want to make games for the fun of it , thats all.

So shall i stick to SDL in that case or check Allegro? (i heard its good and easy)
That's really up to you. Different people find different libraries and APIs to be more intuitable. When you get to a certain stage, they all become different perspectives on the same thing to you.

Good luck.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!