Jump to content
  • Advertisement
Sign in to follow this  
Nahrix

Question: Moving from text to 2D

This topic is 4878 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 everyone. I've come here to humbly request your advice. I've studied C++ in highschool, and now, three years after graduating, have come back to relearn what I've mostly forgotten. Tons of online resources and a couple of books later, and I'm right back on track. Using Visual C++ 6, I've made a few text-based games, and now I want to start learning how to make a 2D game, such as the recommended Tetris clone, or a simulation game of sorts. I have a problem, though: I have no idea where to begin. I've assumed that learning DirectX would be a proper start, yet, after researching for several days, I haven't managed to dig up any useful (or should I say, understandable) information. MSDN's DirectX reference, for example, is filled with terms of which less than 1/4 I can only vaguely comprehend. This is the point at which I've realized that a noobie such as I shouldn't make assumptions of where I should go, and what I should learn first. Thus, I ask you to please help out a poor, fletchling programmer. Where can I go to get this Tetris game started? How do you seperate rendering frames from input? How do you render a frame at all? What -is- the meaning of life?

Share this post


Link to post
Share on other sites
Advertisement
You will need to learn a library.
These librarys will have classes and functions that you can use. you can create windows with bit, draw images etc.

to give some examples of librarys: DirectX (has many parts: DirectInput, Direct3D, DirectPlay, DirectSound etc.), SDL, OpenGL, Allegro, Win32 etc.

I started with SDL, its simple, and cross platform. DirectX programs can only be executed on a windows machine. OpenGL is a cross platform D3D (Direct3D) liked library. It can be used for graphics (like 3D stuff).

Personaly I wouldnt start with DirectX if I was you. I would start with the win32 library if you only want to make programs for windows, or SDL or allegro if you want to create programs that are cross platform (programs that can be executed on more OS like Windows, Linux, Unix, Mac etc.) I would suggest to start out with SDL. It would be a good thing to learn OpenGL later becuase it works quite good in combination with SDL.

DirectX and OpenGL are however difficult to learn, so again: I wouldn;t start with them. Learn them later and start with something more easey.

Do with my info what you want.

Greetings,
Rob

Share this post


Link to post
Share on other sites
Thank you very much for your input, Toadhead/Rob. I did know that DirectX is Windows OS specific, but I chose it under the impression that it was the easiest to learn. I will follow your advice, and instead learn Win32, SDL, and finally both OpenGL and DirectX.

What does SDL stand for, by the way?

Share this post


Link to post
Share on other sites
Quote:
Original post by Nahrix
What does SDL stand for, by the way?



Simple DirectMedia Layer

i would suggest to start with SDL. Windows programming is more involed.
in SDL only a few lines of code is need to setup a window, but in windows programming it takes around 50 lines of code to get the same results.

Share this post


Link to post
Share on other sites
I'd go with SDL as well. Gets you quickly into graphics which can not only help you learn the language and drawing methods, but also motivates you to continue your learning. I have some introductory tutorials on my site. Help yourself.

Share this post


Link to post
Share on other sites
Everyone's help is extremely welcome, and I'm grateful for the advice given. As of now, I'm browsing this site to set up SDL with a Visual C++ 6 project.

Hopefully everything goes smoothly.

Share this post


Link to post
Share on other sites
Just thought I would add my experience as I have recently done just what you are intending.

Contrary to everyone elses opinions - although they are undoubtedly correct! - I decided to learn DirectX rather than SDL or similar. It is a right-royal-pain-in-the-arse to set up at first, but I have found it pretty easy once everything is up and running.

Currently working on a 2D top-down driving game (http://members.gamedev.net/ols/journal). If you want any help with 2D stuff let me know

Ols

Share this post


Link to post
Share on other sites
A friend of mine has written a few articles using SDL, which is located here: Sol's tutorials

I think they are pretty good and it's farily newly written so chances are you can ask him about more tutorials as you go on to the last one.

Let him know what you think too, that's important!
Albert

Share this post


Link to post
Share on other sites
*agrees with ols*

imo using direct x, or any api for that matter, to make a 2d game is somewhat trivial in the sense that all you really need from the api is to figure out is how to draw a picture to the screen. of course after you figure out how to draw it to the screen you can do all kinds of fancy things with it, but if you're going for simplicity that's all you need

Share this post


Link to post
Share on other sites
http://www.gamedev.net/community/forums/forum.asp?forum_id=33
Tetris Tutorial (using DirectDraw 7.0)

http://www.gamedev.net/community/forums/topic.asp?topic_id=300750
putting text in a game (using Win32 and DirectDraw)



edit: added APIs to show OP

[Edited by - Alpha_ProgDes on February 15, 2005 1:55:58 AM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!