Help A Newbie
I am new to the world of game/graphics(in C/C++) programming. I know very little DirectDraw and don''t know where to start. I''m also having trouble finding a way to load a bitmap on screen. How do you recommend building up to eventually getting my first game finished? What kind of game should I make first?
D:
February 14, 2000 05:55 PM
a little person shotting something. easy type of game. and ull need to know a couple of stuff to do it.
maybe you could start by putting a picture on the screen. then maybe make it move. eventually make a space invaders game or something similar
well, if you are decent with c/c++ and know the basics of the win32 API.. then directdraw is easy as can be.
best way i can see if you are ready is to just buy a directdraw book. all these really are is an overview of the functions/datatypes of directdraw since learning directdraw is really just memorization.
if it still doesn''t make sense you prolly wanna read up on your c/c++ (helps to be pretty fluent first), win32 API, and a lot of graphics programming theory.
best way i can see if you are ready is to just buy a directdraw book. all these really are is an overview of the functions/datatypes of directdraw since learning directdraw is really just memorization.
if it still doesn''t make sense you prolly wanna read up on your c/c++ (helps to be pretty fluent first), win32 API, and a lot of graphics programming theory.
-werdup-
February 14, 2000 07:05 PM
Repost:
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
PS. I also can explain how to load bitmaps onto a DDraw Surface.
--Preparing to conquer,
Cauldron the Zealot
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
PS. I also can explain how to load bitmaps onto a DDraw Surface.
--Preparing to conquer,
Cauldron the Zealot
Thanks for the tips, but my main problem is loading a bitmap onto a surface. I looked at the code but couldn''t make sence out of it. The tutorials and the SDK''s are no help if I can''t understand them. I need to talk to somebody directly or make contanct with a HUMAN. Otherwise, I''m not going to be able to become the great game programmer that I would like to be. I bought Inside DirectX and it is somewhat helpful. But I''ve read how to load a bitmap from that book, form Windows Game Programming for Dummies, and Tips of the Windows Game Programming Gurus. However, I never understand the code. If anyone would like to help me out and explain the code, please do! It would be greatly appreciated! Thanks in advance.
D:
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement