Omnimaga

Calculator Community => TI Calculators => TI-BASIC => Topic started by: Joshuasm32 on June 28, 2013, 01:56:06 pm

Title: A 3D development project
Post by: Joshuasm32 on June 28, 2013, 01:56:06 pm
I would like to create a 3D program with simple graphics in TI-BASIC.  I do not expect it to be very fast at all, but I just want to have the concept down for the future.  What I want to make is something that looks like a first person shooter.  I already decided that to make it work, you need a big matrix of graphics locations and 4 coordinates; X and Y for the location coordinates, W and Z for the view coordinates.  However, while I get how to do the the X and Y graphics, I cannot seem to figure out an effective algorithm for the W Z coordinates' graphics.  Does anyone have experience with this?  Thanks in advance for the help!   :D
Title: Re: A 3D development project
Post by: Keoni29 on June 28, 2013, 02:42:27 pm
Do you know a little bit about 3d vectors and vector projection?
Title: Re: A 3D development project
Post by: Joshuasm32 on June 28, 2013, 03:29:08 pm
No, this is my first 3D program.  I am trying to learn the concept for the future, though.  Can you help?
Title: Re: A 3D development project
Post by: Hayleia on June 28, 2013, 03:46:35 pm
You may want to have a look at Xeda.s raycaster in basic. Sorry, I am on my Android so I can't really give you the link but you'll surely find it under Xeda's "last contributions" (in her profile)
Title: Re: A 3D development project
Post by: DJ Omnimaga on June 30, 2013, 09:36:43 pm
Moved to TI-BASIC sub-forum, because it's kinda misleading in the projects section (I had my hopes up thinking it was a new 3D project with screenshots and stuff).
Title: Re: A 3D development project
Post by: Xeda112358 on June 30, 2013, 10:00:46 pm
Oh, the BASIC raycaster is more like a pseudo-3D thing, but the topic is here (http://ourl.ca/19081/351079). I based that off of Lodev's tutorial and code by Matrefeytontias. I'm not all that good at 3D stuff, but I found some math about 3D rotations and whatnot in my Linear Algebra book. I have some difficulty figuring out the right way to do projections, still.
Title: Re: A 3D development project
Post by: tr1p1ea on July 01, 2013, 01:45:26 am
I complete 3D system involves a fair bit of groundwork. That said you can make simple enough 3D projects if you dont require full 6-degrees-of-freedom movement. Luckily an FPS doesnt require this which is why you can get away without the need to store orientation in matrices/quaternions etc.
Title: Re: A 3D development project
Post by: Keoni29 on July 01, 2013, 03:54:28 am
I think a 3d-ish dungeon crawler would be easier in BASIC. You turn 90 degree angles, so you can put coördinates of anchor points of the 3d perspective in a lookup table and draw lines.

Title: Re: A 3D development project
Post by: DJ Omnimaga on July 03, 2013, 11:19:48 pm
Yeah that would work, although maybe with a slightly smaller view depth, to save speed.
Title: Re: A 3D development project
Post by: tr1p1ea on July 03, 2013, 11:26:28 pm
Would love to see a demo of this method.
Title: Re: A 3D development project
Post by: DJ Omnimaga on July 03, 2013, 11:36:04 pm
Now that you are in this topic, I wonder if just displaying a large bunch of 8x8 sprites using xLIB chained sprites method would be fast enough compared to drawing a bunch of lines? That would allow better graphics while still not taking too much space.
Title: Re: A 3D development project
Post by: tr1p1ea on July 03, 2013, 11:40:05 pm
It would be variable and dependent on how much is going on at any time.

That said, line drawing should actually still be reasonably fast on the 84C, and the possibility of extra colours is a bonus too :).

I guess this calls for some tests!
Title: Re: A 3D development project
Post by: DJ Omnimaga on July 04, 2013, 03:48:02 am
Oh I meant the BASIC line drawing commands. To be honest, they are kinda slow compared to many other stuff D:
Title: Re: A 3D development project
Post by: Sorunome on July 04, 2013, 05:16:31 am
That method does look good, but yeah, as dj said, prolly a smalle depth to save speed :)/me would like to see a demo of it too ^^
Title: Re: A 3D development project
Post by: Joshuasm32 on July 17, 2013, 01:31:22 pm
Sorry, I didn't read this tread for a while...   <_<  The 90º turn angle would work well, but how would you store the data?  I guess a matrix could work, but I wonder if another method is faster, such as a list or an appVar.   :-\
Title: Re: Re: A 3D development project
Post by: DJ Omnimaga on July 17, 2013, 04:50:12 pm
Most people use matrices for such games, but strings could possibly work (like Illusiat 13).