Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: I accidentally crated a infinite level for a wolf 3D clone (victorribeiro.com)
66 points by atum47 9 months ago | hide | past | favorite | 24 comments



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.



This is fantastic, love OP's misdirection.


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.


Amazing game.

That rocket launcher, that grenade launcher. The suicide Bobs.


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.


Can you explain in more detail how forgetting to change (8,8) to (14,16) resulted in an infinite level?


I cannot. I need it to debug it further to fully understand whats going on


Fair enough.


With a different wall texture (and I guess hexagonal rooms) you could make https://en.wikipedia.org/wiki/The_Library_of_Babel


Apparently this post was brought back and I'm just now seeing the traffic.


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


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.


I think it's infinite, just not in all directions. It keeps repeating in one direction though.


"I kept crawling along a wall with no end in sight" sounds pretty infinite to me?


Only if there's no repetition . . .


sounds like a circle to me


Just displaying a static image on the iPhone?


That "static image" is actually the game screen. If you had arrow keys on your iPhone, you could make it dynamic.


I just added some controls and better render for mobile devices. let me know if this works for you now


Yup, it works now!


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.



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.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: