3D Prototype Polygon Engine
#1
This code works very well in FreeBasic, but in QB64 there is still some screen flickering and "error-like" behavior to work out.

Nonetheless, this is what the title says - You can create solid 3d shapes and run around them like a person-person game. The demo has just 3 cubes but they could have been anything.

The engine has the usual tricks: view plane clipping, backface culling, tunable field of view distance, obscured-face hiding, etc.

If you are in the 3D engine business already, and don't recognize how I did something, don't be surprised. This is a complete self-invention and is by no means the "best" way of doing anything.

All that said, enjoy!

SCREENSHOT ADDED BY ADMINISTRATOR (Screenshot shows demo running in QB64)




Attached Files .bas   3DPLANELAND_FB64.BAS (Size: 51.03 KB / Downloads: 108)
Reply
#2
STxAxTIC,

This reminds me of Michael Abrash's 3D Cube tests in his book, "Graphics Programming Black Book (2001)", in Chapter 51, "Sneakers in Space", which can be freely, and legally download from Dr. Dobbs website, in part or in whole, thanks to Michael Abrash himself!

Here is the link to the book:  Dr. Dobbs - Michael Abrash: Graphics Programming Black Book - FREE & LEGAL download

Also, two images of a rotated cube can be seen on page 962, as seen here in these photos:




On a personal note, Michael Abrash's writings and books are what inspired me to go deeper in graphics programming using Assembly Language. I have all his books (that I know of) on my shelf and they are all in reach when I need them.


Walter Whitman
The Joyful Programmer
Dedicated to empowering computer programming hobbyists, tinkerers, amateurs, and enthusiasts.
profile for Walter Whitman at Stack Overflow, Q&A for professional and enthusiast programmers


Reply
#3
Oh hey, works in QB64. Flickering? no... 

hmm... would Rubic's cube work? dang! 1198 lines!

Another old one replied to:



Got it yet Walter?
B += x
Reply
#4
I think I know where to look. Thank you for your continual help in this matter Bplus.
Dedicated to empowering computer programming hobbyists, tinkerers, amateurs, and enthusiasts.
profile for Walter Whitman at Stack Overflow, Q&A for professional and enthusiast programmers


Reply
#5
Well it seems a sure thing when I reply to old posts?

Oh there it is again, I might be going over a posting limit as well, a flag that I might be a spammer...
B += x
Reply
#6
@Bplus,

Well, the good news is, there are no posting limits set on this forum.

The bad news is, I still don't know what is causing the error.
Dedicated to empowering computer programming hobbyists, tinkerers, amateurs, and enthusiasts.
profile for Walter Whitman at Stack Overflow, Q&A for professional and enthusiast programmers


Reply