Log In  


Cart #kroom8-2 | 2025-09-08 | Code ▽ | Embed ▽ | No License
8


My first attempt at a ray casting engine. As usual, I wanted to come up with all concepts and techniques completely on my own and stubbornly refused to learn anything about "real" ray casting engines and techniques, so I'm sure that the way this whole thing works is sub-optimal at best, if not just plain wrong. I didn't bother organizing the code and my art and music abilities are borderline non-existent, so expect the bare minimum here.

The game is heavily "inspired" by Among Us. Fans will find the map VERY familiar.

CONTROLS:
Mouse/Left/Right Arrows - Rotate left/right
Up/Down Arrows - Walk forward/backward
O button - Run forward
X button - Perform action
Player 2 X button - View map (Not everyone has this button)

Rules, features, and additional information:


HOW TO PLAY:
There is 1 Intruder and 10 Voyagers.

The Voyagers were all recently blinded due to looking directly at a solar flare so all they can do is stumble round. They do not do tasks, do not report bodies, and do not vote.

The Intruder has a kill cooldown of 30 seconds after which, he will kill any single Voyager he passes by, as long as he is far enough away from the player (if you are just the right distance away, you can catch him in the act but it's rare). After each kill, the cooldown restarts. The Intruder cannot kill the player. Because, the Intruder can still see, it may walk by a dead body but will never stand and wait by one (this is a key method of narrowing down suspects).

If you are close enough to a body, you can report it. This will show you who is alive and give you an opportunity to jettison one NPC. After voting (or skipping) all deceased Voyagers are removed, the Intruder's cooldown is reset to 30, and the next round begins.

There are no tasks for either the player or NPCs. Only the player can use vents, the table in the Command room (this will show where all players/bodies are on the map), and the camera in the Surveillance room (which allows you to switch between two hallway cameras).

You win if you jettison the Intruder within the time limit. You lose if you and the Intruder are the only ones left at any point, you do not jettison the Intruder before time runs out, or you jettison a total of 4 Voyagers.

FEATURES:

  • Usable Command table
  • Usable security cameras
  • Usable vents
  • Proximity-based NPC's footsteps volume
  • Sus but hopefully amusing player names
  • Stars go weeeeeeee

KNOWN BUGS:

  • The position of objects (NPCs, tables, etc.) is not calculated correctly causing them to shift unnaturally when viewing them from certain angles. This is most notable with the table in the Command room
  • NPCs will occasionally clip through walls (this is purely a visual bug; they cannot actually walk through walls to get to rooms they're not supposed to)
  • There is at least one wall that will disappear if viewed from just the right angle
  • There is one wall that you can walk through if facing just the right angle
  • A couple slowdowns in certain areas under certain conditions

FINAL THOUGHTS:
I never bothered to organize or document the code so I'll probably forget how everything works in a month or so. I had other things I wanted to implement like tasks (even something as simple as running to certain rooms and pressing X) but due to the verbose way I did certain things, the token limit quickly became a problem. So in all honesty, it's highly unlikely I'll fix any bugs or add any new features.

AI DISCLAIMER:
While I love AI as a concept and have no problem with those who use it, for me personally, using AI code in my programming projects completely defeats the purpose of the hobby. That said, due to my limited math knowledge, I ended up using three math-related AI-generated methods: one for finding the intersection point of two lines, one for calculating the nearest point on a line segment, and one for returning the intersection of two line segments. I view these three methods as a stain on the entire project and my reliance on them nearly made me abandon the project entirely. I have no intention of returning to this project in the future but, if I do, it will most certainly be solely to rewrite these three methods.

8



[Please log in to post a comment]