Advertisement

Am I a retard?

Started by February 07, 2000 02:54 PM
24 comments, last by kylebell 25 years, 1 month ago
Im must be, because I have not found a single usefull graphics programming tutorial to date. Everything these tutorials has taught me has never worked, and neither has some of the things my friends have told me. I even went went out and bought Windows Game Programming for Dummies thinking, "This is a nationally released book published by a respectable company, this must be helpfull!" only to find that not only the things it told me to do would not compile, but the source code included on the CD wont compile. Wether it be declaration syntax errors to non there posing as graphics programmers. Has anyone here at existing header files, I have not successfully compiled some sort of Mode 13h, DirectX, and what-not type of program during my entire interest in game programing, which has been a while. This leads me to believe that I myself am something wrong, or there are alot of people people out one point or another in there career run into similar problems as mine, and if so, how did you overcome them?
Seems to me like you have to learn how to use your compiler. You are probably configuring it correctly, e.g. point it to the include files, libraries etc.

Say what compiler you use and what errors you get when compiling and someone is bound to be able to help you.
Advertisement
How much non-game oriented programming have you done? Games are a really bad place to start learning! If you don''t have a really good grip upon your chosen language (normally C++ these days), you will get nowhere writing games. Windows Game Programming for Dummies is a really stupidly titled book. As an introduction to writing DirectX games its pretty good. As an introduction to programming in general - its terrible. You are much better off with some of the "teach yourself C++" books.

One thing thats really been bugging me (and a number of other people on this board) of late is the number of people who try and write games before they even understand the absolute basics of computer programming - structured programming, common data structures (such as linked lists, binary trees, etc.), and most of all.... sensible object/application design.

If you aren''t a newbie to programming and you are just having problems with your compiler, then I appologise for ranting.
Well first you need to take the time to actually learn the language and the compiler you are using. I personaly had no problems with Andre''s Dummies book but there is one little line of code you have to change if you are using VC++ 6. You say you have been interested in game programming for a long time, in that time have you learned the language(C/C++)? Anyway if you want some help the best advice that I can give you is to learn the language which will definitaly mean needing to buy a few good books on the subject and reading through your compilers documents. Post the errors you are getting and maybe we can help

Later
OME
Kyle,

The code in windows game programming for dummies does compile. You just do not have your project set up correctly. Let me see if I can help you out because it''s quite a pain in the butt.

#1. Install the DirectX (5.0 or above) SDK onto your hard drive.

#2. Install Microsoft Visual C++ (5.0 or above)

#3. Start Microsoft Visual C++

#4. Create a new Windows 32 bit application

#5. Look up at the title bar, choose TOOLS then Options and click on the DIRECTORIES TAB.

#6. Leave the box where it says PLATFORM as "Win32" and the SHOW DIRECTORIES FOR as "INCLUDE".

#7. Below the "Include" you will see some icons. Choose the one on the left that looks like a box with a glowing corner. And then press the "..." button that comes up.

#8. Now locate the DirectX SDK directory, and find the include directory I.E. "c:\mssdk\include"

#9. Highlight the new directory you just created and press the up arrow icon until it''s at the top.

#10. Goto the "Include" drop box and click on it. Choose "Library Files" and then click on the box with the glowing corner again.

#11. Now hit the "..." button and locate your DirectX Library directory I.E. "c:\mssdk\lib\"

#12. Highlight the newly created directory and use the up arrow icon until it''s above all others in the list.

#13. Ok now your done setting up the compiler it''s time to set up your project. Click on your project tab that says "File View" and double click on the project name.

#14. Right click on the "Source Files" directory that appears and add all the files you need. For instance if you are trying to compile chapter 18 from andre''s book you would add GPDUMB1.CPP,GPDUMB2.CPP,GPDUMB1.h,GPDUMB1.h, and Underwld.cpp.

#15. Press Control + F5

And it should compile correctly.

Good Luck
Joseph FernaldSoftware EngineerRed Storm Entertainment.------------------------The opinions expressed are that of the person postingand not that of Red Storm Entertainment.
Not to come across as an ass but to sum up what EvaClear stated in 4 words....
Read the damn book

anyway, been a long frustrating day
Over and out
OME
Advertisement
to answer your question: yes
Whew! There are some vicious programmers out there.... Kicking somebody when they''re down.... Kylebell was asking for help...not insults (kudos to those who tired to help). Oh well..., Kyle, there are other places on the net to ask for help. Also, try to compile some of the DirectX samples that come with the SDK. I can sympathize with you...sometimes just getting something TO COMPILE is a small but gratifing victory. Hang in there.

-Dave

P.S. Read evaclear''s post. Remembering to point to the correct directories is a classic problem.



Well, I guess I''ll try to reply to everyones post, thank you for the input

To Spellbound- That is a very good possibility, Im currently working on Visual C++ 6.0

To Bracket- I would have to say I have a very good grasp on general programming. I have a large
selection of programming books( including your suggested "learn C++ in 24 hours") I''ve blown
threw, specifically C++ but a little C and BASIC sprinkled in. But books can take only take
you so far, so last semester I took a C++ programming class in which the teacher made a
specific effort to let me try to work out the problems instead of helping me like the other
students, or at least thats what he told my dad at parent teacher conferences(im sorry if it
sounds as if I bragging, it wasnt intended. Im just trying to get the point across that Im not
a complete newbie). You can bet I''ve made my share of Averaging, and other simple math console
programs, and Im ready to take the next step.

To OME - thank your for the directions, but Ive already gone threw that process, and I still get
the same error in Underwld.cpp as I get in all of his source, something having to do with his
winclass.hbrBackround = GetStockObject(BLACK_BRush); statement, saying it "cant convert
from void * to struct HBRUSH__*'' conversion from void* to pointer to non-void requires an
explicit cast" . All well, maybe someday ill learn enough about win32 programming to fix it,
until, Ill start basic and learn how to properly do some VGA mode 13h programming


To Anonymous Poster - Funny because its true.
It''s kinda hard to see what the error is with your last post. You should include some of the source.

Try typecasting your pointer to an HBRUSH:

winclass.hbrBackround = GetStockObject((HBRUSH)BLACK_BRush);

or define your "BLACK_BRush" variable as an HBRUSH*.


E:cb woof!
E:cb woof!

This topic is closed to new replies.

Advertisement