🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Wanting to put an image on screen. Any good tutorials?

Started by
5 comments, last by RoTTer 24 years, 9 months ago
With what directx,allegro,windows,dos what?
Advertisement
Doh!
ehhe
Sorry... And thanks for pointing that out...
I was wanting to know how to do it on DOS -> DJGPP, but in fact I dont know how to do it on Direct X, also, so it'd be very kewl to know both =]

Thanks again,
-RoTTer

I really recommend that you create your own graphics format (you'll have to write your own sprite editor though).

Because bitmap (and other formats) may have different palettes.

This can be very annoying because you can only display 1 palette (in 256 color screenmode).

Well in the directx sdk look at the ddutil.cpp file. It contains code to load .bmp files of any depth to a directdraw surface where you can then blit them. As far as djgpp really goes its mainly just a matter of parsing the format header then reading in the data. I would say to start with .bmp because in my opnion its the easiest to make a loader for. As far as palettes go... Really all you do is draw everything in 24bit then put all the pics on on big pic and have the paint program reduce it all to indexed color. It well generaly do a good job. Otherwise just run in 15+ color(thue harder to do in dos).
Hope this helps some do a search on the net im sure you can find an example for djgpp.
If fact i think i might have a link to one.
well this isnt what i was looking for but this seems to have alot of very usefull stuff for djggp http://www.geocities.com/SiliconValley/Park/8933/
Also you might look into allegro for dos ,but as far as the industry is right now directx is the thing.
Thanks both for the reply =]

Lemme reply both in this message :
bosjoh - Yeah, I tried that once, kinda long ago, but managed to make it only 16 colors images, lol. But I think Ill retry it, its not that bad... Although being able to load other file formats would be better, as Id be able to download pictures, have friends do it for me, or, eventually, I draw my owns (ugh! :P ) on a decent drawing app =]

Zenroth - Uhm... I think I gotta buy a Windows programming book, cause I s*ck bad in Visual programming, and C++ programming, also...eheheh, but thanks anyway =]
Im looking the site you gave the link, and it seems very good :>

Well, thanks you both for the reply, and Ill try to do something about the images =P

Cya,
-RoTTer

Hello!

I want to put an image loaded from HD as a sprite on my games. Any file format would do (er, I mean, by any : BMP, GIF, PCX or JPG... but preferably GIF or JPG). Im not very (er, read "very" as "any") good in programming, so I didnt manage to make some PCX ones I got work... But o, well...hehe If anyone can help, Id be very happy =]

Cya,
-RoTTer

Why don't you create a converter?
Then you can have the ease and speed of your own graphics format and the compatibility of existing formats.

For information about graphics file formats visit pages like http://www.wotsit.org

This topic is closed to new replies.

Advertisement