Sign in to follow this  
MLGM

Switching from Console to 2D

Recommended Posts

MLGM    100
I am a beginner programmer, age 13, looking into eventually making games. I know I won't make the next Halo or anything like that, but for now, I just want to continue learning the basics. In other words, I'm just looking for a direction. I have a few questions to ask...

[b]1) Can someone give me a link or two about switching from console programs to 2D programs/games (or elaborate yourselves)?[/b]

[b]2) As a programmer, how did you get into game developpement?[/b]

[b]3) Is it best to learn C++ by making games? In other words, is it better to learn C++ as I go along, or should I learn everything first, then try making a game.[/b]

That is all for now. Any recommendations or advice would be greatly appreciated as well.

Thanks

P.S. Currently, I am learning/reading about classes, if that helps.

P.S.S The books I use are [url="http://www.amazon.com/Sams-Teach-Yourself-Hours-5th/dp/0672333317"]this[/url] and [url="http://www.amazon.com/Beginning-C-Through-Game-Programming/dp/1435457420/ref=sr_1_1?s=books&ie=UTF8&qid=1327282644&sr=1-1"]this[/url].

Share this post


Link to post
Share on other sites
zacaj    667
1.youll probably want to learn SDL, SFML, or openly if you're feeling ambitious. I haven't used SFML but from what I've heard its supposed to be a more modern version of SDL. If you decide to go the SDL route, most people recommend lazyfoo's tutorials, they should get you started.

Share this post


Link to post
Share on other sites
DevSykes    145
Honestly, I consider myself very much a beginner as well, but I hope my advice to a fellow beginner will be useful.
Firstly, moving to 2D, you have many options, as zacaj stated, you can go down the SDL/SFML route. I've used SDL, and it's 2D support is pretty good, plus SDL is cross-platform, so always a point there, and it supports OpenGL Context, so if you ever decided to move up and try doing some 2D/3D in OpenGL.

First, C++ through Game Programming is a fantastic book, I have it, and have read it myself, and Micheal Dawson produces such a detailed and very simplified structure for describing and introducing elements, however it primarily focuses on Console Applications, and no introduction to libraries and use of graphics/platform APIs. However a great start for a novice C++ programmer. I still go back to it.

My approach, the one I am taking, since I am at the position of being insane and actually creating a 2D Engine for generating 2D Games. I am focusing on using DirectX 9, with the D3DX Sprite Interface, which is very useful, and provides a lot of features for effciently and easily generating 2D Sprites, however I think that might be going down a more complex route for you at the moment, and throwing you into WinAPI would be..... cruel. However, I have gone on a tangent and I apologies. My reccomendation, keep reading the books you have, understand C++ foundatonally and when you feel ready, jump into SDL and learn how to create 2D Games through that. Then move onto the API of your choice. DirectX or OpenGL.

Good Luck

Share this post


Link to post
Share on other sites
Lex224    128
[b]1)[/b]
When I first went to 2D, I used an older version of OpenGL, but that's a huge topic so maybe SDL or SFML to begin with. Never used either so can't link to anything. There's plenty OpenGL resources available if you really wanted to jump in deep. It would mean that the jump from 2D to 3D would be easier.

[b]2) [/b]
I randomly found a game development course after I finished school and am now in my 3rd year.

[b]3)[/b]
A bit of both, I'd say. You say you've read these books, so you should be able to make something good with what you already know. Try to thinks of ways to do things better, and research ways to doing things you don't know how to do. If there's a substantial amount you don't know about something, take a step back and learn about it first, then tackle it when you're confident enough to.

Share this post


Link to post
Share on other sites
jbadams    25674
There is no "best" -- finding a bit of advice on a good course of action is always a fine idea, but don't waste a lot of time looking for a "best" option.

[quote name='MLGM' timestamp='1327282685' post='4905279']
1) Can someone give me a link or two about switching from console programs to 2D programs/games (or elaborate yourselves)?
[/quote]
You'll want to learn an API such as SDL or SFML. [url="http://lazyfoo.net/SDL_tutorials/"]Lazy Foo's Tutorials[/url] are an excellent way to get into SDL, or there are some basic tutorials to get you started with SFML [url="http://www.sfml-dev.org/"]on the official site[/url], although they're more basic than the more detailed guides provided in lazy foo's tutorials. If you feel you're ready, just jump in with whichever API you decide to try and get started learning how to display and update graphics.

[quote name='MLGM' timestamp='1327282685' post='4905279']
2) As a programmer, how did you get into game developpement?
[/quote]
I started out making text-based games with QBasic, which came with my first computer. I didn't have any books, and there was no internet to help, so I just learned by trial and error until I could create workable software.

[quote name='MLGM' timestamp='1327282685' post='4905279']
3) Is it best to learn C++ by making games? In other words, is it better to learn C++ as I go along, or should I learn everything first, then try making a game.
[/quote]
Whichever feels more comfortable to you should be fine -- as I said above, there's no "best" approach. You shouldn't hurt your ability to learn the language and how to program by learning while you make games if that's something that worries you -- plenty of people take that approach and learn to program just fine, and working on something that interests you can provide good motivation.


Hope that helps! [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]

Share this post


Link to post
Share on other sites
Serapth    6671
If you decide to go the SFML route my [url=http://www.gamefromscratch.com/page/Game-From-Scratch-CPP-Edition.aspx]over-engineered pong clone tutorial[/url] might be of some use. In assumes you know the basics ( loops, variables, that kind of thing ) and walks you through creating a complete game using C++ and SFML using modern C++. Along the way it teaches you more C++ language features in a bit more detail. It also covers the linker process in extreme detail, an area that most new programmers get stuck at ( for good reason, it's complex ). It also includes pre-configured projects so you can skip this process completely.That said, it's already 10 chapters long... ;)

I agree with the remainder of the thread, if you are going with C++, SFML or SDL are both great choices. I find the SFML libraries a bit cleaner, but there are a nasty bug or two that can really hang new developers up.

Share this post


Link to post
Share on other sites
Infernal0010    135
1) SFML/SDL is the norm here, I did some windoes GDI stuff but it's not nearly as good as using something ontop of opengl.

2) Wrote text games with some ANSI terminal graphics. Then wrote battleship using SVGA rendering in pascal... bleh! moved on and up through C++ and opengl

3) I would not use game programming as the source of learning C++/programming because there are aspects of the language and programming designs that you would want to know first before coding a game. What I mean is: wouldn't it be nice to know if a hash, an array, a linked list, a binary tree or a map would be best suited to handle the data you are considering handling for your game? That's not something you want to recode, trying each structure to determine the best fit. That's something you would like to be able to have some background understanding of before using them in a game.

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