It is currently Sun Nov 19, 2017 11:09 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 48 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
PostPosted: Wed Dec 31, 2014 12:10 pm 
Offline
User avatar

Joined: Sun Jun 05, 2005 2:04 pm
Posts: 2136
Location: Minneapolis, Minnesota, United States
Bregalad wrote:
Now please don't hate me for this I was just trying to be realistic. For a tech demo this is awesome, in a game it'd be really terrible.


I definitely understand. Come to think of it, I had a hard enough time playing Doom 1, and that was on PC, and went way beyond normal raycasting. Perhaps it'd be entertaining for like 1 level, but sitting down to a full blown game could be exhausting. Probably the only people that would want to play it are really hard core, old school FPS players. And masochistic gamers who like to be tortured by insanely hard games.

Quote:
...or that 3D train minigame in Final Fantasy 6 when exiting the magitek factory, that also looked absolutely terrible


OK now, both of our demos look way better than that piece of shit! =) The game had no excuse displaying something that awful; they could have done much better.


Top
 Profile  
 
PostPosted: Fri Jan 02, 2015 12:54 pm 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7266
Location: Chexbres, VD, Switzerland
tokumaru wrote:
None of us expects to make the ultimate NES game, but bringing something new to the platform is always fun, even if it's not perfect.

I absolutely agree with you. It's really great you guys can bring something new, I am not denying that. I'd just that that the idea to base an entiere game in those graphics mode would be a terrible idea.

Quote:
OK now, both of our demos look way better than that piece of shit! =) The game had no excuse displaying something that awful; they could have done much better.

Well I don't remember exactly but I remember it was looking absolutely terrible. Even back in 1994 it would not have been impressive I think.

Quote:
Probably the only people that would want to play it are really hard core, old school FPS players. And masochistic gamers who like to be tortured by insanely hard games.

I don't think the usage of such a pseudo-3D raycasting is automatically restricted to FPS. Think how it could just be that "different" level in an otherwise 2D game. Even if it was just a room to explore or something. It could suit lots of different games, RPG, platformers or even investigation games.

In Portopia (that investigation game Enix made before Dragon Quest) there is a giant 3D maze, and you have to traverse it at least once entirely to beat the game. Because you can only advance one "section" at once and do 90° turns, this part has aged extremely badly and looks terrible. However, if it was remade with a raycaster, this part of the game would be much better.


Top
 Profile  
 
PostPosted: Fri Jan 02, 2015 1:55 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19233
Location: NE Indiana, USA (NTSC)
Or do outdoor scenes in an overhead view and indoor scenes with the raycaster, like in Phantasy Star for Sega Master System or Jurassic Park for Super NES.


Top
 Profile  
 
PostPosted: Fri Jan 02, 2015 3:00 pm 
Offline
User avatar

Joined: Sun Jun 05, 2005 2:04 pm
Posts: 2136
Location: Minneapolis, Minnesota, United States
Bregalad wrote:
I don't think the usage of such a pseudo-3D raycasting is automatically restricted to FPS. Think how it could just be that "different" level in an otherwise 2D game. Even if it was just a room to explore or something. It could suit lots of different games, RPG, platformers or even investigation games.


You know, this could make a lot of sense in something like my Castlevania style game (not yet in development). While it's normally a platformer, it could be cool for the player to have to go through some catacomb style maze to get to another area. I had wanted to put some other fake 3D effects in the game, so it would lend itself well to this.


Top
 Profile  
 
PostPosted: Fri Jan 02, 2015 3:25 pm 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7266
Location: Chexbres, VD, Switzerland
I really want to play that game, even if you didn't start yet to develop it :)


Top
 Profile  
 
PostPosted: Mon Jan 05, 2015 3:18 pm 
Offline

Joined: Thu Aug 28, 2008 1:17 am
Posts: 591
I saw this in the side link bar: https://www.youtube.com/watch?v=ZQRFBmGdvUQ
Might be able to do something like that (an adventure game or 3D town for an RPG, etc).

_________________
__________________________
http://pcedev.wordpress.com


Top
 Profile  
 
PostPosted: Mon Jan 05, 2015 4:06 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10114
Location: Rio de Janeiro - Brazil
tomaitheous wrote:
I saw this in the side link bar: https://www.youtube.com/watch?v=ZQRFBmGdvUQ

This looks surprisingly good... I'd expect the cardboard cutout effect to be more distracting, but it actually feels like you're walking around in a town. What is distracting though is that it feels like you're a giant, because the textures are all centered on the horizon. I know it needs more computation, but the walls really need to be shifted up according to their distance so that the player doesn't appear to be so tall.


Top
 Profile  
 
PostPosted: Mon Jan 05, 2015 6:54 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19233
Location: NE Indiana, USA (NTSC)
What takes more CPU time: casting the ray for each pixel column or drawing the textures? Because if the ray casting itself takes a lot of time, I think I know how to speed it up with a run-length technique related to portal engines. Ray casting itself is just a special case of portal casting.


Top
 Profile  
 
PostPosted: Mon Jan 05, 2015 7:15 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10114
Location: Rio de Janeiro - Brazil
tepples wrote:
What takes more CPU time: casting the ray for each pixel column or drawing the textures?

