Advertisement

Where to start?

Started by July 16, 2002 09:14 AM
24 comments, last by Warabit 22 years, 4 months ago
CDX is a nice C++ DirectX wrapper. Simplifies the use of DX through C++ classes.

Always remember, you''''re unique. Just like everyone else.
Always remember, you''re unique. Just like everyone else.Greven
quote:
Hey everyone i am a newbie.I know Visual Basic,and was wondering where to begin making games.I am so newbieish i dont know howto make a simple Tetris game.So could someone help me out?i would appriciate it.

You can write a Tetris-clone in VB, so for your first attempt in game making, you don''t need to learn a new language.

The basics thing you MUST know to do, whatever language, whatever technology you use :
- Put a bloc of pixel from a memory object to the screen (i.e. put a bitmap or a part of a bitmap on the screen). If needed, support transparency, i.e. not rectangular bloc (not needed for Tetris denpending on the implementation). To retrieve the source, use Window Bitmap ressource.
- Write some text at an arbitrary place
- receive input for keyboard and mouse (ok, not needed for Tetris, but useful for your next game)

Hint to write a Tetris-clone : Represent the game board as an 2d array.


----
David Sporn AKA Sporniket
Advertisement
I will give you my honest advice, as I have wasted a lot of time and money not heeding the advice of others. Perhaps it will help you. First off, I am by no means an expert game programmer, and would still consider myself a newbie at best. I have been involoved in programming since 1985, and have been on many paths (hardware, languages, books) since I started. Knowing what I know today this would be the path I would take. (Keep in mind, everyone will have a different approach or way of learning, also remember that technology is ever changing, so you have to be willing to adjust your plan and adapt continuously). Enough background here''s my 2 cents.

1) Determine what your goal is: i.e. What type of games would you eventually like to make? Are you in this for long-term, or do you just want to start making games as soon as possible? Are you willing to make the investment into learning another computer language?
The answer to these types of questions, can be different for everybody. You can make games using Visual Basic (although as the compexity increases you will probably want to switch to C++). For me the answer was to learn C++. It''s not that difficult to learn the basics. So just start, and don''t rush. Learn from the basic examples, and build up your "toolbox".

2) Learning C++: There are many approaches to this. You can get advice right from this site on which book to buy (if it''s in your budget: I usually purchace through half.com to save a little). Personally, I liked "Sam''s Teach yourself C++ in 21 Days", "C++ Object Oriented Programming" by Laffore, and "C++ for Dummies" (it''s actually a good book). Now, this could be overkill for you, but if you learn better from an instructor, most colleges will let you audit a class for free. You won''t recieve college credit, but that''s not what you are looking for anyway. Auditing a class helps motivate you and keep you on track. Additionally if you know a friend who is good at C++ his/her advice could be priceless. Finally, this site is a great start, and a wealth of information is here for free, so your doing pretty good already. Regardless of your approach, spend time learning the language, and don''t try to write a game the first time out. Most of the books come with a student version of VC++ or Borlands Compiler. This is perfect for learning, but eventually you will want to buy a standard edition. I would suggest Microsoft''s Visaul C++ as it''s IDE is superior, and it works better (during development) with DirectX. (I''ll mention briefly that you can also download a free DJGPP compiler, and later add the Allegro Game Function Library (termed loosely) to begin making games, but more on that from someone else).

Sticking with Visual Basic: If the above is not your cup of tea, then stick with VB. Your game programming enjoyment is up to you. If you already know VB and would like to start making games right away, then this may be the right fit for you. In fact most of the games I have written to date, could have been done in VB. My advice would be to get a book on Game programming in VB. I know Andre Lamothe''s series of books has a book about programming Games with DirectX and VB. I haven''t read it but I do have many books in his series (and although he has turned the writing over to others and now he''s mainly Senior Editor), they have all been excellent. Now read as many articles and program as much as you can. Don''t be affraid to try different things. Start small. And trust me that Tetris should not be your first attempt. While it''s easier than many other games, declaring it simple is relative. There are better first starts. See First Projects: below.

3) Now that you have a solid understanding of C++ you will want to incorporate an API. You should begin with MFC (but honestly I wouldn''t spend too much time here. A basic understanding is reccomended. You can build on this as you go along. You shoud learn the text functions, and primative drawing). My reccomendation from here would be to buy Andre Lamothes "Tricks of the Windows Programming Gurus SECOND EDITION". For me this was the first book that actually got the game programming and DirectX ideas to sink in, and by the way it covers some of the needed MFC mentioned above. I would read through most of this book trying examples and viewing the source. The book isn''t made to be a "source-code dump", so I would reccomend printing out the examples as necessary. Get an overall view the first time through the book (especially the DirectX stuff). Don''t worry if things seem a bit fuzzy at first. The book builds up a pretty decent 2d Game engine. My suggestion is after your first read, copy the T3DLIB1.h and T3DLIB1.cpp into your projects, and begin using Andre''s simple engine. It will stop you from getting stuck on setting up DirectX initialization and allow you to start focusing on game programming. Next, printout the T3DLIB.h and T3dLIB1.cpp and go through all the code, understanding what and how each function works. At some point, you will probably want to rewrite the engine into a neater C++ object oriented design and make better use of classes. All of this will get you to a pretty fair game programming level.

4) First Projects: I would suggest starting off with a PONG Clone. Next I would attempt a BREAKOUT clone. (possibly making some improvements to the originals, and incorporating sound. Write a complete game from Title screen to Credits). Then, try a single screen Platformer like the original Mario Brothers (not Super Mario Brothers) or a Space Invaders clone. [At this point you could probably handle Tetris as well]. Next, try a Full screen transition demo like Pitfall. Next try a 1-level platform demone of Super Mario Brothers.

Ok, that''s my 2 cents (perhaps it should have been an article). Just remember everyone has a way that works best for them. This is just one of the ways, and the current path that I am finally on. Best of luck.

Some things I recommmend for 2D Games:
-A computer
-The DirectX SDK (For now I am still using the DirectX 7 interfaces)
-A good Compiler (Visaual C++ 6.0 or Visual C++.net)
-A 2d graphics program (Paint Shop Pro 7)
-Desire, Ambition, Creativity, Igenuity, & Persistance
~Zen
Very good advice, zenassem. Hopefully a lot of people will read it.

Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
hey zenassem that was a long post but well worth the read (i think ill reread it after i post this)
i have a few questions but

This is my Plan

1.I learned Visual Basic through a CD from cdlearning.com
what it is ,is a voice teachs you everything(like as if the person was reading u a book)and there are animated Graphics
to give examples of EVERYTHING. So im going to buy C and C++(they teach C++ assuming you know C) thats step 1

2.ill do a little MFC(please tell me where i learn this and what it is)

3.then ill read "Tricks of the Windows Programming Gurus SECOND EDITION"(you act like its downloadable,if so where can i download it?)

after that ill just make games(building up to be better)

But i have a problem ,i know NO ONE who knows ANYTHING about programing.So maybe could i have someones screenname for AOL?
mine is Warabit

thanks

I don''t really know about that book, C and C++, but apparently Teach Yourself C++ in 24 days in a pretty good book by the way so many people rave about it, so you should probably check that one out.

Tricks of the Windows Game Programming Gurus isn''t downloadable. zenassem was talking about copying the code and printing it out because the book, along with a great deal of other programming books, comes with the source code on a CD that accompanies it.
laziness is the foundation of efficiency | www.AdrianWalker.info | Adventures in Game Production | @zer0wolf - Twitter

This topic is closed to new replies.

Advertisement