|
Post by dr_st on Sept 6, 2021 4:18:20 GMT -5
Most mirrors in games, including Build engine games, are just a mirrored room with a character that follows the movements of your character. I think it's slightly different than that. For one, the mirrors actually render everything they reflect - not just Duke, but other actors as well. They also have the ability to reflect more than one sector. I think this one here is probably the most accurate explanation (except the 'raycasting' misnomer, which should be called 'raytracing' perhaps): https://www.reddit.com/r/gamedev/comments/9111km/so_how_is_the_mirror_in_duke_nukem_3d_programmed/e2uqjlj/ The Youtube video linked in that page is from the original release 1.3D. You can see Duke no-clip into the mirrored sector and finding himself in a world that looks exactly like the real world, except the actors are non-functional. This behavior has been changed in version 1.4/1.5 - in those versions once Duke no-clips into the mirror, nothing will be rendered (HOM effect), as mentioned here: kb.speeddemosarchive.com/Duke_Nukem_3D/Game_Mechanics_and_Glitches#Mirror_Sectors_.26_Clipping
|
|
|
Post by dsparil on Sept 6, 2021 9:19:03 GMT -5
That description is basically wrong though. Looking at the open sourced code which is the 1.5 version, the mirrored room is drawn directly which is probably why it gets all screwy when clipped through rather than an actual area you can traverse. Build uses portal based rendering not ray casting so there's probably still an engine generated room on the other side of the mirror in 1.5, the rooms on the two sides of the portal don't actually need to be "physically" adjacent, while in 1.3 the engine required an empty placeholder. This is an educated guess, but I'm assuming the 1.4+ method is less resource intensive since it doesn't require storing copies extra copies of level sections in memory for each mirror. I tested out the shareware 1.3 version, and the state of enemies in the playable mirror area is tied to their state in the normal area. In the video, they're only still because they're not active otherwise. If you clip through the mirror with the bathroom enemy moving around, it will on the other side of the mirror.
As a side note, engine like Build and Doom get called ray casting, but they aren't. Ray casting is just the first step in a full ray tracing process: shooting out a ray from a certain position and angle and seeing what it hits. Wolfenstein 3D does use ray casting but with limitations for speed like only right angled walls and no height variation and also mixes in a decent amount of assembly code. Doom famously uses binary space partitioning which uses a searchable tree to determine what to render, but there's limitations in the implementation that disallow things like destructible walls since the geometry can't change while the level is running as the trees are pre-generated. The way Build works is more complicated, but it basically figures out what's closest to the player and fans outward including drawing what should be on the other side of any portals encountered.
|
|
|
Post by dieubussy on Sept 6, 2021 11:13:39 GMT -5
I found a few more: Luigi's Mansion Mother 3 Rayman 3 (couldn't find a good image of this unfortunately) STAY Uncharted 4 ~ Thanks a lot, very interesting additions for sure!
|
|
|
Post by dr_st on Sept 6, 2021 11:34:56 GMT -5
I tested out the shareware 1.3 version, and the state of enemies in the playable mirror area is tied to their state in the normal area. In the video, they're only still because they're not active otherwise. If you clip through the mirror with the bathroom enemy moving around, it will on the other side of the mirror. I assumed it would be thus. The way I understood - when Duke is "in the mirror world", the game draws the sectors that are mirrored, including all actors in whatever they state they happen to be (with adjustments for pixel flipping), but Duke interacts with the actual empty sector placeholder (which is why enemies don't see him, and he cannot attack them). That description is basically wrong though. Looking at the open sourced code which is the 1.5 version, the mirrored room is drawn directly which is probably why it gets all screwy when clipped through rather than an actual area you can traverse. Build uses portal based rendering not ray casting so there's probably still an engine generated room on the other side of the mirror in 1.5, the rooms on the two sides of the portal don't actually need to be "physically" adjacent, while in 1.3 the engine required an empty placeholder. This is an educated guess, but I'm assuming the 1.4+ method is less resource intensive since it doesn't require storing copies extra copies of level sections in memory for each mirror. So in 1.4+ they did not only changed the rendering, but also how mirrors actually implemented? That's a pretty significant change (which probably was not officially documented). Rayman 3 (couldn't find a good image of this unfortunately) I am embarrassed that I forgot about this mirror completely, even though I've played Rayman 3 extensively at some point. Now that I think of it, Rayman 3 also has reflective floors, not just walls. E.g., It is even used in one place to denote a secret room (where the entrance is only visible in the reflection:
|
|
|
Post by dsparil on Sept 6, 2021 14:19:30 GMT -5
That description is basically wrong though. Looking at the open sourced code which is the 1.5 version, the mirrored room is drawn directly which is probably why it gets all screwy when clipped through rather than an actual area you can traverse. Build uses portal based rendering not ray casting so there's probably still an engine generated room on the other side of the mirror in 1.5, the rooms on the two sides of the portal don't actually need to be "physically" adjacent, while in 1.3 the engine required an empty placeholder. This is an educated guess, but I'm assuming the 1.4+ method is less resource intensive since it doesn't require storing copies extra copies of level sections in memory for each mirror. So in 1.4+ they did not only changed the rendering, but also how mirrors actually implemented? That's a pretty significant change (which probably was not officially documented). The 1.5 code does seem pretty clear that the reflection is being generated on the fly instead of populating the empty room at level load as the early versions seem to be doing. Editor guides do mention still requiring the empty room even in the newer versions so there shouldn't be any incompatibilities. Again total speculation, but they probably left in the requirement for a room specifically to keep compatibility. I mean, if the game would just be creating a virtual room anyway, might as well make the user do it so every version is supported.
|
|
|
Post by dieubussy on Sept 7, 2021 12:36:51 GMT -5
This is where it's at, now 48 titles (I did pass some suggestions for motives or preference alone). Snatcher, Prince of Persia, Les Voyageurs du Temps, Dune, Alice Interactive Museum, Cosmology of Kyoto, Clock Tower, The Dark Eye, D, Duke Nukem 3D, Super Mario 64, Nights Into Dreams, Realms of the Haunting, Sanitarium, Shenmue, Luigi's Mansion, Silent Hill 2, Metal Gear Solid 2, Devil May Cry, Metroid Prime, Silent Hill 3, Max Payne, Forbidden Siren (Website Flash Game), Breakdown, Doom 3, Killer 7, Call of Cthulhu Dark Corners of the Earth, Rule of Rose, Mother 3, Prey, The Darkness, Mirror's Edge, Red Seeds Profile, Heavy Rain, Uncharted 4, Inside, Mirror's Edge Catalyst, Virginia, The Observer, Black Mirror, Celeste, Detroit, Draugen, Control, Mosaic, The Last of us 2, Mundaun, The Medium
|
|
|
Post by dr_st on Sept 7, 2021 13:08:24 GMT -5
This is where it's at, now 48 titles (I did pass some suggestions for motives or preference alone). You can also add Blood, Shadow Warrior and Ion Fury (all Build engine games like Duke Nukem 3D) and all have mirrors implemented in the same way. Shadow Warrior: Others:
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Sept 7, 2021 13:22:43 GMT -5
Shadow Warrior: Just what state of attire is this for using the bathroom facilities? Is he meant to be at a sci fi convention?
|
|
|
Post by magic89 on Sept 18, 2021 18:42:44 GMT -5
Im sure there was mirror in quake 3 on pratice map before you enter tournament.
|
|