Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Help A Newbie


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

#1 PsYcHoPrOg   Members   -  Reputation: 115

Like
Likes
Like

Posted 14 February 2000 - 11:38 AM

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?

Sponsor:

#2 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 14 February 2000 - 11:55 AM

a little person shotting something. easy type of game. and ull need to know a couple of stuff to do it.

#3 PsYcHoPrOg   Members   -  Reputation: 115

Like
Likes
Like

Posted 14 February 2000 - 12:11 PM

Any more suggestions?

#4 shmaLbus   Members   -  Reputation: 122

Like
Likes
Like

Posted 14 February 2000 - 12:18 PM

hey, where abouts in nj are you from?

#5 PsYcHoPrOg   Members   -  Reputation: 115

Like
Likes
Like

Posted 14 February 2000 - 12:29 PM

bergen county

#6 PsYcHoPrOg   Members   -  Reputation: 115

Like
Likes
Like

Posted 14 February 2000 - 12:30 PM

Please, I need help in the world of graphics and games!!!

#7 Moe   Crossbones+   -  Reputation: 1253

Like
Likes
Like

Posted 14 February 2000 - 12:51 PM

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



#8 shmaLbus   Members   -  Reputation: 122

Like
Likes
Like

Posted 14 February 2000 - 12:51 PM

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.

#9 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 14 February 2000 - 01: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

#10 PsYcHoPrOg   Members   -  Reputation: 115

Like
Likes
Like

Posted 14 February 2000 - 01:13 PM

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.

#11 PsYcHoPrOg   Members   -  Reputation: 115

Like
Likes
Like

Posted 14 February 2000 - 01:43 PM

My e-mail adress is Psychoprog@hotmail.com

#12 Bully   Members   -  Reputation: 144

Like
Likes
Like

Posted 14 February 2000 - 11:30 PM

My advice is not to just have a look just at the bitmap loading part in the book but read both of the chapters on directdraw in "tricks of the windows game programming gurus
Then you should be able to understand it. After all these books are for begineers arn''t they

-David

#13 PsYcHoPrOg   Members   -  Reputation: 115

Like
Likes
Like

Posted 15 February 2000 - 01:46 AM

I have read them, and I know, at least, how to create a surface and set it up. I also know how to set it to 16-bit or 8-bit w/ a palette. But I am having a lot of trouble loading bitmaps. Any code w/explination would help out a lot.

Games are the path to another dimension.

#14 Khawk   Senior Staff   -  Reputation: 1362

Like
Likes
Like

Posted 15 February 2000 - 10:23 AM

http://www.gamedev.net/reference/programming/directx/article608.asp

Kevin

#15 Staffan   Members   -  Reputation: 122

Like
Likes
Like

Posted 15 February 2000 - 10:49 AM

If you did read all those books you _should_ be able to figure out how to load it. If not, read them again. Look up the bmp format on wotsit.org and you should have a pretty good idea to how it works.




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