Sign in to follow this  

Noob moving from XNA/C# to ??/C++

This topic is 3460 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, This thread is some-what similar to what I posted a little while ago, but since it is in fact a different question, thus I created a different thread. Anyways, I'm 16, have (what I think) is pretty good programming experience, in QBasic (hehe), Visual Basic (.NET), C# (.NET), and am now getting into C++. I have also used the XNA Framework in C# and certainly liked it's-ease of use. I am now moving everything over to Ubuntu Linux (yaaay, no more Windows/Vista), and thus do not necessarily care about cross-platform support, it would be a feature that would be nice, but not a decision-maker. I am looking for a good type of framework similar to XNA or whatever. It has to support (only) 2D Graphics, Audio, Input, and 2D sprite rotations(as these cannot be done by hand). I was looking into SDL, and then began looking at Allegro, and then looked at SFML......I'm-to put it lightly, a bit confused as to which to go to, because evidently SDL does not support 2D sprite rotations, which is exactly what I need...The problem I kind of see with SFML is that there is not much documentation. Is it not popular? Or, is it so easy nobody needs more than the few standard tutorials? Could someone(s) please provide me with some insight, as I desperately want to start getting into game creation again, and have been going through programming-withdrawal lately :) Any documentation links you could give me, or personal experience would be awesome. Also, would any or all of these be able to be setup on KDevelop (Linux C++ IDE). I'm also not sure how I would do animations... P.S. I am also kind of new to the whole C++ area.

Share this post


Link to post
Share on other sites
I'm not in a position to answer most of your post, but to answer your PS: It shouldn't be too hard to pick up if you have a decent knowledge of C#. I Would recommend going through the C++ tutorials at cpluscplus.com.
Pars of it you'll be able to skim over because it should be fairly self explantory, but other parts you'll want to read carefully. The tutorials and documentation on C++ serve as a good reference for me if there's some particular point of syntax that I want to check, seeing as it hasn't been all that long since I was just learning C++.
There's also an extensive set of docs for the STL at cplusplus.com as well, which is extrememly useful when getting to know containers and iterators for use in games.

metal

EDIT- I would recommend FMOD for sound. I use DirectX for a lot of stuff but i found DirectSound to be a bit of a pain. FMOD is extremely easy to set up and use and from what I can gather can be quite powerful. It's been used in AAA games, but is still free to use for the hobbiest :)

Share this post


Link to post
Share on other sites
I'm using Allegro right now since "Game Programming All in One" is the best resource I could find for making 2D games that covers all aspects from map making,sprites,etc

Share this post


Link to post
Share on other sites
OpenGL/C++ There's a whole forum on it. Pretty easy. Don't do DirectX, really hard. www.videotutorialsrock.com. I'm 14 and using OpenGL. No problem, right? Well, if your using OpenGL, that's multiplatform. Omly 2D? Flash, hehe.

Share this post


Link to post
Share on other sites
From what I know, SFML is pretty new, but it seems to be developing quite nicely. I'm planning to give it a try once I'm done with my current project. It'll certainly be better than 'plain' OpenGL - after all, rendering isn't all that a game needs.

That, or you could look into a more full-blown engine, such as Haaf's Game Engine. That one only runs on Windows though, but perhaps you can find a good cross-platform engine with similar capabilities.

Share this post


Link to post
Share on other sites
Quote:
Original post by Predator106
The problem I kind of see with SFML is that there is not much documentation. Is it not popular? Or, is it so easy nobody needs more than the few standard tutorials?
SFML is very new, so there isn't much (if any) material apart from the basic official tutorials and anything you can find on the SFML forums so far. Almost everyone I know of who's tried it seems to like it however, so I can see it becoming very popular as it matures and as word spreads, eventually leading to more documentation.

It is a nice clean and simple API, the official tutorials are quite good for the basics of getting started, and the (still small) community on the forums are pretty helpful, but if you're not yet comfortable working without extensive examples and help it may not (yet) be for you; I'd certainly suggest it's worth giving a try if you're willing to put some effort into figuring things out for yourself where documentation is currently lacking though.

Share this post


Link to post
Share on other sites
I agree about what the previous repliers have written about SFML. I highly recommend it, I've been using it for a little less than a year and I love it. I had no previous experience from any other library (SDL etc.) before trying SFML. The members of the forum are very helpful so getting help won't be a problem.

Give it a try, you won't regret it (I don't)

Share this post


Link to post
Share on other sites
Quote:
Original post by MJP
Ditching C# and XNA for C++? You have a tough road ahead of you. [smile]


Yep :) Well I tried standard C++ a while back (console based), but that was before I started learning Visual Basic, when I was trying to figure out the best language to learn from QBasic :P

-dabo- Okay, I think I will go with SFML, I really like how its laid out and everything, and it looks like it supports everything I need-and then some. The only problem is, I'd like to have a definitive outline of what formats they support i.e. Sound, Sprites (Images). I mean does it support PNG, it says it supports .jpg, .wav. .ogg (whatever that is), but its not clear as to what ELSE it supports, it just says there are a lot more...

Share this post


Link to post
Share on other sites
Quote:
Original post by Predator106
I'd like to have a definitive outline of what formats they support i.e. Sound, Sprites (Images). I mean does it support PNG, it says it supports .jpg, .wav. .ogg (whatever that is), but its not clear as to what ELSE it supports, it just says there are a lot more...
Visit the Features page. The listed image formats are (I believe) the only ones supported unless you use another library to load them, but are all the common formats and should be just fine for your uses. The listed audio formats should cover your needs - .ogg is the Vorbis format, which is similar to mp3 but without the associated licencing problems. If you actually need a format that isn't listed then you should ask about it, otherwise just get into using it, as the listed formats should provide everything you need.

Share this post


Link to post
Share on other sites
SDL has a wealth of add-on libraries, I think one of the popular ones (probably SDL_image or SDL_ttf) had a "rotozoom" blit in it which could blit bitmap, as the name indicates, at any arbitrary rotation and scaling.

However, using OpenGL, even for 2D rendering, probably is a better choice since you get much better quality and performance. Afaik, you can let SDL initialize OpenGL for you (keeps portability, since the OpenGL setup code is different between windows and linux).

Quote:
Original post by Jedimace
OpenGL/C++ There's a whole forum on it. Pretty easy. Don't do DirectX, really hard. www.videotutorialsrock.com. I'm 14 and using OpenGL. No problem, right? Well, if your using OpenGL, that's multiplatform. Omly 2D? Flash, hehe.


XNA is designed very much in the spirit of DirectX (GraphicsDevice, VertexBuffer, IndexBuffer, same locking concept, etc.), so I'd argue that he'd have an easier time moving to DirectX, if this was an option at all.

Amusingly, I always found DirectX to be the easier API of the two. OpenGL gave me no clear structure and I had the impression that it is really good at hiding usage errors from the programmer. Never enjoyed the chaos with Extensions either. No offense intended, everyone has his own preferences.

Share this post


Link to post
Share on other sites
Yes but SDL is supposed to be slow, and using the rotation especially, from what I've heard. And yeah, I could use DirectX, but I'd rather get away from the Microshaft as much as I can.

Share this post


Link to post
Share on other sites
Quote:
Original post by Predator106
Yes but SDL is supposed to be slow, and using the rotation especially, from what I've heard. And yeah, I could use DirectX, but I'd rather get away from the Microshaft as much as I can.

All software-implemented graphics are slow. But SDL is more than that; it's a very nice wrapper around the OS windowing and input system.

This is why the combo SDL/OpenGL/C++ is often used. SDL to take care of windowing and input, OpenGL to handle graphics and C++ as the actual language. It's easy, cross-platform and as runtime efficient as it can be. I have yet to see a nicer basic library configuration for C++ game development. Add more libraries as needed (such as Boost and SOIL).

Share this post


Link to post
Share on other sites
Quote:
Original post by Predator106
I'm staying away from OpenGL for now

Any particular reason? Basic OpenGL usage isn't exactly hard, at least not compared to proper usage of C++.

Share this post


Link to post
Share on other sites
It's good that you don't try to move too quickly. If you don't want to get into OpenGL, SFML is probably a good choice. I haven't used it personally, but it seems pretty usable, is targeted at 2D and is hardware accelerated. If I understand correctly, it can also be used as a windowing manager if you ever do decide to get into the 3D side of things.

Share this post


Link to post
Share on other sites
I started with C++ and OpenGL / DirectX after I got the language down. That's what most of the people I spent my time programming with did as well. Now I'm in the Navy though so the game programming dreams are on hold.

Share this post


Link to post
Share on other sites
Quote:
Original post by Hnefi
It's good that you don't try to move too quickly. If you don't want to get into OpenGL, SFML is probably a good choice. I haven't used it personally, but it seems pretty usable, is targeted at 2D and is hardware accelerated. If I understand correctly, it can also be used as a windowing manager if you ever do decide to get into the 3D side of things.


Yeah, but now I am trying to make a 2D game (and engine, mostly) that is meant to be similar to GTA2. I'm not sure how far I can actually go with it, but it certainly interests me, but the toughest part, I am thinking has got to be dealing with physics on the cars. Making some kind of layer that cars that I create will be based off of, which would include it's turn radius, gear ratio, traction, acceleration, topspeed probably...I'm not sure if I am up to the task. I have written quite a few games before, but the problem I usually find is that I don't finish a whole lot of them. Mostly due in part because of my complete lack of artistry, and creativity in areas like level design, story(if applicable), etc.

Share this post


Link to post
Share on other sites
Quote:
Original post by Hnefi
It's good that you don't try to move too quickly. If you don't want to get into OpenGL, SFML is probably a good choice. I haven't used it personally, but it seems pretty usable, is targeted at 2D and is hardware accelerated. If I understand correctly, it can also be used as a windowing manager if you ever do decide to get into the 3D side of things.
Yes, you can use the other features SFML provides (input, windowing, audio, etc.) and do your rendering in OpenGL if you want to, just like many people do with SDL.

Quote:
Original post by Predator106
but the toughest part, I am thinking has got to be dealing with physics on the cars.
Have you considered using a physics library such as Box2D or ODE? There is of course always a learning curve involved when you pick up a new library and time to be spent integrating it with whatever other technologies (SFML or SDL, etc.) you're using, but such a system takes a lot of the work out of writing and debugging your own physics code.

Share this post


Link to post
Share on other sites
Quote:
Original post by Predator106
Yeah, but now I am trying to make a 2D game (and engine, mostly) that is meant to be similar to GTA2. I'm not sure how far I can actually go with it, but it certainly interests me, but the toughest part, I am thinking has got to be dealing with physics on the cars. Making some kind of layer that cars that I create will be based off of, which would include it's turn radius, gear ratio, traction, acceleration, topspeed probably...I'm not sure if I am up to the task. I have written quite a few games before, but the problem I usually find is that I don't finish a whole lot of them. Mostly due in part because of my complete lack of artistry, and creativity in areas like level design, story(if applicable), etc.

Well, I know how you feel. I have several half-finished games with different nifty features that I will never complete. But I still learned from those projects, implementing those features.

If you want to do something like GTA2, start with the interesting, critical features (after having gotten a window with moving boxes up and running). Let the cars be boxes and implement movement. Then collision detection, then collision response, etc. Make a rough roadmap that will (hopefully) lead to a finished game, and start by implementing the interesting, moderately challenging stuff. That way, even if you never finish the game, you will still have learned something useful.

Share this post


Link to post
Share on other sites

This topic is 3460 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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