5 ms·
Show HN: I accidentally crated a infinite level for a wolf 3D clone
- atum47 2y agoThe 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 https://victorribeiro.com/raycast2/js/map.js You need a keyboard to walk around the game. Arrow keys walk around, space bar opens doors.
- tetris11 2y agoIt 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 2y agoDid 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 2y agoI think it's infinite, just not in all directions. It keeps repeating in one direction though.
- williamdclt 2y ago"I kept crawling along a wall with no end in sight" sounds pretty infinite to me?
- xyzzy_plugh 2y agoReminds 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/ https://store.steampowered.com/app/2398450/Classic_Marathon/ Highly recommend checking it out.
- lostlogin 2y agoAmazing game. That rocket launcher, that grenade launcher. The suicide Bobs.
- Hikikomori 2y agoThere's also a doom map. https://www.doomworld.com/forum/topic/134292-myhousewad/ https://www.doomworld.com/forum/topic/134292-myhousewad/
- luluthefirst 2y agoThis is fantastic, love OP's misdirection.
- smitelli 2y agoDuke 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 2y agoJust displaying a static image on the iPhone?
- dnpls 2y agoSame post from 35 days ago https://news.ycombinator.com/item?id=40652993 https://news.ycombinator.com/item?id=40652993
- atum47 2y agono 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 2y agoWith a different wall texture (and I guess hexagonal rooms) you could make https://en.wikipedia.org/wiki/The_Library_of_Babel https://en.wikipedia.org/wiki/The_Library_of_Babel
- atum47 2y agoApparently this post was brought back and I'm just now seeing the traffic.
- notarget137 2y agoI 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.