Log In  


Cart #kroom8-7 | 2025-09-12 | Code ▽ | Embed ▽ | No License
15


A game 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)

FEATURES:

  • Usable Command table
  • Usable security cameras
  • Usable vents
  • Proximity-based NPC footsteps volume
  • Very sus but hopefully amusing player names
  • Stars go wooooooooo

UPDATES:
[09-12-25]

  • Fixed jittery textures (thanks @freds72 for pointing them out)
  • Fixed some other miscellaneous graphical bugs

[09-10-25]

  • Added mouse lock (I've heard it doesn't work on every platform so YMMV)
  • Used PICO-8's new outline feature for more legible text
  • Aligned the text for actions to make it look a little less out of place
  • Fixed a bug that prevented the top line of the ceiling from rendering
  • Fixed a bug where winning one game would cause you to win all future games

Rules 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 20 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 20, 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.

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:
This is 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 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 unlikely I'll add any new features or anything.

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.

15


yeah! a non-straight walls renderer!

tip - if you want to fix jaggies on wall textures, replace that code:
tline(info.x, info.y+1, info.x, info.y + info.h-1, info.slice_x, info.tex[2] + ((1-info.y%1)*dv), 0, dv)
by:

-- store texture delta
local dv=info.tex[4]/(info.h-1)
-- "jumpstart" texture lookup with error from flooring y coordinate by tline
tline(info.x, info.y+1, info.x, info.y + info.h-1, info.slice_x, info.tex[2] + ((1-info.y%1)*dv), 0, dv)

Thanks for trying it! :)

As silly as it sounds, I think I'd gotten so used to the way it looked that I didn't even notice the jagged textures anymore, so thanks for pointing them out.

Before I look at your suggestion though, I'd like to try my hand at fixing it on my own. Which isn't to say I don't appreciate the help; I do! I just really want to maintain a deep and intuitive understanding of how everything here works.


understood - note this is hard to find online material, strongly rooted into software rasterization.

see: https://www.scratchapixel.com/lessons/3d-basic-rendering/rasterization-practical-implementation/rasterization-practical-implementation.html to understand some of the rationale.


Well, after some testing, it turns out that most if not all jitters can be fixed by just making sure all the wall heights are even numbers. So I just tacked on \ 2 * 2 to the end of my wall height calculation and it seems to have fixed it! I'm sure it's not as comprehensive as your solution but I'm happy with it.

And thanks for the reference. Like I mentioned in my original post, the goal here was to see if I could build a ray casting engine and come up with all the techniques completely from scratch with absolutely zero knowledge of how they work or how it's been done before so it defeats the purpose if I read anything about them. That said, I'll definitely bookmark that link in case I ever want to learn how "real" ray casting works and make an engine the "right" way!


I am in your walls.



[Please log in to post a comment]