Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Builderboy

Pages: 1 ... 371 372 [373] 374 375
5581
News / Re: Contest
« on: May 07, 2009, 01:07:16 am »
Do you even know if there IS every basic trick?  o.O

5582
TI-BASIC / Re: Raycasting halp?
« on: May 06, 2009, 08:40:27 pm »
No prob, Hope you get it working!

5583
TI-BASIC / Re: Raycasting halp?
« on: May 06, 2009, 08:26:24 pm »
K, so when we want to create a 3D environment, we need to have some way to store the world as data.  if we wanted, we could store every coordinate of every triangle that makes up the walls and floor and objects.  BUT, since we want to be as memory efficient as possible, we will store the world as a simple matrix.  The world well be made up of a series of blocks that lay on a grid.  A 1 in the matrix might represent a block, and a zero might represent an empty space:

[1,1,1,1,1,1,1,1]
[1,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,1]
[1,1,1,1,1,1,1,1]
 
Now, in order to render the image on screen, we need to consider how it will look.  There are 96 pixels from left to right, and that is 96 times we need to decide what kind of column to draw (remember, every pixel in a single column is responding to the same distance, so we don't have to go pixel by pixel, only column by column)

If we consider a view of a wall, we can see the farther it gets away, the smaller it gets.  The actual formula is aparentHeight = Arctan(ActualHeight/Distance) , but this is almost exactly equal to aparentHeight = ActualHeight/Distance, and this way is faster.

So in each column of pixels, we will draw a single slice of wall that is a certain distance away.  We have the formula, now all we need is the distance.  This is where the raycasting comes in.

We are at a certain position, and we are facing a certain direction.  In order to find the distance in front of us until we hit a wall, we just need to move us forward until we hit a wall.  You can then do this many more times at many slightly different angles to get all the distances you need (96).

It is then a simple matter to use your information and the formulas to create an amazing, texterless wall!  Textures are MUCH harder, and will be the subject of another lesson if you are still confused.

Hope that helped!  I made a raycasting game in java a while back, so I know a thing or too  ;)


5584
News / Re: Contest
« on: May 03, 2009, 11:10:07 am »
Uhhh, isn't it already in the same category? ;)

5585
Introduce Yourself! / Re: Hello.
« on: April 30, 2009, 03:51:19 pm »
Welcome welcome Welcome!
I'm kinda new here too, but I can still say WELCOME!

5586
TI-Boy SE - Game Boy Emulator For TI-83+SE/84 / Re: Poll: Saved Games
« on: April 30, 2009, 10:20:54 am »
Wow, that's a lot of data.  What kind of data is being saved?  I know Trapped created a 4KB appvar, as it saved the entire map.  Is this kind of what your doing?

5587
TI-Boy SE - Game Boy Emulator For TI-83+SE/84 / Re: Game Boy Emulator
« on: April 29, 2009, 07:29:26 pm »
I love that site :)

5588
TI-Boy SE - Game Boy Emulator For TI-83+SE/84 / Re: Game Boy Emulator
« on: April 28, 2009, 10:50:33 pm »
BBCBasic rocks my socks

5589
News / Re: Contest
« on: April 28, 2009, 09:41:44 pm »
Well... I suppose, but it seems a bit excessive for a replacement of a simple recall  :-\

5590
News / Re: Contest
« on: April 28, 2009, 09:33:20 pm »
You can kind of copy/paste in Basic

First you create the program COPY
Then you recall the program that has the code in it into COPY
You remove all the excess code from COPY
recall copy to wherever you want

(Yes you can recall programs, its quite useful)

5591
TI Z80 / Re: Trapped
« on: April 28, 2009, 06:04:06 pm »
Thanks!  I liked the xLib version too, I just felt it needed to be revamped with more puzzles and faster speed.

5592
News / Re: Contest
« on: April 27, 2009, 10:05:06 pm »
Ah yes that true.

Its probably for the best too, I need some more time to learn BBC Basic better.

5593
News / Re: Contest
« on: April 27, 2009, 09:54:00 pm »
:( You could put all those under a separate category, so each would be competing against programs of the same type

5594
News / Re: Contest
« on: April 27, 2009, 07:53:24 pm »
What would BBC Basic be categorized under? (If allowed at all)

5595
TI Z80 / Re: Portal 2
« on: April 27, 2009, 07:48:47 pm »
"comes back"
Hmmm, it works alright now, and I don't think I did anything differently. :(
Oh well, if it works, I'm happy.

Pages: 1 ... 371 372 [373] 374 375