Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Help: Starting from scratch into 2D and then 3D (Which c++ libraries?)


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
7 replies to this topic

#1 Neurosecond   Members   -  Reputation: 100

Like
0Likes
Like

Posted 11 February 2012 - 07:42 PM

I know these topics have been done to death, but I haven't found a specific answer to my question.

I'm looking to start developing games as a hobbyist, and plan on using c++ to do so. My plan is to learn by making 2d game and later a 3D one, lets say by creating a simple 2D game, and then replacing the graphics (much later) with 3D ones. I'm having trouble deciding whether I should just go straight and learn Directx (which seems over complicated for a 2d game), or to take an intermediate step with something like SDL.

At the end of the learning process I don't think I will be using SDL, so will it be more efficient to go with Directx first?

Sponsor:

#2 necrin_ezekiel   Members   -  Reputation: 100

Like
0Likes
Like

Posted 12 February 2012 - 02:05 AM

I'm no expert (I just started learning a few months ago), but I'm pretty sure some people would suggest SFML.

You CAN use Directx, but like you said it might be too over complicated.

#3 meeshoo   Members   -  Reputation: 508

Like
0Likes
Like

Posted 17 February 2012 - 05:57 AM

If you want to start a bit in a higher level fashion and understand the logic behind all first, you could also use the hge game engine, which is a free one, based on DirectX and which automates some stuff: http://hge.relishgames.com/. If not, then SFML as suggested before me is a good way to go as it is object oriented, so easier to use in C++ as opposed to SDL. It really depends on what you want to do, games or games technology. If you just want to make games, there are a lot of free engines and libraries that will do a lot of low level stuff for you. Doing both is a nice dream but won't get you anywhere in the short to mid term as it is a long process. I wanted to do the same and then I decided to skip the low level stuff and just make games.

#4 MaxFire   Members   -  Reputation: 191

Like
0Likes
Like

Posted 17 February 2012 - 07:31 AM

I started with SDL as the lazyfoo tutorials were fantastic, also it can be used with OpenGL for heigh performance rendering and 3D. It also has sound and font libraries. This is where I recommend to start but that's my opinion, there are lots of people who go down the SDML path because of its hardware accelerated graphics without openGL.

#5 menyo   Members   -  Reputation: 513

Like
0Likes
Like

Posted 17 February 2012 - 11:47 AM

If you have no experience you really should start with a higher level language like C#. Especially when your aiming to do this as a hobby. Knowing multiple languages would never hurt you and starting with the hardest will. Also with higher level languages you are able to make more in less time. Why would you want to learn directX or openGL if there are plenty libraries for it that will make your life a lot easier? Make a game man! Not an engine! Eventually you might get interested to go more "behind the scene" and by then the harder stuff will be a lot easier to learn since you know what your doing. If you really want to go C++ then yes go get some sort of library like SDL and worry later about directX.

Current Project: TechnoFlux read all about it on my

DEV BLOG


#6 TehOwn   Members   -  Reputation: 134

Like
0Likes
Like

Posted 17 February 2012 - 01:35 PM

Personally I started with text-based games to help me better understand C++ and games programming in general.

Then I learned some DarkBasic to help me quickly iterate some games ideas and processes, but I wouldn't advise using DB, it's awful.

Eventually, I moved to SDL but quickly learned one thing... SDL is SLOW!!! The only way to get things rendering fast using SDL is to learn to combine SDL and OpenGL and since I was trying to make everything cross-platform I was loading everything in via SDL and converting it over to an OpenGL-ready format. This was just convoluted as hell, so I dropped SDL all-together.

Currently I use OpenGL with GLUT. This allows me to create 2d and 3d games quite easily. These do, however, not provide everything on their own but it's enough to get your project started and the game logic prototype done. Then you can start adding other libraries such as physics, sound and networking libraries as well as libraries to load in different types of media.

If you're interested in doing cross-platform non-commercial games then I can't recommend Java enough. A lot of people say, "Well it's not what games developers use" but that just isn't true. While most AAA games are written in C++ that is not to say that Java can't do any game you'd like to create as well as C++ can! Also, Java is, in my experience, a LOT easier to learn.

And you can avoid having to send your game with redistributable packages as apparently there are already 3 billion devices with Java installed.

Then, of course, there's the fact that Java can run on almost any modern computing device invented and can even be embedded into a web-page.

#7 slayemin   Members   -  Reputation: 3267

Like
0Likes
Like

Posted 18 February 2012 - 08:56 PM

I strongly recommend using C# with XNA instead of C++ with DirectX. I've done hobby games in both and between the two, XNA and C# is much more friendly. Considering that you're new, I'd recommend C# because the code is managed and a lot of the boiler plate coding is already done for you. DirectX/C++ would be a reasonable choice if you're planning to create a game engine and you need the low level granular control. But you want to make games, not focus on game engine semantics. You want to start with a 2D sprite based game, so the XNA Spritebatch is going to be your best friend. Switching to 3D models wouldn't take more than a day to code, you just have to create a camera, use view, projection and world matricies, and think about lighting and shaders.

Eric Nevala

Indie Developer | Dev blog


#8 mdwh   Members   -  Reputation: 951

Like
0Likes
Like

Posted 21 February 2012 - 11:09 AM

Note that even when you're doing 3D with DirectX, you can still use SDL (yes - SDL can be made to work with both OpenGL and Direct3D), and this simplifies things like setting up windows, as well as providing APIs for sound, networking etc (of course you can do it all in DirectX, but arguably SDL makes these things simpler, and cross-platform).

So you could use SDL 2D to start with, then switch over to SDL + DirectX. Although if you plan to modify the same game to switch from 2D to 3D, it may be easier to start off with SDL + DirectX. (I upgraded a game this way - switching to 3D can be pretty much done to start with just by changing the view transformations, then worry about things like 3D models later; replacing SDL's graphics commands with DirectX would require a significant rewrite just to get things working.)
http://erebusrpg.sourceforge.net/ - Erebus, Open Source RPG for Windows/Linux/Android
http://homepage.ntlworld.com/mark.harman/conquests.html - Conquests, Open Source Civ-like Game for Windows/Linux




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