Jump to content

  • Log In with Google      Sign In   
  • Create Account

HELP!


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

#1 PsYcHoPrOg   Members   -  Reputation: 115

Like
Likes
Like

Posted 09 February 2000 - 09:24 AM

I have been studying C++ and C on my own time now for about two years. I attended a summer camp, which teaches C++ and some other things last summer. After a while, I decided to get into DirectX, so I did. I have read several tutorials/books/articles on my own to learn DirectX. However, I CAN''T DO IT! I have made a huge attempt to memorize and learn this stuff, but I can’t find a way to do it! I find myself reading the same section over and over. I finally memorize it, but then the next day, I don’t remember squat! And I am applying the information, which I have been advised to do. If anyone would like to recommend something please respond! I am dying to make at least a small game before I am 16! I may be young, but I know, as a fourteen-year old, that I am capable of doing this. So please, if you can help me, respond.

Sponsor:

#2 Osmo Suvisaari   Members   -  Reputation: 115

Like
Likes
Like

Posted 09 February 2000 - 09:36 AM

You do not have to memorize everything. Just learn the main ideas, and then do something to try it out. The exact spelling you can check from the Programmer''s Reference while writing the code.
I also recommend copy-pasteing bits of code directly from the tutorials and samples.

#3 trixter   Members   -  Reputation: 122

Like
Likes
Like

Posted 09 February 2000 - 10:02 AM

what''s the information you were advised to do? If you can''t figure DX out, you can always try other things then come back to it. You could give DOS a shot. You would just need DJGPP and Allegro as a start. Both are free.

#4 BigCarlito   Members   -  Reputation: 122

Like
Likes
Like

Posted 09 February 2000 - 10:08 AM

I know what you mean, I used to have the same problem. Learning the core commands and usage of DX is not very natural (at least it wasn't to me). When I first started, I tried to follow the books and make a simple game. That didn't work for me. I could make a simple 2D game by modifying someone's code, but I didn't REALLY know what was going on in there.

a) Don't try to make a game right away. Try making a screen that displays a bitmap. I don't mean modify the DDraw samples, I mean do it from scratch and learn exactly what is going on. It's hard to do when you have a vision of a game or something you want to make now, but it was totally necessary for me. From there, dig into the docs and figure out the best way to add a cursor to your bitmap. From there, add the ability to click on areas and jump to different bitmaps. Before you know it, you will have a menu system.

b) Start a library of generic helper functions and classes. For me it was too complicated to remember how to setup DX, or process keyboard or mouse input or even load a bitmap. So I began making classes and functions that handled these things in a generic way. Now I don't have to remember the correct DX calls and what order to call them in, I just need to know my function and exactly how IT works.

So basically, my tip to all the newbies is use the power of C++. If you don't know about inheritance or polymorphism yet, go find out about them and try to use them wherever you can, because it will make your life a whole lot easier!
It can also make your code much more readable.

Also, always remember that ANYTHING that is too complicated can be broken up into multiple simple problems.

Good Luck!

BigCarlito



Edited by - BigCarlito on 2/9/00 4:11:21 PM

#5 PsYcHoPrOg   Members   -  Reputation: 115

Like
Likes
Like

Posted 09 February 2000 - 10:27 AM

Thank you for replying to my post. If anyone else would like to submit something, please do, I need all the help I can get!

#6 Spellbound   Members   -  Reputation: 122

Like
Likes
Like

Posted 09 February 2000 - 10:28 AM

It''s not as important to memorize something as it to know that you can do that thing. If you know it''s doable you can look it up when you need to do just that thing.

I''ve been programming for a very long time and I still need to check the manual for simple things as printf or operator priorities once in a while. But since I have read it before and understood then, I only need to take a quick glance at the text and it comes right back to me.



#7 Melo   Members   -  Reputation: 122

Like
Likes
Like

Posted 10 February 2000 - 01:27 AM

Well, the posts above mentioned the main things I agree with ''em.
Try to make small programs that display some bitmaps, sprites, etc. Then try to make a small game with this stuff. Think about the design of your small game and the rest will come automatically.

#8 dog135   Members   -  Reputation: 122

Like
Likes
Like

Posted 10 February 2000 - 05:18 AM

I have a hard time remembering commands too. Even ones I use all the time.
What I do is make a "Cheat Sheet". I type up all the commands I'm likely to use that can fit on one sheet of paper along with it's syntax. I also group the commands by usage.
I then pin the paper on the wall next to my monitor. (or cubical wall in the case of my work.)

For instance, I use a language at work called "Mumps". The catagories I have commands under are:

Pattern Matching (Mumps specific)
Program Flow
I/O Stream
Variables
Variable Nodes (Mumps uses dynamic arrays)
Transactions
Debugging
Others (concatenation, Modulo, contains, etc.)

