Archived

This topic is now archived and is closed to further replies.

bdrewes

A concept

Recommended Posts

Does anyone have any idea on how I might implement the following concept: I want to create a win32 3d game or interactive demo that would run smoothly on a machine that would be considered today to be mid to low speed (333 - 600 mhz) running windows (95/98/XP) that would require -NO- additional software or drivers to run- no directx, no opengl, nothing that would be required by the user to install or download. I am still learning, and many of the things I thought I knew have been proven otherwise, but so far this is what I think I know: Without using opengl or directx, you can plot pixels with assembly. This option would not be viable however, because I require the program to be win32...and windows does not allow you to access interrupts. Windows GDI may be an option, but I need to hear from you all on how fast it is, in particular the setpixel function. Something else....??

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Not to be a naysayer, but why the hell would you want to do this?

Share this post


Link to post
Share on other sites
(1) As a step in teaching myself.
(2) Could have great potential as an -optional- low end graphics mode in a game.

This DIB thing sounds great, I looked and found out I have a book that devotes most of 9 chapters to exactly that! Thanks for pointing me in what looks like definitely the right direction.

Share this post


Link to post
Share on other sites
I''m not 100% certain, but I think programs written with the Allegro game programming library will run without any addition software. Can anyone vouch for this one way or the other? www.allegro.cc to get it. You won''t code Quake 3 with it, but it isn''t a bad choice for Super Mario Bros.

Its also cross platform. The same code will generally work in DOS, Windows9X, or Linux. It (Allegro, as well as the program) just needs to be built with the right compiler for the target platform.

You will have to compile and build Allegro yourself as well.. This can be a challenge and a learning experience in and of itself.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by bdrewes
(1) As a step in teaching myself.
(2) Could have great potential as an -optional- low end graphics mode in a game.

This DIB thing sounds great, I looked and found out I have a book that devotes most of 9 chapters to exactly that! Thanks for pointing me in what looks like definitely the right direction.




Sounds like an interesting challenge. What was the book, by the way?

Share this post


Link to post
Share on other sites
quote:
Original post by CaptainJester
I don''t think Allegro can run in a win32 environment, can it?




Yes. See www.allegro.cc for more info.

That said, it does rely on other APIs to perform some of its functions, so it''s probably not what the original poster is after.

To respond to the original question: Go with DIB-sections and dig up an old MS-DOS games programming book (Mike Abrash''s original "Zen of Graphics Programming" book is highly recommended) and just adapt those techniques to draw to DIB-sections rather than directly to the video card itself.

It is possible to access video RAM and video card registers directly under Windows, but it isn''t advised: There''s no need for it. Even a 333MHz PC is pretty damned fast for most purposes, so the slight overhead of asking Windows'' GDI to blit a DIB to the graphics card is insignificant. (Look at what DOOM managed to do on a lowly 33MHz 486.)

Also, the ''good'' Windows kernels (Windows 2000/XP) will go out of their way to stop you. This is because you don''t get a crash-proof OS if you allow uncontrolled direct access to hardware.

Hope this helps.





--
Sean Timarco Baggaley

Share this post


Link to post
Share on other sites