Author Topic: Nspire Raycaster  (Read 104925 times)

0 Members and 4 Guests are viewing this topic.

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 #135 on: April 04, 2010, 01:12:33 am »
o.O

lol, I guess that's explain it then x.x, I didn't knew you had this being implemented XD

It makes me more curious about what this engine will be able to do in the end, actually.

Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: Nspire Raycaster
« Reply #136 on: April 04, 2010, 01:51:02 am »
Right now I'm not running into any serious hurdles, just a small bug here and there.
I intend to clean up a couple of things and then start on a demo with some gameplay (nothing fancy, just a gun and some enemies to shoot).

Offline Netham45

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2103
  • Rating: +213/-4
  • *explodes*
    • View Profile
Re: Nspire Raycaster
« Reply #137 on: April 04, 2010, 01:54:50 am »
Is this going to be multiple levels? Also, can we have a good texture for the sky area? Something about just a black ceiling and floor makes it feel really cramped.
Omnimaga Admin

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 #138 on: April 04, 2010, 02:11:51 am »
Right now I'm not running into any serious hurdles, just a small bug here and there.
I intend to clean up a couple of things and then start on a demo with some gameplay (nothing fancy, just a gun and some enemies to shoot).
YES! I can't wait :D

Also I like Netham45 suggestion. The sky should just be 2D imho. In all 3D games you see today, a lot of the backgrounds are kinda 2D too anyway. Basically make it scroll when camera is changing but not when straffing/moving forward/backwards.

Variable wall height would be cool but idk how hard it would be to implement, especially if the floor is texture-less.

Offline Netham45

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2103
  • Rating: +213/-4
  • *explodes*
    • View Profile
Re: Nspire Raycaster
« Reply #139 on: April 04, 2010, 02:12:59 am »
The floor needs a texutre D:
Omnimaga Admin

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 #140 on: April 04, 2010, 02:21:26 am »
Well, as discussed in previous posts, appearently adding floor textures seems extremly slow.

Offline Netham45

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2103
  • Rating: +213/-4
  • *explodes*
    • View Profile
Re: Nspire Raycaster
« Reply #141 on: April 04, 2010, 02:24:49 am »
Ah. I only briefly skimmed over the thread, so I missed that.

But, if it's just going to be a generic engine, then how about it's available to the user of the engine?
Omnimaga Admin

Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: Nspire Raycaster
« Reply #142 on: April 04, 2010, 02:39:35 am »
I could make it available, but it wouldn't be much use at all.
Having "fake" floor/sky textures seems like a much better idea. I don't know how good sky textures would look in grayscale, though.
I really want variable wall height, too, but I haven't looked into it yet. Variable wall height really expands possibilities (it changes the levels from Wolfenstein-ish to Doom-ish and allows for stairs, pits, etc).
In case anyone is interested, I've attached a demo with floor textures, so you may see how slow it is.
« Last Edit: April 04, 2010, 02:43:27 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 #143 on: April 04, 2010, 02:54:38 am »
Couldn't a lower resolution speed things up? I don't think people will mind too much to play a game where the 3D is 160x120 scaled up 2x after being used so much to a 96x64 or 160x160 res. The Nspire LCD pixels are so small anyway. Else, if that won't make any speed difference, I guess fake floors might be the best solution. On the FAT engine, sand floors are pretty much just noise and seems pretty random. Else, having the floor not textured but allowing different shades of gray to be chosen based on the map you are on and using fake sky textures could do, too.

It's too bad that it runs slow, because it looks so nice. Else, for a RPG-type game, I think the speed is tolerable, though (people didn't mind Star Fox 10-12 FPSes on the SNES that much anywayanyway). Just probably not for a first person shooter that requires precision when shooting.
« Last Edit: April 04, 2010, 02:58:09 am by DJ Omnimaga »

Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: Nspire Raycaster
« Reply #144 on: April 04, 2010, 03:32:20 am »
Yes, the floor texturing actually runs at an acceptable speed at 160x120. I guess I could make screen resolution a user-selectable feature.
« Last Edit: April 04, 2010, 03:32:39 am by bwang »

Offline critor

  • Editor
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2079
  • Rating: +439/-13
    • View Profile
    • TI-Planet
Re: Nspire Raycaster
« Reply #145 on: April 04, 2010, 03:35:49 am »
Having variable height walls would be great.

Years ago, I developped on online raycasting engine in Java.


From my own experience, variable height walls don't slow the engine very much.
Each squared-based-wall had a height and an altitude.
Thanks to the height value, you could climb stairs, walk on walls.
Thanks to the altitude value, you could enter rooms or corridors.

I just used some grey-shaded color for floors and ceilings.


This really transforms the virtual world!
I hope you'll do it.


I do confirm that adding a floor texture (which means floor-casting) was much more time demanding.
TI-Planet co-admin.

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 #146 on: April 04, 2010, 03:43:52 am »
Yes, the floor texturing actually runs at an acceptable speed at 160x120. I guess I could make screen resolution a user-selectable feature.
great to hear :)

Btw i still think we get too close from walls, maybe make it so we can only move close to a wall as long as we still see 3.5 to 4 rows of bricks? That migth speed things a lil bit more when accidentally getting too close from them. Also, would it be easy to have the floor 160x120 but the rest 320x240? Again, idk how good it will look like.

What I think is that you should maybe make a version with an option menu where we can change resolution for walls/floor/2D ceiling texture, enable/disable each, change the floor color (or ceiling if thee are no texture), etc

@Critor: nice, is that java engine still avaliable online? I am curious how it looks like
« Last Edit: April 04, 2010, 03:44:56 am by DJ Omnimaga »

Offline critor

  • Editor
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2079
  • Rating: +439/-13
    • View Profile
    • TI-Planet
Re: Nspire Raycaster
« Reply #147 on: April 04, 2010, 04:08:22 am »
Looking up/down doesn't work well with the floor.
It produces strange things with sprites too. (doesn't seem natural)

Anyway that's not very important, because when adding variable-height walls, you'll have to rework that code. It may then be easier too...

A little (but more important) bug:
When starting the engine, if you only move forward, you can see that a column of pixels in the middle of the screen remains undrawn.


I'm not criticizing: your work is great.

If you need any help, here is a great tutorial about raycasting.
It's the one I used, years ago.
http://www.permadi.com/tutorial/raycast/index.html



######################

@Omnimaga
Here is my engine -> http://xandrean.free.fr/3dapp/test.html

It has a configuration-screen, like you asked for.
Have fun.
« Last Edit: April 04, 2010, 02:05:22 pm by critor »
TI-Planet co-admin.

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 #148 on: April 04, 2010, 02:02:35 pm »
Yeah I noticed the floor bug too, I guess he might not have implemented looking up/down for it yet. Btw in the controls It would be nice if we could change the movement speed.

@Critor engine: cool,, I tried it and it was quite fun to mess around with.

(I also merged your double-post)
« Last Edit: April 04, 2010, 02:03:13 pm by DJ Omnimaga »

Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: Nspire Raycaster
« Reply #149 on: April 04, 2010, 04:00:45 pm »
Yeah, I put in the floor code before I added looking up/down, then commented it out, hence the strangeness. I believe the sprites do move up and down when you look up and down, though (and I think its fairly bug-free).