•      Sign In
• Create Account

Need scary sound effects or creepy audio loops for your next horror-themed game? Check out Highscore Vol.3 - The Horror Edition in our marketplace. 50 sounds and 10 loops for only \$9.99!

A set guideline for beginning video game programmers!

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.

11 replies to this topic

#1bloisch4  Members   -  Reputation: 124

Like
2Likes
Like

Posted 10 September 2012 - 01:57 PM

Hello Everyone! I have recently been highly interested in game development, especially the programming side of things. I have been learning C++ for the last 3 months or so, but... I just don't quite seem to have a clear vision/view/guideline for getting into game development! ~sigh~ So... I made a console text Tic Tac Toe game, and I was like, whoa! that is cool!
- http://www.imageurlh...Tic-Tac-Toe.png
-thank you image hosting site!- http://<a href="http...age Hosting</a>

But then I think, oh man, this is a loooong way away from 2D games!(which is what I want to do for now), but you know, motivation keeps me typing away at this so I'll continue.
~I'll ask questions on behalf of the aspiring beginner game developers out there! XD
So when I was first learning C++ I thought everthing was hard to understand. When I saw someone's code of their console Tic Tac Toe game I went 0.0 and has no idea what was going on. The thing is, a few months later I knocked out the game in an hour with no problem! So my learning process seems to be in steps. 1 -Learn the basics of C++. 2 -Make a simple console game Tic Tac Toe! 3 -???????

So now you know what I have accomplished and I will tell you my thoughts on getting a grasp on making 2D games, but I have a few questions first~

~~What programming language should I start out with?
-So I heard C++ is a hard language to go with first, but I like the logical design of it! I can't help but keep going with it. Should I switch to Java since it seems it has basically everthing a beginner would need?

~~Just how much work do I need to do before I can get into making 2D games?
-I do not know if I should jump right into learning a simple 2D graphics library like SDL or SFML or Allegro. Should I learn C++ really well, THEN move on into a graphics library?

~~Use an engine, make one, or don't use an engine?
-Ok ok, I know making an engine is way to hard and time consuming so I'll skip that idea!
-I am very confused when it comes to learning a language well, especially when it comes to using a game engine or not. So I want to get the very most out of my learning, does that mean I should use a game engine and start making games just like that? Or should I take the long run and get the experience working with a graphics library making 2D games without an engine? I figure this because I would get a better, more indepth experience making games.

~~How to pave my own way?
-Ok, so I see people who have made 2D games and I am like, "HOW DO THEY DO IT?!". So I am so engrossed with the thought of how to make a game that I really have no idea how! What I would want(not saying what I need, so correct me if I am wrong) is personal experience from others. I want someone to tell me how they did it, going from learning a language, to making 2D or 3D games! How?

