Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411589 Posts in 69386 Topics- by 58443 Members - Latest Member: Mansreign

May 07, 2024, 01:56:37 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Trying my hand at C++ windows development.
Pages: [1] 2
Print
Author Topic: Trying my hand at C++ windows development.  (Read 6062 times)
Theotherguy
Level 1
*



View Profile
« on: August 15, 2010, 01:07:01 PM »

So far in making games I've used Java, C# with XNA, C and C++ in Linux, and even processing and game maker. The problem I'm having is that none of these platforms is really standard in the industry, and I'd really like to get into the meat of things and start programming in C++ for windows.

I'm not sure where to start, though. I could continue using .NET and visual studio, but that seems like a step in the wrong direction. What platforms are available for C++ game development in windows, and what development environments do you recommend?

(Oh, and by the way, the only C++ development I've done is application development in Linux using Qt and Cmake.)
Logged

Skofo
Level 10
*****



View Profile
« Reply #1 on: August 15, 2010, 02:00:46 PM »

Visual C++ and Code::Blocks with MinGW seem to be the two most popular C++ IDEs for Windows.
« Last Edit: August 15, 2010, 02:04:57 PM by Skofo » Logged

If you wish to make a video game from scratch, you must first invent the universe.
Theotherguy
Level 1
*



View Profile
« Reply #2 on: August 15, 2010, 02:45:46 PM »

Code::Blocks does not seem like my cup of tea. I think I will stick with Visual Studio or use Eclipse.

What I meant was, what existing media and gaming platforms are there for C++? I mean, something somewhat equivalent to XNA...

EDIT:
Though, just having something which allows me to draw sprites and create windows might be good enough for now.
« Last Edit: August 15, 2010, 03:15:04 PM by Theotherguy » Logged

Theotherguy
Level 1
*



View Profile
« Reply #3 on: August 15, 2010, 04:49:47 PM »

I'm thinking about going with DirectX + XNAMath package + Visual Studio. Does this sound like a good plan?
Logged

Akhel
Level 10
*****



View Profile
« Reply #4 on: August 15, 2010, 05:51:24 PM »

Try SFML. It's great and you won't have to use Windows (it's crossplatform).
Logged
Theotherguy
Level 1
*



View Profile
« Reply #5 on: August 15, 2010, 07:09:28 PM »

Try SFML. It's great and you won't have to use Windows (it's crossplatform).

That looks like a really nice alternative .. hm...
Logged

Nix
Guest
« Reply #6 on: August 15, 2010, 07:09:47 PM »

Though, just having something which allows me to draw sprites and create windows might be good enough for now.

Take a look at SDL
http://www.libsdl.org/
Logged
Theotherguy
Level 1
*



View Profile
« Reply #7 on: August 15, 2010, 07:42:00 PM »

Going through the tutorials, SFML seems absurdly easier than SDL. I think this may be what I will go with!
Logged

Nix
Guest
« Reply #8 on: August 15, 2010, 10:45:40 PM »

Hmm, SFML's website is shinier. Maybe I'll take a look at it the next time I'm doing stuff in C++. (Though for the record, SDL isn't really that difficult. It's surprisingly simple once you get through the first layer of  Who, Me? documentation.)
Logged
oahda
Level 10
*****



View Profile
« Reply #9 on: August 16, 2010, 01:26:09 AM »

Seriously? Why would you limit yourself to a single operating system, when you have a language like C++ and excellent, portable libraries, like OpenGL, SDL and SFML at hand? Just make it portable!
Logged

nikki
Level 10
*****


View Profile
« Reply #10 on: August 16, 2010, 03:17:57 AM »

openframeworks is worth a look too i guess  My Word!
Logged
Impossible
Level 3
***



View Profile
« Reply #11 on: August 16, 2010, 07:37:01 PM »

I'm thinking about going with DirectX + XNAMath package + Visual Studio. Does this sound like a good plan?

TIGSource is generally anti-Microsoft (see above Smiley), but DirectX is not a bad direction if you want to do some low level Windows coding.  Portability really doesn't matter too much, a lot of people use non-portable platforms like game maker and do fine. OpenGL\SDL isn't 100% portable anyway.  I recently ported a DirectX9 based game to Xbox 360 (my primary platform) and it took 3 days.  Porting the same code base to Mac or PS3 would be slightly more involved but not too much of stretch. Really depends on what your goals are.  A good alternative to openframeworks is libcinder
Logged
nikki
Level 10
*****


View Profile
« Reply #12 on: August 17, 2010, 12:28:52 AM »

Quote
A good alternative to openframeworks is libcinder. 
a wow , i forgot about that one, the design and quality of the tutorials/website/documentation is easily the best of all tips in this post. wich means the library is very good too, i assume/hope.

speaking of quality: "how do sdl, sfml, openframeworks and libcinder compare to one and another ?"

Logged
Klaim
Level 10
*****



View Profile WWW
« Reply #13 on: August 17, 2010, 12:37:03 AM »

 - sdl : old, C interface - as it have an old interface, it's full of unintuitive functions, but as it's old it's available on a lot of platforms;
 - SFML : thought to be a replacement for SDL : C++, well thought interface (better with the coming v2.0), simpler to understand, cross platform and cut in several libs (audio, graphics, etc).
 - OpenFramworks : not the same thing than the two others, it's to have a crossplatform environnement with ready-to-be-used tools.


For games, I think using SFML is the best choice: it allows easily building a game-specific-engine over it, life if SFML was a set of bricks to build with.

There was a discussion recently about SDL vs SFML vs others.
Logged

TheLastBanana
Level 9
****



View Profile WWW
« Reply #14 on: August 17, 2010, 12:44:46 AM »

I've only in the last year or two started developing with C++, and at this point I've tried out both SDL and SFML.
SDL is C-based, so if you're used to using C++-style classes and such, it's a little alien. It definitely gives you more control than SFML, though, and I can't really complain all that much about it. Its lack of image rotation irks me a bit, though, and alpha blending is a pain in the arse. As well, you have to compile extra libraries for things like sound or non-bitmap image support. If you're willing to get your hands a little dirty with data management and such (which I assume you probably are, considering the fact that you've clearly programmed in plenty of different languages before), SDL is probably a good option.
SFML is C++-based, so managing classes and such is way easier. However, it's all higher-level functions, and if you want to access anything lower-level than what you're given, you pretty much have no choice but to rewrite part of the library and recompile it. Mind you, when you're working with a 2D game, you don't usually need anything too low-level, but I could see it being a problem for some implementations. It definitely speeds up the process of developing a game since it handles so much of the gruntwork for you.
Seriously either one is a good choice as far as I'm concerned. If you're comfortable with both C and C++, I don't think either of them will be particularly difficult for you to work with. It really just boils down to how much control you feel like you need.
Logged
Klaim
Level 10
*****



View Profile WWW
« Reply #15 on: August 17, 2010, 01:57:51 AM »

Just for information, you used SFML 1.x  or did you try SFML 2.0 too? I didn't yet try this not-yet-released version so it's just to know if you already have seen interesting improvements on this side.
Logged

JOBA
Level 1
*


EZ


View Profile
« Reply #16 on: August 17, 2010, 04:14:53 AM »

Quote
The problem I'm having is that none of these platforms is really standard in the industry, and I'd really like to get into the meat of things and start programming in C++ for windows.
What do you care about more - getting things done faster & easier or what some industry duds use?

You kinda make it sound like using C++ will open the doors to some magical wonderland. Or makes you a cool dood. Or you will be making better games. Neither of it is particularly true.
Except for performance and portability, there isn't any intrinsic advantages of using C++.

Quote
What platforms are available for C++ game development in windows, and what development environments do you recommend?
I would use MS Visual Studio 2010 & Visual Assist X plugin (MSVS 2010 has some of C++0x features what makes C++ less painful to use). And there simply isn't a better C++ IDE out there.

As for libraries - i would either use SFML, or a combination of OpenGL, Glfw, OpenAL and OpenIL (aka DevIL).

I'm not sure where to start, though. I could continue using .NET and visual studio, but that seems like a step in the wrong direction.
Why?
Quite honestly, C# and .NET rocks.
If you don't care about other platforms, there isn't a single reason why you shouldn't use C# & XNA.

If you care about other platforms, you can still use C# with Mono and OpenTK.

Now what i've been using C# for quite some time, there's plenty of things i miss in C++:
Fast compile times (C++, especially with some heavy boost template usage, compiles very slowly)
Reflection along with all goodies that comes with it, like extremely easy to use XML serialization and meta attributes.
foreach keyword (boost has BOOST_FOREACH macro, addressed in C++0x)
lambdas (boost.lambda, addressed in C++0x)
delegates & events (boost.bind)
Using boost might result into some very cryptic template error messages.
C++ is quite verbose (C++0x at least has the auto keyword).

You can do a lot with C++(like write template hacks that implement a significant amount of features you would expect from a modern programming language), but I still find pre-C++0x C++ a pain in the asshols to use.

And it will take quite some time till the standard is published in 2011 and fully supported by all major compilers (GNU GCC has a significant amount of C++0x features implemented, http://gcc.gnu.org/projects/cxx0x.html).

It would still compile slowly though.
« Last Edit: August 17, 2010, 04:27:01 AM by joba » Logged

Instant TileEd - draw pixel art games and export them to Tiled TMX!
Looking for artist for a CRPG!
drChengele
Level 2
**


if (status = UNDER_ATTACK) launch_nukes();


View Profile
« Reply #17 on: August 17, 2010, 07:32:08 AM »

Quote
Except for performance and portability, there isn't any intrinsic advantages of using C++.
That's a lot like saying that except for not dying horribly of asphyxiation, there isn't any intrinsic advantages of having oxygen in the atmosphere.

But yes, I'd add that C++ is only really necessary if you have some heavy-weight low-level stuff to do - or, much more importantly, if you aspire to ever work in a game dev team. C#/XNA is completely acceptable for lone wolves and small indie teams.

However, if you want to work on something in the game industry with someone else at any time in the future, you might want to go the industry standard, which is the C++ way (what ever the reason, C++ is the closest thing the game industry has to a "standard" language; this applies to indies too). It is possible you will find a lot of likeminded people who are willing to use C#; however, with C++ you are guaranteed to find more people with a common language, so to speak.

I have talked with managers who flat-out exclaimed that they treat "knowledge of C#" in the resume "as an <EOF> statement."
Logged

Praetor
Currently working on : tactical battles.
Taiko
Level 2
**



View Profile
« Reply #18 on: August 17, 2010, 09:25:36 AM »

If you're looking to start experimenting with C++, then I recommend buying the book Programming:  Principles and Practice Using C++ by Bjarne Stroustrup.  It goes over pretty much everything in the language and I found it very readable.

I'd also throw in my hat for SFML.  It might be lower level than what you are looking for, but the bonus is that it's cross platform.
Logged
TobiasW
Level 8
***


This can only end brilliantly!


View Profile WWW
« Reply #19 on: August 17, 2010, 09:45:56 AM »

I have talked with managers who flat-out exclaimed that they treat "knowledge of C#" in the resume "as an <EOF> statement."
My Word!

That's just stupid. And sounds somewhat religious-fanatically.

edit: And since I posted, I thought I might as well add my opinion too: SFML freakin' rocks. And given the choice between C++ and C# (apart from other restraints like portability and performance), I would take the latter. Performance might be a bit worse, but my developer performance skyrockets...
« Last Edit: August 17, 2010, 11:07:46 AM by TobiasW » Logged

Pages: [1] 2
Print
Jump to:  

Theme orange-lt created by panic