Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411423 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 18, 2024, 05:16:28 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Moving towards C++ development
Pages: [1] 2 3 ... 5
Print
Author Topic: Moving towards C++ development  (Read 9967 times)
Zack Bell
Level 10
*****



View Profile WWW
« on: January 24, 2012, 08:09:49 PM »

This is for you C++ guys and maybe even Java guys. Basically anyone who some might consider more "traditional" programmers.

I was wondering how you worked towards programming games in C++? I have made a lot of demos and small prototypes in Game Maker, but haven't finished anything large yet (I'm currently working on that though). I am currently a CS major in college (it is the end of my first year) and most of my classes have been in either Java or C++.

I feel that I have a good understanding of OOP and how it would translate to C++/Java, but working with GM doesn't allow me to practice everything that I have learned.

Last week I made the jump to Flash, and have been using Flashpunk. So far I feel like this has been much better in terms of transitioning from school work to my game work. I love being able to work with classes, inheritance, and actual data types and what not (though GM does has some form of inheritance). I thought that Flashpunk would be a good stepping stone because it has all of those additional features but it still has a bit of hand-holding and a lot of other things done for you.

Anyway, my point is: What should I be doing to move towards making games in C++ from scratch?  I'd like to be a competent game programmer before I graduate (if that's a reasonable goal).
Logged

Rob Lach
Level 10
*****



View Profile WWW
« Reply #1 on: January 24, 2012, 08:47:05 PM »

1. Try
2. Fail
3. goto 1
Logged

Zack Bell
Level 10
*****



View Profile WWW
« Reply #2 on: January 24, 2012, 08:51:00 PM »

I don't like the goto statement, but that's basically what I've been doing. I just read and learn as much as possible. I should probably be doing a lot more experimenting though.
Logged

Rob Lach
Level 10
*****



View Profile WWW
« Reply #3 on: January 24, 2012, 09:08:11 PM »

Well, I suggest getting rendering down. The rest will fall into line on its own I believe.

http://www.amazon.com/Real-Time-Rendering-Third-Tomas-Akenine-Moller/dp/1568814240/ref=zg_bs_15375251_6
Logged

Zack Bell
Level 10
*****



View Profile WWW
« Reply #4 on: January 24, 2012, 09:10:37 PM »

Yeah, that's really been my big fear and why I've been sticking with engines like GM and Flashpunk. I'll checkout that book and start reading up on rendering. I am taking a graphics programming course soon, so hopefully that will help as well.
Logged

eigenbom
Level 10
*****


@eigenbom


View Profile WWW
« Reply #5 on: January 24, 2012, 09:20:18 PM »

Here's a couple of suggestions:
Basic:
Use SFML2 -- it's got a nice and simple API for making games
Use smart pointers, boost::shared_ptr for ownership and native pointer for non-ownership
Design a templated vector class
Learn OpenGL (with GLEW)
Advanced:
Embed Lua into a program
Use threads (SFML has them)
Use Ogre3D






Logged

Zack Bell
Level 10
*****



View Profile WWW
« Reply #6 on: January 24, 2012, 09:25:54 PM »

Thank you! A concise list of goal like that will help. I almost asked you personally because Moonman's editor looked like it must have been done from scratch.  Ninja
Logged

eigenbom
Level 10
*****


@eigenbom


View Profile WWW
« Reply #7 on: January 24, 2012, 09:42:37 PM »

No worries, glad to help! From scratch is a misnomer, I use SFML2, boost (shared_ptr,filesystem) and Lua/Luabind for moonman, building on a lot of peoples hard work. Smiley

For advanced c++ game dev, bitsquid is also a good blog to peruse. Also that real-time rendering book RL suggested is awesome, but fairly hardcore (your computer graphics textbook will probably be sufficient for the next couple of years!)
Logged

Zack Bell
Level 10
*****



View Profile WWW
« Reply #8 on: January 24, 2012, 10:09:26 PM »

Cool, thanks! Btw, when people program games in C++ do they often do it "from scratch" or do they use things like the ones that you mentioned? For example, games like Aquaria or Super Meat Boy. Both C++ and engines built by their programmers. From scratch or with help?
Logged

eigenbom
Level 10
*****


@eigenbom


View Profile WWW
« Reply #9 on: January 24, 2012, 10:53:57 PM »

Indie guys probably use a free game engine like SFML, SDL, XNA, GLFW, HGE, ClanLib, Ogre3d, Crystal Space, Irrlicht, etc.

Atom Zombie Smasher was built with SFML I think.
The Polynomial used GLFW.
Proun used Ogre3d I think.
Super Meat Boy was probably built using XNA, though I'm not sure.
Logged

Netsu
Level 10
*****


proficient at just chillin'


View Profile WWW
« Reply #10 on: January 25, 2012, 12:09:45 AM »

I think even the games built 'from scratch' need something to set up an environment (window, input, sound), especially if they want to be crossplatform. This can be GLFW+OpenAL for example if you want to be really minimal (they only provide opening a window with an OpenGL context, getting input from the mouse and the keyboard and playing 3D sounds).
People are still likely to call the engines their own even if they used such libraries.
Logged