~~What graphics library to use?
-This isn't so much as an issue, but I've heard things of SDL(it's C based and old), tried SFML(hate the setup with any IDE) and don't even want to think about Allegro! Can anyone give me some advice when choosing a graphics library-(choose this one, it doesn't matter what you choose, try them all).

I am at the utmost confusing time in learning game development. What should I do? Where should I start? What should I learn? How can I do it? I make it to generic, sorry. The most important thing I think every beginner looking into game development would want, is some personal experience of another person. A very detailed guideline of how you got started, how you progressed, and finally where you are at now! So...
Thank you very much for answering my questions, I hope this helps all the people who read this and the questions/comments that follow!
~To all you people game developing away, keep it up, you guys rock and give us beginners something to think about!
N,n,n,NINJA!

Edited by jbadams, 11 September 2012 - 04:39 AM.
Removed the all-but-unreadable blue and yellow font-colours (replaced with maroon).

Sponsor:

#2Serapth  Crossbones+   -  Reputation: 4171

Like
4Likes
Like

Posted 10 September 2012 - 02:24 PM

Hello Everyone! I have recently been highly interested in game development, especially the programming side of things. I have been learning C++ for the last 3 months or so, but... I just don't quite seem to have a clear vision/view/guideline for getting into game development! ~sigh~ So... I made a console text Tic Tac Toe game, and I was like, whoa! that is cool!

Good job, that is a very good place to start, and good on you for not try to jump in to the deep end.

But then I think, oh man, this is a loooong way away from 2D games!(which is what I want to do for now), but you know, motivation keeps me typing away at this so I'll continue.

First off, the yellow makes me want to beat you with a dead trout. Don't look at the end game, just put one foot in front of the other and step. Repeat and rinse a hundred thousand times and you will get anywhere.

So when I was first learning C++ I thought everthing was hard to understand. When I saw someone's code of their console Tic Tac Toe game I went 0.0 and has no idea what was going on. The thing is, a few months later I knocked out the game in an hour with no problem! So my learning process seems to be in steps. 1 -Learn the basics of C++. 2 -Make a simple console game Tic Tac Toe! 3 -???????

Make something harder, repeat and iterate. This is how every single one of us did it.

~~What programming language should I start out with?
-So I heard C++ is a hard language to go with first, but I like the logical design of it! I can't help but keep going with it. Should I switch to Java since it seems it has basically everthing a beginner would need?

Generally C++ is a lousy beginners language, but then, from the sounds of your progress so far, that isn't or hasn't been much of an issue yet. C++ is (IMHO) a bad choice, but then, so is lack of focus. Changing languages is probably an unproductive move if you aren't struggling with the language. If you are, by all means yes, C++ is a lousy beginner language... ;)

~~Just how much work do I need to do before I can get into making 2D games?
None really, you are ready now, once you figure out the link process.

-I do not know if I should jump right into learning a simple 2D graphics library like SDL or SFML or Allegro. Should I learn C++ really well, THEN move on into a graphics library?

Nah, jump right in. All 3 are good choices.

~~Use an engine, make one, or don't use an engine
Premature question is premature.

-Ok ok, I know making an engine is way to hard and time consuming so I'll skip that idea!
Yep.

-I am very confused when it comes to learning a language well, especially when it comes to using a game engine or not. So I want to get the very most out of my learning, does that mean I should use a game engine and start making games just like that? Or should I take the long run and get the experience working with a graphics library making 2D games without an engine? I figure this because I would get a better, more indepth experience making games.

Anyone else experience deja vu? Quick, they changed something in the matrix!

~~How to pave my own way?
One step at a time. Try something, succeed. Try something harder. Fail lots at points in between.

-Ok, so I see people who have made 2D games and I am like, "HOW DO THEY DO IT?!". So I am so engrossed with the thought of how to make a game that I really have no idea how! What I would want(not saying what I need, so correct me if I am wrong) is personal experience from others. I want someone to tell me how they did it, going from learning a language, to making 2D or 3D games! How?

~~What graphics library to use?
-This isn't so much as an issue, but I've heard things of SDL(it's C based and old), tried SFML(hate the setup with any IDE) and don't even want to think about Allegro! Can anyone give me some advice when choosing a graphics library-(choose this one, it doesn't matter what you choose, try them all).

Luck for you, I made a tutorial EXACTLY for people like you. It assumes a basic knowledge of C++, but walks through creating a Pong clone using C++ and SFML. It was written assuming an audience that has some experience making console apps and is looking to make the jump beyond. So, that is my recommendation, run through the tutorial. It will take a lot, but will teach you exactly what you need to know.

It also covers learning the linker, which is exactly what you need to learn next. However, if you have trouble getting the linker to work, every single part ( all 10 ), include a preconfigured project file, that you can just download and run. Additionally part 1 contains a pre made SFML project with no code at all, if you want to skip the tutorial completely, but want to start with an already configured project.

Good luck.

My more Popular Tutorial Series:

#3Servant of the Lord  Crossbones+   -  Reputation: 12443

Like
1Likes
Like

Posted 10 September 2012 - 02:44 PM

Hello Everyone! I have recently been highly interested in game development, especially the programming side of things. I have been learning C++ for the last 3 months or so, but... I just don't quite seem to have a clear vision/view/guideline for getting into game development! ~sigh~ So... I made a console text Tic Tac Toe game, and I was like, whoa! that is cool!

Congratulations! Well done.

But then I think, oh man, this is a loooong way away from 2D games!(which is what I want to do for now), but you know, motivation keeps me typing away at this so I'll continue.

It's not too long away from 2D games - stick with text, and hold with it for another 45 days or so, then download SFML and play in 2D. But wait 45 days before doing so, and in the mean time make a text adventure game or something.

So I heard C++ is a hard language to go with first, but I like the logical design of it! I can't help but keep going with it. Should I switch to Java since it seems it has basically everthing a beginner would need?

Nope, if C++ is working for you, stick with it.

ust how much work do I need to do before I can get into making 2D games?

Full understanding of std::vectors, std::strings, if() else() while() and for(), == && != and ||, also pointers and references, and have a whole lot of stubborness, and you'll be ready to begin playing with 2D games.

First though, make two more larger text games. I'd recommend: A RPG combat simulator ("The wizard cast Fireball! He did 15 damage."), and a text adventure game ("Go north. Get ye flask. You cannot get ye flask").

I do not know if I should jump right into learning a simple 2D graphics library like SDL or SFML or Allegro. Should I learn C++ really well, THEN move on into a graphics library?

Yes and no. You need to learn alot of the basics, but you'll continue to learn C++ while working with graphics libraries. Use SFML, not SDL or Allegro, if you'd take my suggestion. SDL and Allegro are both 'C' programming language APIs that are good, and can be used with C++, but SFML is under more active development and is designed for C++ directly.

Use an engine, make one, or don't use an engine?

Don't use an engine, don't make one, just make games at first.

Also, don't over-reach yourself in games. Start small, make small projects, and finish them. Finishing projects is very very important.
To keep yourself in check, but also keep yourself entertained, set yourself goals: Every month make a new game, the first two weeks programming the game, the third week debugging the game, and the fourth week polishing the game. Then start anew (Or something along that idea). Then after two one-month projects, do two 2-month projects, and then do a single 4-month project and decide where to move on from there.

This isn't so much as an issue, but I've heard things of SDL(it's C based and old), tried SFML(hate the setup with any IDE) and don't even want to think about Allegro! Can anyone give me some advice when choosing a graphics library?

Use SFML. SFML is modern, under active development, and designed directly with C++ in mind, and has good documentation and a helpful community. It's also compact, and well-designed. Setting up a library using your IDE is also confusing as a beginner, but luckily you only need to do it once per project, so it's not a big deal. The SFML community will help you with that.

It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.

All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.                                                                                                                                                       [Need free cloud storage? I personally like DropBox]

#4Serapth  Crossbones+   -  Reputation: 4171

Like
0Likes
Like

Posted 10 September 2012 - 03:26 PM

I have to disagree with most of what Servant just said.

There are no magic timelines and frankly, beyond having to use a 3rd party library ( and thus learn about the linking process and include files), there is nothing particularly special or difficult about using a well crafted library like SFML.

There is no particular reason why you can't learn about vectors, operators and other topics while working on a 2d game. In fact, it may be easier, especially if you are a visual learner.

My more Popular Tutorial Series:

#5Servant of the Lord  Crossbones+   -  Reputation: 12443

Like
1Likes
Like

Posted 10 September 2012 - 04:02 PM

I'm perfectly fine with you disagreeing with me, but your response seems to misunderstand what I said, most likely from poor wording on my part.

The OP was complaining about specific issues with setting up SFML, so I said that that occurs with every library and that the SFML community (or us here) would be happy to help. I mistakenly used the word "also" when I meant "always".

I mentioned specifically that SFML was well designed, and encouraged it's use, not discouraged.

Let me try again:

Setting up and linking a 3rd party library is always confusing the first time you do it (since you mentioned it was difficult), but once you get the hang of it, it's easily done. Luckily you only have to do it once per project, and the community (either GameDev.net or the SFML community) would be happy to help resolve any specific problems you encounter. SFML setup is no harder than other libraries.

Better?

I am advocating continuing to learn C++ while using 2D libraries, but it's nice to get some of the basics down first before you try to learn two things at once. std::vector wasn't a particularly good example, but I do feel a solid understanding of the operators and basic condition statements are important (but not necessary, as I admit I made it sound) - you can definitely learn what parts you missed while working with 2D, and while learning all the other parts of the C++ language (like classes, templates, and namespaces).

I'm not giving a magic timeline, but suggesting he makes a few more console projects to help him learn the basics, before he jumps in. 45 days was a "not too near, not too far" timeframe to let him get his toes a bit more wet with C++ basics before moving on.

My suggested month-long project cycle was merely to help develop the habit of completing projects, and to help enforce starting small and working his way up.

Here's the bullet points of what I said:
• If C++ is working for you, stick with it.
• Learn the basics of C++ just a little longer before starting 2D graphics. (I recommend just two more games, slightly larger scope)
• You'll continue learning C++ even while learning 2D graphics, so you don't have to worry about it too much. (I didn't actually say this, but I meant to! )
• Make games, not engines. Don't worry about engines yet.
• Finish the projects that you start, and don't overreach yourself. Start small (I recommend creating set time-frames to keep yourself from reaching too far too fast).
• Set yourself goals and limitations to keep yourself focused and entertained.
• Use SFML.

If you disagree with my opinion about learning operators and if statements and making one or two more console games before moving on, that's fine! The rest of my advice still stands.
And again, I think most of your complaints was from my poor wording and missing sentences I had meant to add (my fault!)... I was going back and forth with dealing with technical support at a webhost I'm using (ASO) while trying to write the post, so I'm glad you made me clarify to avoid confusion.

It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.

All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.                                                                                                                                                       [Need free cloud storage? I personally like DropBox]

#6Shaquil  Members   -  Reputation: 734

Like
0Likes
Like

Posted 10 September 2012 - 06:30 PM

Both Servant of the Lord and Serapth nailed it. Here's a tutorial I used to get started with Allegro. it's got video, source code, and the author still actively replies to comments, etc. It was extremely helpful:

http://fixbyproximity.com/2d-game-development-course/

Also, if you ever get to this point with Allegro, I wrote a tutorial on handling joystick input, from an Xbox 360 controller for example (It's not as difficult as it sounds). Just something you might want to save for when you're a little further down the road:

http://arantwithgoodgrammar.com/archives/93

So next time you're wondering "When am I going to be good enough to do this awesome thing?" like you'll probably be thinking when you want to move to 3D game programming, just do this strategy:

First, check out a tutorial on the thing you want to do
1. Do you have the knowledge/understanding to follow what's going on in the first few introductory videos?
2. Are you excited to get started?

If you answered yes to both questions, then why not take a crack at it? If you fail, just regroup and go back to basics. It's bound to happen. Good luck

#7Midori Ryuu  Members   -  Reputation: 177

Like
0Likes
Like

Posted 10 September 2012 - 10:31 PM

~~What programming language should I start out with?
-So I heard C++ is a hard language to go with first, but I like the logical design of it! I can't help but keep going with it. Should I switch to Java since it seems it has basically everthing a beginner would need?

I think you should choose a language depending on what your target platform is, rather than how hard it is. C++ allows multiplatform (if you used the right libraries).
Java does allow that too, but also has more additional platforms such as Android, but at the cost of some performance. (Believe it or not, automatic garbage collection is more of a hassle than a convenience when it comes to mobile development. And please no one mention the NDK)
Personally I prefer Java (even if I weren't targeting Android), but that's because I'm focused on making small, 2D games, and Java is perfect for that. 3D... I'd switch to C++.

~~Use an engine, make one, or don't use an engine?
-Ok ok, I know making an engine is way to hard and time consuming so I'll skip that idea!
-I am very confused when it comes to learning a language well, especially when it comes to using a game engine or not. So I want to get the very most out of my learning, does that mean I should use a game engine and start making games just like that? Or should I take the long run and get the experience working with a graphics library making 2D games without an engine? I figure this because I would get a better, more indepth experience making games.

I think there is no need to go as high as using a game engine, nor as low as using just a graphics library. I'd say use a framework (read:a game library) that gives you just what you need to get started, and nothing more. I'm not familiar with C++, so I don't know if SFML would qualify as such.

~~How to pave my own way?
-Ok, so I see people who have made 2D games and I am like, "HOW DO THEY DO IT?!". So I am so engrossed with the thought of how to make a game that I really have no idea how! What I would want(not saying what I need, so correct me if I am wrong) is personal experience from others. I want someone to tell me how they did it, going from learning a language, to making 2D or 3D games! How?

Trust me it's quite easy to make a 2D game with the right tools. Once you have enough experience, you will be like "OMG it's this easy??!!". Making a simple 2D game is quite easy in itself.

The real trick is, just like Servant said, making a -good-, -complete- (polished) game is the real hard part. A menu? That's added difficulty of learning how to implement game states. An interface? That's the added difficulty of learning how to integrate a GUI library, and how to forward input listener events (and general events) from the GUI to the game, and vice versa. Physics? Well, you get my drift!

Adding things like the player jumping in an arc, or making the player not move when he's walking and facing a wall (something that always annoyed me in games, but now I know why they didn't fix it), or to implement player animations, these are the things that really will take up the bulk of your time.

The first game I had I got up and running, it took me 3x time to add the things I mentioned above than it was to finish the game. Of course, the good news is that it will only be hard the first time you do this and you're still learning the things. Afterwards it will come quite easily to you, and you will think "OMG it's this easy??!!" when you are done with them too. (Not to mention you will be able to reuse some of your code, which will make it take you 1/3x the time, rather than 3x)

~~What graphics library to use?
-This isn't so much as an issue, but I've heard things of SDL(it's C based and old), tried SFML(hate the setup with any IDE) and don't even want to think about Allegro! Can anyone give me some advice when choosing a graphics library-(choose this one, it doesn't matter what you choose, try them all).

Well I can't advise when it comes to C++, but if you ever pick Java, LibGDX (framework) is always great to use. Slick2D is good as well, but kind of getting abandoned I think. And of course there's always the good ol' LWGL which is a bit too low level for my taste.(The other libraries are essentially wrappers for it)

I am at the utmost confusing time in learning game development. What should I do? Where should I start? What should I learn? How can I do it? I make it to generic, sorry. The most important thing I think every beginner looking into game development would want, is some personal experience of another person. A very detailed guideline of how you got started, how you progressed, and finally where you are at now! So...
Thank you very much for answering my questions, I hope this helps all the people who read this and the questions/comments that follow!
~To all you people game developing away, keep it up, you guys rock and give us beginners something to think about!
N,n,n,NINJA!

It's not detailed, but... Well, I got started learning C++ in college, after which was followed with Java. I got forever scarred of C++ due to the data structure and algorithm course (run while you still can), so I kept with Java. In my OOP class I made what Servant of the Lord suggested you do, a text based RPG, with armor, etc..

This will help you learn the main game logic. (Adding graphics is just a simple additional step once you learn that. Really, I'm not joking, just look at my render method which does the rendering (then again I used a framework))
  camera.update();
camera.view.setToOrtho2D(viewport.x, viewport.y, viewport.width, viewport.height);
camera.projection.setToOrtho2D(viewport.x, viewport.y, viewport.width, viewport.height);
Gdx.gl.glViewport((int) viewport.x, (int) viewport.y, (int) viewport.width, (int) viewport.height);

spritebatch.begin();
renderManager.render(spritebatch);
spritebatch.end();


This small function is all that separates a text game from a 2D graphic game!!

Where was I? Oh yeah! Once I knew the game logic, I started searching for a game library, and I fell upon Slick2D, which I used to make a small top down shooter. Then I started doing the things I told you above, integrating a GUI library, physics, menu, etc..

Right now I'm aiming at doing a fully fledged platformer, but I'm still getting used to LibGDX which I started, as well as revising my game architecture, since I was pretty much abusing OOP in my previous games.

So yeah, good luck! And whatever happens, don't give up!! If I didn't keep giving up (and coming back later) I would probably have finished many games by now! Keep fighting! Things may seem hard and long, but it's only temporary.

#8LennyLen  Crossbones+   -  Reputation: 1687

Like
1Likes
Like

Posted 11 September 2012 - 04:34 AM

SDL and Allegro are both 'C' programming language APIs that are good, and can be used with C++, but SFML is under more active development and is designed for C++ directly.

The part about SFML being the only C++ library is certainly true, but the part about active development is not. Allegro 5 is under constant development, with new releases every month or so.

#9Servant of the Lord  Crossbones+   -  Reputation: 12443

Like
0Likes
Like

Posted 11 September 2012 - 09:32 AM

That's good! SDL hasn't had an update for years and though it's supposed to be receiving a major '2.0' update, an official release (aside from minor bug fixes) hasn't actually been released. If the head developer actually goes through with the major 2.0 release (now that he's busy working on Valve's Linux port of Source Engine and Steam client), then it'll definitely revitalize SDL interest.

It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.

All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.                                                                                                                                                       [Need free cloud storage? I personally like DropBox]

#10Midori Ryuu  Members   -  Reputation: 177

Like
0Likes
Like

Posted 11 September 2012 - 10:06 AM

That's good! SDL hasn't had an update for years and though it's supposed to be receiving a major '2.0' update, an official release (aside from minor bug fixes) hasn't actually been released. If the head developer actually goes through with the major 2.0 release (now that he's busy working on Valve's Linux port of Source Engine and Steam client), then it'll definitely revitalize SDL interest.

I'm sure he'll release it before episode 3!

#11JETerán  Members   -  Reputation: 225

Like
0Likes
Like

Posted 11 September 2012 - 01:32 PM

Hey, good to know you are interested in going serious in game dev.

This site can help you learn a little more about the basics of programming:
http://www.khanacademy.org/cs

Hope it helps, happy dev !!
Success with courage.

José Eduardo Terán
http://ve.linkedin.com/in/jeteran/

#12EddieV223  Members   -  Reputation: 1071

Like
0Likes
Like

Posted 11 September 2012 - 02:13 PM

I suggest learning some graphics library like Ogre3D or Irrlicht. Once you really understand the stack and heap, the memory management things.

If this post or signature was helpful and/or constructive please give rep.

// C++ Video tutorials

http://www.youtube.com/watch?v=Wo60USYV9Ik

// Easy to learn 2D Game Library c++

SFML2.1 Download http://www.sfml-dev.org/download.php

SFML2.1 Tutorials http://www.sfml-dev.org/tutorials/2.1/

// SFML 2 book

http://www.amazon.com/gp/product/1849696845/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=1849696845&linkCode=as2&tag=gamer2creator-20

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