I had enough room at the end of the page to also include "Terminal excape codes" and "routines".
I've become so use to that sheet that now, when I can't remember the syntax of a command, I know exactly where on the paper to look.

E:cb woof!

Edited by - dog135 on 2/10/00 11:19:53 AM

#9 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 10 February 2000 - 06:34 AM

I had the same problem. The key is to any API is understanding how to initialize it. In DirectX, breakup the initialization code, the enumeration code(device search), and the communications code into small pieces this helped me get a handle on DirectX. For instance, with DirectDraw you must call DirectDrawCreate(Ex)(), SetCooperativeLevel(), SetDisplayMode(), and CreateSurface() before you can begin drawing anything. Also any one of these methods can fail if you pass an invalid pointer or parameter.

Here are some tips:
Always make sure you understand what the various parameters of a function are for. This is by far more important than memorizing the functions. You can always look them up.

Whenever pointers are being passed, make sure they are valid (not equal to NULL).

Always check the return values for the DX functions in cross - dependent code before continuing. This affords you an opportunity to exit gracefully if a call fails, popup a messagebox explaining what failed, or to output a debug string. Plus such code can be easily removed during performance tuning.

Don''t ever assume a DX function returned successfully. Youd be surprised how often problems arise from this ''stupid'' mistake. Always check return values!!

Enumerate whenever writing mission critical code. I admit to not always enumerating during debugging/pre - alpha, but you must enumerate in commercial apps. If you don''t you will end up with software that only works on your personal development machine.

PS. If you want some code or some help post a reply to this message with your email address and I will get back to you. I have been contemplating writing an implementation-centric game/graphics programming book with special coverage of D3D, but until I do, you maybe should consider buying Inside DirectX. The material is dated (DX5), and doesn''t cover D3D, but I strongly advocate their approach to DX programming and the book is fairly thorough. The book also covers some key concepts of COM and most of the methods used in the book are still supported by DX7.

#10 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 10 February 2000 - 06:43 AM

I had the same problem. The key is to any API is understanding how to initialize it. In DirectX, breakup the initialization code, the enumeration code(device search), and the communications code into small pieces this helped me get a handle on DirectX. For instance, with DirectDraw you must call DirectDrawCreate(Ex)(), SetCooperativeLevel(), SetDisplayMode(), and CreateSurface() before you can begin drawing anything. Also any one of these methods can fail if you pass an invalid pointer or parameter.

Here are some tips:
Always make sure you understand what the various parameters of a function are for. This is by far more important than memorizing the functions. You can always look them up.

Whenever pointers are being passed, make sure they are valid (not equal to NULL).

Always check the return values for the DX functions in cross - dependent code before continuing. This affords you an opportunity to exit gracefully if a call fails, popup a messagebox explaining what failed, or to output a debug string. Plus such code can be easily removed during performance tuning.

Don''t ever assume a DX function returned successfully. Youd be surprised how often problems arise from this ''stupid'' mistake. Always check return values!!

Enumerate whenever writing mission critical code. I admit to not always enumerating during debugging/pre - alpha, but you must enumerate in commercial apps. If you don''t you will end up with software that only works on your personal development machine.

PS. If you want some code or some help post a reply to this message with your email address and I will get back to you. I have been contemplating writing an implementation-centric game/graphics programming book with special coverage of D3D, but until I do, you maybe should consider buying Inside DirectX. The material is dated (DX5), and doesn''t cover D3D, but I strongly advocate their approach to DX programming and the book is fairly thorough. The book also covers some key concepts of COM and most of the methods used in the book are still supported by DX7.

--Sickened with the World,
Cauldron the Melancholy

#11 Domini   Members   -  Reputation: 126

Like
Likes
Like

Posted 10 February 2000 - 07:36 AM

BigCarlito gave a good idea about writing a wrapper for Direct X. That is what I am programming now, but it is more than Direct X, it pretty much mask windows and it makes you almost think you are still programming DOS.

But if you just started, you have to learn how to create algorithms and code them. Try making a simple DOS menuing program, maybe for a fake store or something. Start by writting the specs(all the things you want it to do), then design a simple interface. I use to use flow charts to help me design algorithms. They really help you see what is going on. I still use them sometimes. Then take your flow chart and make it into a algorithm, or step by step top down design of what the program will do. Once you have a complete algorithm, it should be easy to code. I am saying to start with something simple, so you can learn how to put together a complete program. You need to be able to program and see the answers to problems. Once you get good at this, everything else will come easily.

As for memorization, I always have a book around, and I use the help documents, because most of the programmers I know, including me, can't remember a thing, so we need the doc so we have the syntax for the built in functions. Also, in windows programs, you will notice that the initialization code is the same or very similar for all of your stuff. Try making a template and just alter it.

Edited by - Domini on 2/10/00 1:40:48 PM




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