Skip to main content
gamedev.net
🔒 Locked

Loading and Displaying Bitmaps

Started by giant Dec 7, 2001 at 7:32 AM 2 replies 300+ views
Original Post
giant
giant
Hi. I am new to DIrectX, so for my first project, I decided to write Pong. Simple I know, but a good place to start. I have the functionality of the game working, in 256 color mode, but now I want to add bitmaps for the paddles and the ball. I have DirectX setup fine, to use DX7, (Lp....4 or whatever it is) I bought the book, "Tricks for the Windows Game programming Guru''s", and using this I tried to load a bitmap, create a surface, attach the bitmap to the surface the blit the bitmapped surface to the primary surface, but it doesn''t work. It compiles and links fine, but when I execute it, I just get a blank black screen. I would like someone to point me to a tutorial, on the topic, or if anyone has some code that does just that, it would be greatly appreciated. Thanks Giant "Only two things are infinite, the universe and human stupidity, and I''m not sure about the former." --Albert Einstein
zipless
zipless
Theres another thread going that you''ll want to look at
http://www.gamedev.net/community/forums/topic.asp?topic_id=70018

Sounds like the same problem, you need to make sure that the surface is Blited every cycle. If thats not it then it''s almost certainly a problem with loading the bitmap file.

/ Ignorance is bliss, then you go and spoil it by learning stuff /
giant
giant
Thanks for the detour to the other thread. Just found it a few minutes ago myself, and am certain that it is the same problem.

Giant

"Only two things are infinite, the universe and human stupidity, and I''m not sure about the former." --Albert Einstein
dark_angel09
dark_angel09
i had the same probelm, only with a different book, i felt REALLY stupid once io solved the problem, check if u have the image in the same folder as the executable, if its not there put it there and try again. if its not the same probelm well, then im just an idiot i guess and i am a newbie, latez

------------------------------
"kill one and your a murderer, kill thousands and your a conquerer"
"We must move forwards not backwards, upwards not forwards, and always twirling, twirling towards freedom."
------------------------------"kill one and your a murderer, kill thousands and your a conquerer""We must move forwards not backwards, upwards not forwards, and always twirling, twirling towards freedom."

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.