Omnimaga
Calculator Community => TI Calculators => TI-BASIC => Topic started 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
-
Do you know a little bit about 3d vectors and vector projection?
-
No, this is my first 3D program. I am trying to learn the concept for the future, though. Can you help?
-
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)
-
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).
-
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.
-
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.
-
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.
-
Yeah that would work, although maybe with a slightly smaller view depth, to save speed.
-
Would love to see a demo of this method.
-
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.
-
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!
-
Oh I meant the BASIC line drawing commands. To be honest, they are kinda slow compared to many other stuff D:
-
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 ^^
-
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. :-\
-
Most people use matrices for such games, but strings could possibly work (like Illusiat 13).