Zack Bell
Level 10
*****



View Profile WWW
« Reply #11 on: January 25, 2012, 12:16:32 AM »

Yeah, I have a few books about OpenGL, I really need to get into those a bit more. I figured that you wouldn't actually code things like the window and input yourself.
Logged

nospoon
Level 1
*


View Profile
« Reply #12 on: January 25, 2012, 02:23:25 AM »

IMO you should start from opengl not sfml.
OpenGL is very easy once you read something about it.
Writing in opengl gives you better knowlege how to optimize, and what's the GPU like.
Logged
kamac
Level 10
*****


Notoriously edits his posts


View Profile
« Reply #13 on: January 25, 2012, 02:26:06 AM »

Buy a book. Read it. Do some command prompt games. Jump to SFML/SDL, through, you must understand C++'s syntax pretty well. Jump to Irrlicht if you want 3d, if it doesn't satisfy you, try Panda3d. Jump to Ogre3d. Make nice games.

Starting with OpenGL, well, i don't recommend it.
Logged

Chromanoid
Level 10
*****



View Profile
« Reply #14 on: January 25, 2012, 03:31:26 AM »

C++ can be very annoying. I think every language can be that, but C++ is much more annoying to me than any other language I used. I would recommend to not use C++. If you want to work as an engine developer in the AAA game industry you should learn C++ in any other case I would recommend C# or Java.

For learning java I heard good stuff about this book (for people with some programming knowledge): http://www.amazon.com/Head-First-Java-Kathy-Sierra/dp/0596009208
« Last Edit: January 25, 2012, 03:37:39 AM by Chromanoid » Logged
Daid
Level 3
***



View Profile
« Reply #15 on: January 25, 2012, 03:32:47 AM »

1. Try
2. Fail
3. goto 1
This.

C++ sucks. If you want to learn OOP then I suggest you use something like C# with XNA. Or Java.
Now, I've, and still are, programming a lot in C++. But C++ is difficult, you can do a lot of things that "seem to work" but cause random crashes. Of all the languages I know, it's the most difficult to get right and stable. It's also the fastest at runtime, and the most portable (which is why I use it myself)

If you want C++, you first need to learn C. People that go all "oh, but C++ is easier! You just use templates that hide all the C like stuff for you!" those people need to shut up. Templates hide the C stuff, so they also hide the problems you can cause with it. Making it VERY hard to find and fix those problems. Also, 5+ lines of text for a single compiler error.
Logged

Software engineer by trade. Game development by hobby.
The Tribute Of Legends Devlog Co-op zelda.
EmptyEpsilon Free Co-op multiplayer spaceship simulator
rivon
Level 10
*****



View Profile
« Reply #16 on: January 25, 2012, 04:51:59 AM »

I don't use templates (well, apart from STL containers) and I'm not missing them. And you don't need to know C to program in C++.
Logged
increpare
Guest
« Reply #17 on: January 25, 2012, 04:53:16 AM »

I don't use templates (well, apart from STL containers) and I'm not missing them. And you don't need to know C to program in C++.
Thankfully, you don't need to know C++ either Wink
Logged
Fallsburg
Level 10
*****


Fear the CircleCat


View Profile
« Reply #18 on: January 25, 2012, 06:29:50 AM »

I'm going to completely ignore your actual question, and ask one of my own.

Why do you feel the need to use C++?  Is it just a curiosity thing? Do you have legitimate needs that only C++ can provide? Or are you doing it because it seems like what you are supposed to be doing?

I'd say that the first two are valid reasons (the second being more valid), but the third is a bad reason.

Writing in C++ isn't going to help you finish games, and in all honesty is probably going to hurt your chances of finishing a game.  If you are liking Flash, then stick with it.  You don't have to use FlashPunk (or any libraries), if you don't like the handholding. 
Logged
Zack Bell
Level 10
*****



View Profile WWW
« Reply #19 on: January 25, 2012, 06:32:49 AM »

I knew that the recommendation against C++ would come up eventually...However, I do want to work in the AAA industry as well as work on my own projects. This is why I find it important to have a strong C++ background.

So far I am most interested in OpenGl, SFML, and SDL.

Chromanoid mentioned only learning C++ if I wanted to be an engine developer in the AAA industry. Is it true that C++ isn't as important for someone who wants to be a gameplay or graphics programmer? I haven't seen or heard that elsewhere.

@Fallsburg: You posted while I was typing all of the above. It probably answers your question as well.  Coffee

EDIT: So technically I may not even use C++ for my personal projects. At least not for a long time. I want the knowledge so that I can be useful to a company if I cannot making a living off of my own stuff, successfully. Keeping my options open.
« Last Edit: January 25, 2012, 06:40:12 AM by Zack Bell » Logged

Pages: [1] 2 3 ... 5
Print
Jump to:  

Theme orange-lt created by panic