Jump to content

  • Log In with Google      Sign In   
  • Create Account

Switching from Console to 2D


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 MLGM   Members   -  Reputation: 100

Like
0Likes
Like

Posted 22 January 2012 - 07:38 PM

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...

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

2) As a programmer, how did you get into game developpement?

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.

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 this and this.

Sponsor:

#2 zacaj   Members   -  Reputation: 643

Like
0Likes
Like

Posted 22 January 2012 - 08:22 PM

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.


#3 DevSykes   Members   -  Reputation: 145

Like
0Likes
Like

Posted 23 January 2012 - 01:19 AM

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
Game Programming.. Creativity and Logic in one massive bundle. Gotta love it.

#4 Lex224   Members   -  Reputation: 128

Like
0Likes
Like

Posted 23 January 2012 - 05:31 PM

1)
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.

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

3)
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.

#5 jbadams   Senior Staff   -  Reputation: 19350

Like
0Likes
Like

Posted 24 January 2012 - 01:15 AM

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.

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

You'll want to learn an API such as SDL or SFML. Lazy Foo's Tutorials are an excellent way to get into SDL, or there are some basic tutorials to get you started with SFML on the official site, 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.

2) As a programmer, how did you get into game developpement?

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.

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.

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! Posted Image

#6 Serapth   Crossbones+   -  Reputation: 5755

Like
0Likes
Like

Posted 24 January 2012 - 09:53 AM

If you decide to go the SFML route my over-engineered pong clone tutorial 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.

#7 Infernal-rk   Members   -  Reputation: 135

Like
1Likes
Like

Posted 24 January 2012 - 03:41 PM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS