what do I need for 2D RPG programming?

Started by
24 comments, last by lajoseph 17 years, 1 month ago
First off, I'm familiar with programming games in c++ in Dos (text-based), and now I want to climb up that next step, 2D programming! Only thing is there's so much confusion about which languages to use on the net, I started off thinking I had to learn 8 programming languages!!! so far I've understood the best languages to use with C++ is DirectX grafics... but if you could help me on this topic that would be GREAT! so the question is really do I only need to learn C++ and DirectX grafics/Draw/3D? or do I need to learn about win32 too? Thank you!
Advertisement
There wasn't really needing to use directx, for instance im playing and old 2d rpg (Castle winds) that use only icons and gdi graphics.

The trouble is not to learn directdraw (the part of directx that you will need it) but the graphics, even a simple 2d rpg need a lot of tiles and graphics.

-----------------------------------------------"Cuando se es peon, la unica salida es la revolución"
So I should learn myself some Direct Draw, and start freshening up my drawing skills? =P
and also, I don't need to worry about win32, do I? I just heard you indirectly learn win32 when you learn directX... anyways, I heard it wasn't nessecary.

gracias por la ayuda ;)
Quote:Original post by eng3d
The trouble is not to learn directdraw (the part of directx that you will need it)


Need? DirectDraw is deprecated. It's old. Direct3D is more than capable of 2D graphics and won't be harder to learn.

Yes, you do need to know Win32 to program with DirectX. However, you don't need to know a whole ton of it. I've not used DirectX myself, but IIRC, only creation of a window needs to be handled by Win32. The rest can be done with various parts of DirectX.

You can also use OpenGL. It's similar to Direct3D, but you'll have to use something like SDL (which I highly recommend) or Win32 for the non-graphics parts (eg: window creation, input, sound, ect.).

And the most important thing to have is patience and hard work. Sorry, there's no library for that. [smile]
You might also want to check out SDL, its great for 2D.
Johnny was a chemist's son by Johnny is no more, for what Johnny thought was H2O was HO4
Thanks Ezbez & NerdInHisShoe.

But DirectX in comparison to SDL and those other languages is constant in relations with windows... or so I hear!
I've heard that you have to update your skills with a language for each time a new windows version comes out, but DirectX however I've heard doesn't change, thus you can forget about that hassle.

but so you reccomend me to learn Direct3D for 2D-programming? sounds strange =P
but I understand, haha.

so conclusion equals: to make a 2D-game with C++, you should learn enough win32 to open windows and make bars (file, edit, help...) and also learn Direct3D for the grafics-part.

does that sound like a winner?
There are a number of options available to you, and you certainly won't be worse off for learning a little bit about several of them. As has already been stated, several popular options are:

- DirectX - this has everything you'll need, but is Windows specific
- OpenGL - I would suggest using SDL, and probably OpenAL, along with this. OpenGL only performs graphics operations. SDL can be used for window creation (win32 can be a bit of pain if you've never used it), keyboard input, mouse input, event handling, and sound. Its pretty easy to get up and running. OpenAL is similar to OpenGL, but is for sound.
- SDL - SDL can also perform all of its own drawing functions, if you'd rather use them than OpenGL

A couple other options:
- Allegro - haven't really used this one, but it sounds like it has a cult following
- XNA - I don't know a whole lot about this, but its quickly becoming popular

Also, you don't necessarily need to use C++. C# can be used with DirectX, OpenGL, and SDL without any problems, and C# is easy to pick up if you've got a background in C++ or Java. It will also greatly speed up your development time.

Several scripting languages could also be used, considering a 2D RPG probably won't have massive performance requirements. Python, PyGame, and PyOpenGL are all excellent in this regard. I've also heard good things about Ruby and OCaml, and I believe both can use OpenGL.
Thank you Anonymous Poster(,I'll just call you Joe)

by saying that DirectX is windows specific, does that mean that I can't make games for linux, apple, and so on..?
if so I'd probably want to learn OpenGL instead of DirectX? just to keep the possibilities open...
And by the way, I jumped straight on learning C++, people said I should learn C# to get "warmed up" for C++. but it worked out for me... but are you saying that programming with C# is faster than with C++??

Quote:Original post by lajoseph
by saying that DirectX is windows specific, does that mean that I can't make games for linux, apple, and so on..?

Correct. DirectX is only usable on Windows. However, if you only plan on ever using your programs on that platform, DirectX is probably the way to go. Otherwise, you'll need to use a cross platform API, like OpenGL and/or SDL.

Quote:Original post by lajoseph
And by the way, I jumped straight on learning C++, people said I should learn C# to get "warmed up" for C++. but it worked out for me... but are you saying that programming with C# is faster than with C++??

I'm not saying C++ is a bad language, but there are a lot of C++ zealots who believe that it should be used for EVERY situation. C++ certainly has the power to do that, but that power means a lot of work is pushed off on to the programmer. Use the language that best fits the problem. I believe this to be one of the most important rules of programming.

C# removes a considerable amount of the lower level problems associated with C++, particularly memory management. Without needing to worry about these sort of things, not only do you have less work to do, but a rather large number of bugs will be immediately taken out of the potential 'bug pool'. C#'s performance is comparable to C++ in all but the most extreme cases.
ok, great! thanks for your post, Joe!
in spite for C++'s infamous bug-pool, I think I'll go with C++. Because I'm planning on getting into the game-producing business, and I've heard most game-companies make them with C++.
And I've never, ever even touched a computer that runs with linux or apple =P
so for the sake of simplicity I'll go with DirectX, and if I find it necessary I'll learn OpenGL and OpenAL later...

Thanks for your help guys! it really made things more understandable!
but do you guys know about any good books for learning C++, DirectX, gameprogramming?
or even just mention which books you've read to be able to program... thanks!

And what kind of compiler programs do you guys use? I use VC++ 6.0, is that alittle old maybe? which is the best?

This topic is closed to new replies.

Advertisement