Author Topic: Nspire Raycaster  (Read 106641 times)

0 Members and 1 Guest are viewing this topic.

Offline tr1p1ea

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 647
  • Rating: +110/-0
    • View Profile
Re: Nspire Raycaster
« Reply #30 on: March 24, 2010, 11:20:37 pm »
Well you could pack multiple columns into 1 write?
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."


Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: Nspire Raycaster
« Reply #31 on: March 24, 2010, 11:38:12 pm »
Would the array work if I made it 8 times smaller? Do you guys think its crashing because of lack of memory?

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Nspire Raycaster
« Reply #32 on: March 25, 2010, 08:05:21 am »
Would the array work if I made it 8 times smaller? Do you guys think its crashing because of lack of memory?
I am not sure exactly what method you are using. But trying to copy an extra-large array to the LCD ram would probably overflow to other sensitive memory.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Nspire Raycaster
« Reply #33 on: March 25, 2010, 09:35:01 am »
My guess is that each memory sector is 65536 bytes, right?

(such array would most likely be 76800 bytes large, unless I am wrong, right?)

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Nspire Raycaster
« Reply #34 on: March 25, 2010, 01:23:29 pm »
My guess is that each memory sector is 65536 bytes, right?

(such array would most likely be 76800 bytes large, unless I am wrong, right?)
I have no idea how the flash memory on the Nspire works, actually. Though, we are talking about RAM here, which isn't really in "sectors". And the array would actually be 38400 bytes, since there are 2 pixels per byte.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: Nspire Raycaster
« Reply #35 on: March 25, 2010, 03:13:05 pm »
I'm not even trying to copy the array right now. Just trying to put values in the array crashes the calculator.

Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: Nspire Raycaster
« Reply #36 on: March 26, 2010, 02:40:48 am »
Yay! I implemented double buffering, and its much less flickery now. For some strange reason , though, it flickers and becomes choppy when you get near a wall.

Screenshot:


It runs a lot smoother on-calc than the screenshot makes it seem (why won't CalcCapture give me a higher framerate?)
I've attached a demo.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Nspire Raycaster
« Reply #37 on: March 26, 2010, 02:43:48 am »
WOW! So much greatness!!!

Darn keep up the good work on this! Btw did you try with higher resolution textures too? I wonder if it slows it down a lot?

Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: Nspire Raycaster
« Reply #38 on: March 26, 2010, 03:02:09 am »
I think texture resolution shouldn't affect speed, since the loop that does the texture mapping depends only on the height of the column I'm drawing.
Speaking of texture mapping and speed, I think I figured out the cause of the slowdown when you get near a wall: the columns become longer, so the engine needs to do more texture calculations. I guess my texture mapper really needs optimization :(
« Last Edit: March 26, 2010, 03:02:25 am by bwang »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Nspire Raycaster
« Reply #39 on: March 26, 2010, 03:40:43 am »
Ouch I wish you luck x.x. Glad texture res shouldn't affect speed, though
* DJ Omnimaga suggests Bwang the following TI-Nspire project:



just kidding :P

Offline mapar007

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 550
  • Rating: +28/-5
  • The Great Mata Mata
    • View Profile
Re: Nspire Raycaster
« Reply #40 on: March 26, 2010, 03:41:29 am »
* mapar007 bows to the awesomeness of bwang's TI-Nspire hacker skills

This could be passed of as a flash game or something...

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Nspire Raycaster
« Reply #41 on: March 26, 2010, 07:45:09 am »
Bwang, that's really awesome!  Keep up the great work! ;D

Offline bfr

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 819
  • Rating: +4/-0
    • View Profile
    • bfr's website
Re: Nspire Raycaster
« Reply #42 on: March 26, 2010, 12:35:51 pm »
That looks really good.  TI calculator programming has entered a new era 8)

Offline Galandros

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1140
  • Rating: +42/-10
    • View Profile
Re: Nspire Raycaster
« Reply #43 on: March 26, 2010, 12:42:57 pm »
Awesome screenie. Textures are next, I guess.

A fog effect would be really nice to see too. :P
Hobbing in calculator projects.

Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: Nspire Raycaster
« Reply #44 on: March 26, 2010, 01:14:27 pm »
I already have texture mapping--those checkered squares are an 8x8 texture map.