From my own experience, scaling the textures is slightly slower, but the 2 tasks were balanced enough that casting a long ray and drawing a small wall wasn't that much different than casting a short ray and drawing a big wall, which kept the performance somewhat constant.

Quote:
Because if the ray casting itself takes a lot of time, I think I know how to speed it up with portals.

I guess it's still worth speeding up, even if it's not the slowest task. I remember reading about how Doom used BSP (binary space partitioning) for rendering its graphics but I never really understood how that worked. What's the portals approach like?


Top
 Profile  
 
PostPosted: Mon Jan 05, 2015 8:10 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19233
Location: NE Indiana, USA (NTSC)
RLE ray casting starts with a visible sector with a left and right side. You scan the visible sector in strips from nearest to farthest. When you hit a wall, you schedule the wall to be drawn, and then you divide the visible sector into the interval to the left of the tile and the interval to its right. After you've finished enumerating all walls in this strip, you scan the next farther strip. Repeat until all visible sectors have been cleared.

Attachment:
portalcasting.png
portalcasting.png [ 1.74 KiB | Viewed 2279 times ]

  • Orange: Sides of initial visible sector
  • Green: Visible wall segments
  • Blue: Floor within visible area
  • Light gray: Sides of subsectors
  • Light blue: Subsector sides extended toward camera origin
  • Black: Floor areas that are skipped

The difference here is that each cell in the map is visited once, not once for each pixel column that intersects it. And for the typical 90 degree FOV, you'll never have more intervals active at once than max(width, height) of your map.


Top
 Profile  
 
PostPosted: Mon Jan 05, 2015 9:51 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10114
Location: Rio de Janeiro - Brazil
Sounds interesting, but I didn't quite understand it yet. I'm a little confused when you talk about nearest and farthest strips... Is a "strip" in this case the same as a wall strip, which is painted with a scaled texture in the end? How do I know which one is the nearest before casting a ray? And how would I go about deciding which texture column to use for each screen column if I don't have rays hitting them at coordinates I can check?


Top
 Profile  
 
PostPosted: Tue Jan 06, 2015 3:13 pm 
Offline

Joined: Thu Aug 28, 2008 1:17 am
Posts: 591
tepples wrote:
RLE ray casting starts with a visible sector with a left and right side. You scan the visible sector in strips from nearest to farthest. When you hit a wall, you schedule the wall to be drawn, and then you divide the visible sector into the interval to the left of the tile and the interval to its right. After you've finished enumerating all walls in this strip, you scan the next farther strip. Repeat until all visible sectors have been cleared.

Attachment:
portalcasting.png

  • Orange: Sides of initial visible sector
  • Green: Visible wall segments
  • Blue: Floor within visible area
  • Light gray: Sides of subsectors
  • Light blue: Subsector sides extended toward camera origin
  • Black: Floor areas that are skipped

The difference here is that each cell in the map is visited once, not once for each pixel column that intersects it. And for the typical 90 degree FOV, you'll never have more intervals active at once than max(width, height) of your map.


I think I follow you. But I'm not sure how to implement that, exactly. So once the ray hits that tiled block (wall/edge/whatever), you calculate angle of the wall, and render out that tile for that angle, then proceed to the next tiled block/wall the ray hits? Or at least, something along those lines? I wonder if that's what gasega68k did for his Wolfenstein 3D port for the Genesis.

_________________
__________________________
http://pcedev.wordpress.com


Top
 Profile  
 
PostPosted: Tue Jan 06, 2015 4:05 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19233
Location: NE Indiana, USA (NTSC)
By "strips", I was referring to horizontal strips of potentially visible tiles in the map, colored dark blue in the illustration. "Nearest" is such a strip of tiles that is closest to the camera position (the intersection of the orange line segments). When facing north, the closest strip is the southernmost strip. The left and right side of each strip is determined by projecting the rays at the corners of already-drawn map tiles backward. When the camera is facing west or east more than north or south, use vertical strips in the map instead of horizontal strips in the map.

The procedure is sort of a hybrid between the ray casting of Wolf3D and the arbitrarily shaped sectors of Build, the Duke 3D engine.

Do I need to expand the illustration to an animated GIF of the entire rendering process, or produce a renderer myself in Python?


Top
 Profile  
 
PostPosted: Tue Jan 06, 2015 7:30 pm 
Offline

Joined: Mon Sep 27, 2004 2:57 pm
Posts: 1248
I was wondering about the effectiveness of simplifying calculations by restricting angles?

For instance, a 90-degree restriction is fairly straightforward; all walls are box-shaped and you rotate at 90-degree angles. What if we did it at 30 degrees? Everything would turn at 30 degree increments, and all walls could only be at a 30 degree angle.

Maybe this offers no improvements, but it feels like you'd be able to calculate things a little faster and have smaller tables, or higher resolution tables.

Also, an animation would be helpful, Tepples. :P


Top
 Profile  
 
PostPosted: Tue Jan 06, 2015 8:14 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10114
Location: Rio de Janeiro - Brazil
tepples wrote:
Do I need to expand the illustration to an animated GIF of the entire rendering process, or produce a renderer myself in Python?

Coding an example seems overkill if you don't plan on using it for a project of your own... but I'll definitely take you up on that GIF! =)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 48 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group