Author Topic: Nspire Raycaster  (Read 94929 times)

0 Members and 1 Guest are viewing this topic.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Nspire Raycaster
« Reply #330 on: May 11, 2010, 12:22:52 pm »
Sprites facing different directions (angle-wise) would be cool, or 3D sprites in the style of the Nintendo 64
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: Nspire Raycaster
« Reply #331 on: May 11, 2010, 03:47:42 pm »
Multidirectional sprites are quite possible, and I intend to add them in the future. However, they are precomputed, so you can't have a box made of sprites.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Nspire Raycaster
« Reply #332 on: May 11, 2010, 04:14:37 pm »
Will it be possible to have sprites stacked like this, though?

If you notice in 3D games, in most cases, the trees aren't really fully 3D models, the leaves are stacked 2D sprites set at different angles, to make the tree leaves look like 3D.
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Nspire Raycaster
« Reply #333 on: May 11, 2010, 06:21:03 pm »
that's exactly what I was talking about, DJ!

Good to know! by precomputed, do you mean they're immobile? Won't that cause problems with movements of enemies?

Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: Nspire Raycaster
« Reply #334 on: May 11, 2010, 06:35:14 pm »
@DJ: Yes. In fact, that (and multidirectional sprites) are already possible; the client just needs to update the sprites being drawn based on the camera direction.
@willrandship: No, not immobile. What I mean is that the images being drawn views of a 3D object from different angles. When you "turn" the sprite, you look up what image will be drawn based on the angle.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Nspire Raycaster
« Reply #335 on: May 11, 2010, 07:06:38 pm »
Aah sounds cool, and how many sprites does the engine support in one map?
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: Nspire Raycaster
« Reply #336 on: May 11, 2010, 09:38:13 pm »
As many as you want, limited by only memory and speed considerations.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Nspire Raycaster
« Reply #337 on: May 11, 2010, 09:39:54 pm »
AAh ok. Thanks ^^
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline AaroneusTheGreat

  • Moderator
  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 287
  • Rating: +26/-1
    • View Profile
Re: Nspire Raycaster
« Reply #338 on: May 11, 2010, 11:56:58 pm »
I've always wondered if there was a way you could have a sub class of sprites in a ray caster that didn't stay perpendicular to the camera, who's orientation would be set, and therefore would be stretched according to perspective like a wall. This would come in handy because it would be flat and have transparency, allowing for objects like a chain link fence or iron bars blocking a path. Would this be easy to do? I only know the very basics of ray casting, and only in the context of a fixed angle ray caster.

Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: Nspire Raycaster
« Reply #339 on: May 12, 2010, 01:57:18 am »
The algorithm I'm using can support transparent wall textures with a little modification. I'll add that in the next release.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Nspire Raycaster
« Reply #340 on: May 12, 2010, 02:01:00 am »
:O

TRANSPARENCY?? Wow that made my day...well... night (it's 2 AM :P)
« Last Edit: May 12, 2010, 02:01:12 am by DJ Omnimaga »
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: Nspire Raycaster
« Reply #341 on: May 12, 2010, 08:12:38 am »
Transparent walls?!

Oh my GOD!
This is ridiculous!
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Nspire Raycaster
« Reply #342 on: May 12, 2010, 04:26:46 pm »
Transparent anything, or just walls? Having transparency is nice at any rate.
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does 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 #343 on: May 12, 2010, 04:29:26 pm »
Transparency!  Woah, this is incredible!  I'm at a loss for words.
Wow. ;D

Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: Nspire Raycaster
« Reply #344 on: May 12, 2010, 07:13:16 pm »
Transparent as in "holes in walls", not glass (glass would require drawing all the walls from farthest to closest).
EDIT: Blarg. The fact that my blocks each have four faces makes the fences look rather strange. It also makes the engine very slow, so never mind it :(
« Last Edit: May 12, 2010, 07:35:34 pm by bwang »