Log In  

Anx - A game about social anxiety. Make your way to the safety of your home while avoiding humans and trying not to panic. Explore 3 different somewhat large 3d areas (defined using the 2d pico8 map tool) and get chased down by chatty pathfinding mobs look at you in your eyes and make your poor digital self flip out and lose touch with reality as the pixels of the world tremble and break apart.

Controls
up/down - forward/backwards
left/right - turn
A/B - strafe left/right (if using the keyboard, use X and C. If you want to reverse these there's an option in the menu.)

Cart #58649 | 2018-11-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
16

source on github - It's compiled into anx.p8 from a few different files then the whitespace and comments are stripped out into publish.p8. Start with main.lua which will be the easiest to read and which contains all the code and references to the other files.

This is a 3D game I've been working on for awhile which is not really done in that I'd like to put much more art in it (it has room for ~3x the art that's in there so far) but it's basically feature complete and playable so I figured I'd release a first version since the previous WIP was very old. The code is a little rugged and I'm not sure I'd recommend reusing it (although you totally can if you want) but I just thought it was a fun way to explore what Pico-8 was capable of while getting my hands dirty with low level 3D code. It doesn't perform super well and there's some room for further optimization but it's fairly far in the realm of diminishing return at this point when the game already mostly works.

It renders the walls and mobs differently, but what they have in common is that it starts from the left and renders every pixel column individually. If it detects that it's running out of time, it will skip a column by rendering the next column twice as wide. Using this method, it's able to (most of the time) keep up at 30 fps even though the underlying code is not super efficient or mathematically sophisticated. It's a little bit more complicated than this because it actually renders the pixel columns of the objects one at a time and sorts them by depth and figures out how wide each wall/mob pixel is by which rays hit them, but that's the general idea.

When anxiety is accumulated, random vertical offsets are added to each pixel column to make them look sort of like rumbling books on a shelf as well as fisheye, field of view, height adjustments, and a terrible stress inducing music track. Once the panic attack hits... well, the books get torn apart ;P

Walls - Each pixel column is calculated independently and the height is drawn according to distance to the intersection of the wall, which gives the walls the nice even slopes. Because walls are always aligned to x/y axis, the calculations for this are simpler and quicker.

Mobs - Each mob has each pixel column rendered individually, but where the mob will be rendered on the screen is sort of planned/cached once per frame per mob instance on the screen lazily the first time the mob is struck by a ray. The mobs are calculated based on distance to the center of the mob which is why the mob edges are not sloped (unlike the walls) and they are only horizontally skewed. The darkened side edges are somewhat inelegantly hacked in to look 3D but are just sort of "cast" off of the pixels based on basic dot product calculations of 90 degrees off the face. I like the aesthetic though :D

Current version: 1.3 - Fix bug where music persists past blackout

Old versions:

1.2 - Made jittery anxiety effect and music not kick in until you've been talked at a few times, although the other effects still act as normal
Note - annoying bug where music persisted after blacking out (sorry)
source


1.1 - Made park walls easier to visually read and navigate
source


1.0 - First release version - Pathfinding, better anxiety, more fleshed out objectives, and a filled out map.
source


0.4 - Experiments with fisheye
source

Cart #45311 | 2017-10-18 | Code ▽ | Embed ▽ | No License
16

0.3 - More levels and spinning objects, better graphics source

Cart #43546 | 2017-08-23 | Code ▽ | Embed ▽ | No License
16

0.2 - Anxiety effects and improved graphics

Cart #42425 | 2017-07-13 | Code ▽ | Embed ▽ | No License
16

0.1 - Initial WIP release

Cart #42365 | 2017-07-11 | Code ▽ | Embed ▽ | No License
16


P#42366 2017-07-11 06:50 ( Edited 2018-11-02 08:38)

Cool demo! It reminds me of LSD*.

*(The PSX game)

P#42390 2017-07-12 01:52 ( Edited 2017-07-12 05:52)

@enargy - Thanks! I took a peek and that game looks super... well... trippy haha :P I can see the similarities though, I'll have to look into it more.

Uploaded a new version with fixed strafe controls (configurable in menu), and various camera effects based on your anxiety and getting talked at.

P#42426 2017-07-13 05:26 ( Edited 2017-07-13 09:27)

Yeah, the thing with LSD is it's all based around little 'scenes' that you unlock semi-randomly. There isn't a lot of interaction, just odd entities, textures, architecture, sounds, and then those things remixed and mashed up in various ways.

There's no real goal to that game. You just walk around and try to unlock scenes.

P#42429 2017-07-13 10:54 ( Edited 2017-07-13 14:54)

Fairly big update with some new graphical bells and whistles including dynamic sky/ground colors (the future is now!) and more complex tiles which have their types identified by the sprite flags that the sprites in the map have.

Still no objective, but I added some coins around and an alcohol bottle to find. The anxiety effects definitely still need some love but I think I'm past all the technical issues and can focus on the fun stuff now :D

P#43547 2017-08-23 09:33 ( Edited 2017-08-23 13:33)

I can't seem to pick up the coins.

Come on, I'm already anxious enough.

Lemme pick up the coins.

:)

PS: Nice pseudo-voice effects.

P#43585 2017-08-24 13:14 ( Edited 2017-08-24 17:14)

Very cool. It's interesting how you made the game render several columns at once if the system is running out of memory. The game makes me kinda motion sick though. It might be the fov or the way straight lines kinda curve.

P#43836 2017-09-01 09:18 ( Edited 2017-09-01 13:18)

your raycaster is broken (fisheye effect)
here's the solution:
https://gamedev.stackexchange.com/questions/45295/raycasting-fisheye-effect-question

P#43848 2017-09-01 14:49 ( Edited 2017-09-01 18:49)

Felice - Haha stay tuned, I'll make the objects collectible eventually! I'm glad you were able to endure the game long enough to find them though :P

MrBoxBox - Thanks! Yeah the multi-column thing was a kind of fun hack to mess around with. Obviously it'd be better if I could render all the columns but I figure this way I have almost no limit to how much junk I can shove in there, it'll just get progressively less and less clear.

adrian09_01 - Thanks so much! I could tell something wasn't quite right and did move the camera a bit further from the player which helped but I probably did it incorrectly. When I get a chance I'll be sure to comb through that link in detail!

P#44145 2017-09-13 05:15 ( Edited 2017-09-13 09:15)

The fisheye thing is kind of serendipitous, actually, since it adds anxiety, at least for me.

P#44146 2017-09-13 06:34 ( Edited 2017-09-13 10:34)

Ok, after figuring out how to contort the tips in that link to what's relevant for how my code works I think I have it working. I updated the cart in the OP (v0.4).

I have really mixed feelings about fisheye vs nonfisheye, and to say that fisheye means the raytracing is broken is not totally valid.

The thing I really like about fisheye that is absent in fisheye-corrected is that as you turn left and right it looks like you're simply panning across a static view... which is exactly what you should be doing, walls shouldn't be shifting and contorting while you turn your head. OTOH, you get those nice flat walls with fisheye-corrected but that's not how walls look IRL... they have a curve as they stretch away from you.

So yeah I'm pretty undecided. I've included 3 versions in this build which you can toggle in the menu:

NONE - no fisheye, fully corrected (note how the walls shift angles as you turn and how flat the walls look)
SQRT - take the sqrt of the fisheye correction which reduces it... a compromise
FULL - full fisheye, no correction. basically how it used to look (note how when you turn everything stays exactly in place)

It currently defaults to SQRT

(Also I fixed an oversight with the way I was choosing ray angles, in case you're looking at diffs or github commits)

Anyways yeah I have to mull it over a bit more I guess, tough to get my head around exactly what's going on and why... more from a reality vs simulation perspective than a mathematical perspective.

(and sorry, no gameplay adjustments yet... wanted to figure out this dumb fisheye thing once and for all but I'm still left with questions)

P#45312 2017-10-18 13:59 ( Edited 2017-10-18 18:05)

I think you're overthinking this, default should be none. BUT, if you can correlate the fisheye effect to your anxiety level, that would be really neat!

P#45355 2017-10-20 08:34 ( Edited 2017-10-20 12:34)

> sussing how to most accurately portray a game about anxiety is causing anxiety

Definitely try to do what @ultrabrite suggested -- turn on fisheye as anxiety increases.

P#45357 2017-10-20 10:41 ( Edited 2017-10-20 14:41)

Maybe have the grass walls not so detailed, hard to determine open corridor and wall.

Good 3D otherwise ...

P#58535 2018-10-29 15:35 ( Edited 2018-10-29 19:35)

@dw817 - Thanks for the feedback! I adjusted the park walls to have more distinctive edges and a generally less noisy texture so hopefully now the "hidden" pathways between blocks are a little bit more visible. I intentionally made it a bit difficult to see them but I think it was too difficult.

P#58555 2018-10-30 16:39 ( Edited 2018-10-30 20:39)

You're very welcome, jcwilk. Glad to see updates being made to this game !

Felice, you can only pick up the coins if you are "anxious." They decrease your anxiety and won't be picked up if you're at 100% health.

jcwilk, would be interesting to see this done on a 2D level. That's what my Dad wrote years ago, to see how a population of people affect each other in crowded conditions.

P#58575 2018-10-31 13:05 ( Edited 2018-10-31 17:05)

@dw817 - Those are old comments from before you could actually pick up objects. And actually, currently, you can pick up the objects at any time, regardless of your current anxiety (because in real life getting anxious doesn't let you do anything you can't do while calm). The hitbox for picking things up is a little narrow so you may have just missed it the first time.

I've just uploaded a new version 1.2 which adjusted the jittery wall/mob effect of anxiety to not kick in until you get talked at a few times, as per a suggestion on twitter from @heavysystemsinc thanks! Also made the music not start until then.

P#58592 2018-10-31 17:25 ( Edited 2018-10-31 21:28)

Fixed a bug where music persists past blackout (oops!)

P#58650 2018-11-01 23:57 ( Edited 2018-11-02 03:57)

This is the most terrified I've been of other people since the last time I was out.

P#58662 2018-11-02 04:38 ( Edited 2018-11-02 08:38)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 08:56:06 | 0.067s | Q:58