Advertisement

Who has made their own graphic functions?

Started by January 04, 2001 06:30 PM
10 comments, last by Moz 24 years ago
Just wondering... How many of you have made your own graphic functions without copying or basicly converting someone else''s. What I basicly mean in "How many of you have made graphic functions by your self off the top of your head". I am wondering because I like trying to make line drawing and (hopefully soon) textured polygon functions by myself and I what to know how many of you do the same. I admitte I have "Tricks of the Windows Game Programming Gurus" by I want to see if I can do these myself without anyones help... Please reply with comments, your achevments and, well, anything else we will all find interesting...
I made a whole Mode13h library, which is kinda obsolete, but fun.

I admit that I copied a few tutorials at first, but later I experimented, and re-wrote most of it... Is this what you mean?

Advertisement
I made a phong triangle rendering lib which worked
along side my own blitting engine to produce 3d/2d graphics
on the same screen ie rotating polygons behind pre-rendered
columns.
Gave up after a while in favor of opengl for total 3d approach.
I also made a little 0x13 library. But even then, everyone was just copying breshnam''s line algorithm. With all the API''s floating around these days, the only incentive to doing your own is for learning purposes... which is VERY VERY good, by the way.

There''s no shame in looking at someone else''s code. That''s how we all learn. Despite my skepticism, I probably have ALL of La Mothe''s books, ALL of the "Secrets of" series, and ALL of the Dummies books on the subject of programming.

The ONE thing that I did entirely on my own was a font engine in 0x13. I claim supremacy in that field.
Well, it doesn''t seem that many people bother writting these things anymore - they just use APIs

In the past though, it was essencial that you where able to write your own, e.g. look at Doom, Quake - they where written in software before being ported to the "APIs" (OpenGL, DirectX).

Mind, they where written in dos though

Can anyone add to this?
I wrote a Mode 13h library as well in DOS. It focuses mainly on 2D Game Programming, so it had no shape functions, just a lot of neat stuff for blting and palette manipulation (as well as saving and loading, both to files and memory in several formats) and the like. Had about 30-40 functions if I remember correctly. I also went on to write a sprite class for DOS that when combined with this library, worked pretty well. I also had a SVGA library that I did quite a bit of work in (doing SVGA in DOS, even with VESA, was pretty hard, especially to get reasonable fill speeds because of all the plane switching and stuff. Ended up with a lot of assembly code in there that I can't understand anymore). Best part of my SVGA library was figuring out how to load high res PCX files successfully. So yes, I wrote some graphics functions, and while they are useless now, the knowledge will last forever. Helps understand DirectDraw more, and why it is a lot easier than doing the stuff yourself. If you have the time, do dabble in DOS, it's lots of fun, much more exciting than figuring out how to make yet another API call.

PS. Anyone have any idea why the .PCX file format was replaced by BMP when Windows came along? PCX is by far the superior format, offering compression without quality loss, and a format that is pretty easy to load in. Andre popularized it for the DOS crowd, so why on earth did MS decide BMP shouldnt have any compression? It sux that that's all the WinAPI has true support for, loading in a format that is almost useless for a graphics heavy program (like a game, especially 2D ones)

Edited by - LordElectro on January 5, 2001 12:07:58 PM
BetaShare - Run Your Beta Right!
Advertisement
i know one command who made word fasters 2D graphic engine.
it called GGX. it writen allmost in asembler and mishnes codes(even images)

if you wanna i can send to you their contacts
my mail:kashey_2000@mail.ru
cool programer
PCX isn''t "by far" the superior format, in my view. The BMP format also offers lossless compression--run-length encoding, the very same technique used in the PCX format. However, that''s only a format feature, not something that most apps or even the Win32 API supports. Regardless, both formats are basically useless these days since they very obviously favor palettized image data. TIFF, Targa, or PNG are the way to go.

As to _why_ Microsoft decided to support only BMP in their API...well, who could ever know? Perhaps because it''s such a stupidly simple format--maybe that''s all their programmers could figure out how to use. Maybe they did it for the same reasons they created Direct3D--to kill competition and leave everyone with nowhere else to go. Who knows?
merlin9x9: Any idea where to get PNG format information?

Moz: Mode 13h was what DOOM and Quake used, and the only API calls for that, was the BIOS.
quote: Original post by merlin9x9

PCX isn''t "by far" the superior format, in my view. The BMP format also offers lossless compression--run-length encoding, the very same technique used in the PCX format. However, that''s only a format feature, not something that most apps or even the Win32 API supports. Regardless, both formats are basically useless these days since they very obviously favor palettized image data. TIFF, Targa, or PNG are the way to go.


Yes, technically BMP does support RLE, but not MS BMP. You kill your own point when you admit Win API doesn''t support RLE BMPs. PCX is thus much better than (MS) BMP, and also (like BMP) supports color depths other than 256 colors. Tiff and Targa don''t matter because back in the day MS had to make the BMP decision 256 colors was extremely lot, and im not sure if those formats were even around back then. And correct me if I''m wrong, they use compression schemes that take longer to decompress (a serious issue back then). I must admit i have never worked with Targa and Tiff, so I can''t really say much more, maybe it might have been the more logical choice, but im not the one to agree or disagree. PNG i totally agree, it is the way to go, but WinAPI doesnt support it either, plus it kinda sorta didnt exist in the days of Win 1.0

Anyway, my point is that MS, back when creating Windows 1.0, had a perfectly good, fast loading format called PCX that they COULD have used. But they chose instead to use uncompressed BMPs. And this being an age where even a 10KB bitmap was considered taking up a lot of space. I guess we will never really know...

quote:
As to _why_ Microsoft decided to support only BMP in their API...well, who could ever know? Perhaps because it''s such a stupidly simple format--maybe that''s all their programmers could figure out how to use. Maybe they did it for the same reasons they created Direct3D--to kill competition and leave everyone with nowhere else to go. Who knows?


If you can''t figure out how to load in a .pcx file, what are you doing as a professional programmer? And if they were trying to kill competition, wouldnt it have made sense to create a format actually superior to the competition? Only excuse I can think of is using BMP for performance reasons, but then PCX should have been included anyway, no reason why two formats can''t be supported.
BetaShare - Run Your Beta Right!

This topic is closed to new replies.

Advertisement