3d Engine

A forum where you can announce your awesome project(s).

Moderator: MaxCoderz Staff

Post Reply
User avatar
thegamefreak0134
Extreme Poster
Posts: 455
Joined: Mon 23 Jan, 2006 10:09 pm
Location: In front of a Computer, coding
Contact:

3d Engine

Post by thegamefreak0134 »

Well, it just goes to show you should never leave a bored coder to his own devices. No pun intended.

I wrote a 3d engine in two days. What makes this even cooler is that (1) it's my first 3d project ever, and (2) it's in BASIC. Cool.

This thing can plot points, wireframes, and polygons based on the x,y,z point coordinates and polygon lists located in certain lists. I'll post more info (mainly a link to the package) later, but my time is rather crunched. BTW, it does also do a bit of crude polygon sorting, and points for the models should be arranged in a clockwise manner to be viewed. There are some mild issues (like mainly the view is flipped on the Y axis) but other than that it looks pretty good for a calc. I hope to use the experience and knowledge to put the engine to use in an asm project, and in a really cool GBA project.

I do have a screen showing polygon filling:

Image

-gamefreak

Comments welcome.
I'm not mad, just a little crazy.

DarkNova - a little side project I run.
User avatar
anykey
Extreme Poster
Posts: 420
Joined: Mon 31 Jan, 2005 3:36 am
Location: In the matrix
Contact:

Post by anykey »

Cool. Nice work.
I think, therefore iMac
Image
User avatar
Madskillz
Calc Wizard
Posts: 745
Joined: Fri 17 Dec, 2004 10:22 pm
Location: Wandering around in the Jungle...
Contact:

Post by Madskillz »

cool...sounds awesome! :)
The Revolution is here...
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

Nice stuff tgf0134! What kin of speed does it run at?
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
ninja_master
Regular Member
Posts: 76
Joined: Sun 13 Nov, 2005 2:42 am
Location: A cold cold land filled with snow
Contact:

Post by ninja_master »

That looks great. I hope we get to see it in action soon.
Wright Studios.org the place for calculator graphics.
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

Nice work :)
I second tr1p1ea's query - how fast is it running?
User avatar
thegamefreak0134
Extreme Poster
Posts: 455
Joined: Mon 23 Jan, 2006 10:09 pm
Location: In front of a Computer, coding
Contact:

Post by thegamefreak0134 »

Um.. well... this is basic, so that should say something. On my 83+SE, it can render the ablve frame it about 30 seconds. Not bad considering that this is BASIC, and considering that I have done no optimization of any kind. However, since it has to do the fill-in the polygons thing, the basic version may just have to remain slow. The engine could be ported to asm easily, but I need to either brush up on the floating point math handling or find a way to render it in fixed point. That's not hard on a gameboy, but this is an 8-bit processor, no? I don't think I can get the needed accuracy unless I can at least do 16-bit math operations, which are unfortunately quite limited. I could of course fake that by handling the separate parts individualy... But enough about that.

Glad to see it was taken well. Once I put it all together in one program (not hard) I'll go ahead and post it.

-gamefreak
I'm not mad, just a little crazy.

DarkNova - a little side project I run.
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

That is pretty decent for Basic, especially since you arent faking it really.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
User avatar
benryves
Maxcoderz Staff
Posts: 3087
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

Game Boy or TI-8x, 8-bit or 128-bit, fixed point ideas remain the same. ;)

My 3D engine (and another one based on points I did for the Game Gear, also Z80) use a mixture of 8, 16, 24 and 32 (!) bit fixed-point arithmetic, usually to the extent of 8.8, 16.8 and 16.16 splits.

This site could be useful. I'm using slightly modified versions of their routines to handle signed multiplication/divisions.

Floating point is probably not a good idea for realtime on our puny calcs. :(
Post Reply