[HN Gopher] Show HN: I accidentally crated a infinite level for ...
       ___________________________________________________________________
        
       Show HN: I accidentally crated a infinite level for a wolf 3D clone
        
       Author : atum47
       Score  : 55 points
       Date   : 2024-07-13 00:27 UTC (4 days ago)
        
 (HTM) web link (victorribeiro.com)
 (TXT) w3m dump (victorribeiro.com)
        
       | atum47 wrote:
       | The other day I was working on my wolf 3d game clone when I
       | noticed this cool bug. My maps for the game are defined as an
       | object with width, height and an array of arrays for the data.
       | When working on a map that was supposed to be 14 in width and 16
       | in height, I forget to update the values (8 x 8) and end up
       | creating a infinite level.
       | 
       | you can look at the error here:
       | https://victorribeiro.com/raycast2/js/map.js
       | 
       | You need a keyboard to walk around the game. Arrow keys walk
       | around, space bar opens doors.
        
         | digging wrote:
         | Can you explain in more detail how forgetting to change (8,8)
         | to (14,16) resulted in an infinite level?
        
           | atum47 wrote:
           | I cannot. I need it to debug it further to fully understand
           | whats going on
        
             | digging wrote:
             | Fair enough.
        
       | tetris11 wrote:
       | It doesn't seem infinite.... after 3 minutes I was just crawling
       | along a wall, waiting for a left turn that would expand outwards.
       | Never came
        
         | atum47 wrote:
         | Did you walk for 3 minutes? I need to try that. I was walking
         | for a long time and noticed that the maze repeated for as long
         | as I was walking; but I did not time it.
        
         | manuelmoreale wrote:
         | I think it's infinite, just not in all directions. It keeps
         | repeating in one direction though.
        
         | williamdclt wrote:
         | "I kept crawling along a wall with no end in sight" sounds
         | pretty infinite to me?
        
           | joelfried wrote:
           | Only if there's no repetition . . .
        
           | tetris11 wrote:
           | sounds like a circle to me
        
       | xyzzy_plugh wrote:
       | Reminds me of Marathon's non-euclidean maps. The engine traversed
       | adjacent portals to determine what polygon-based cells to
       | draw/interact with. Very mind bending in its day. Some of the
       | multiplayer maps make strong, obvious use of this, if memory
       | serves.
       | 
       | In fact, apparently the entire series is open source and free to
       | play:
       | https://store.steampowered.com/app/2398450/Classic_Marathon/
       | 
       | Highly recommend checking it out.
        
         | lostlogin wrote:
         | Amazing game.
         | 
         | That rocket launcher, that grenade launcher. The suicide Bobs.
        
         | Hikikomori wrote:
         | There's also a doom map.
         | 
         | https://www.doomworld.com/forum/topic/134292-myhousewad/
        
           | luluthefirst wrote:
           | This is fantastic, love OP's misdirection.
        
         | smitelli wrote:
         | Duke Nukem 3D had a stock level (E2L11, "Lunatic Fringe") that
         | did something similar. The main structure of the map was a
         | 720-degree loop. I remember it took me a good long while to
         | figure out what was going on the first time I played it.
        
       | can16358p wrote:
       | Just displaying a static image on the iPhone?
        
         | rob74 wrote:
         | That "static image" is actually the game screen. If you had
         | arrow keys on your iPhone, you could make it dynamic.
        
         | atum47 wrote:
         | I just added some controls and better render for mobile
         | devices. let me know if this works for you now
        
       | dnpls wrote:
       | Same post from 35 days ago
       | https://news.ycombinator.com/item?id=40652993
        
         | atum47 wrote:
         | no body noticed it the first time, so I posted it a second
         | time. No body noticed that as well. Today I woke up and saw the
         | it has been picked up.
        
       | netsharc wrote:
       | With a different wall texture (and I guess hexagonal rooms) you
       | could make https://en.wikipedia.org/wiki/The_Library_of_Babel
        
       | atum47 wrote:
       | Apparently this post was brought back and I'm just now seeing the
       | traffic.
        
       | notarget137 wrote:
       | I think it has wrong perspective culling. Seems like the rays are
       | not properly clipped in the view plane so it appears like the
       | view has a "fish eye" effect.
        
       ___________________________________________________________________
       (page generated 2024-07-17 23:16 UTC)