Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
A jam submission

Z-MartView game page

Your shift ends when you do... (Wildcard Winner of the Synty Spooky Game Jam 2024!)
Submitted by Zac | MakeFunGames — 3 hours, 16 minutes before the deadline
Add to collection

Play game

Z-Mart's itch.io page

Leave a comment

Log in with itch.io to leave a comment.

Comments

Submitted(+1)

This is pretty cool, idea for a resource management.

This could easily be a full game with a few more tweaks and polish.

Awesome Job!!

Developer(+1)

Thank you! I appreciate it!

Submitted(+1)

I really liked this game! Very fun! Congratulations! 

PS: Can you share your code? I'm very curious to know how you created this NPC AI.

Developer(+1)

Thank you!

So the customer AI is actually a chain of goal-oriented behaviors. The goals themselves are just transform references, and the behaviors started with an abstract class to define checking if a transform is the goal, what to do when the goal is reached, and what the next behavior is once the behavior is complete. The goal transforms are just sphere triggers that check if the collision is a customer. Every shelf in the store has one of these nodes, as well as the shop entrance, the queue positions, the start of the checkout, the end of the checkout, etc. 

Also to note, the behaviors are all components that attach to the customer directly, and replace each other every time the next behavior is to start. 

The simplest behaviors are the enter store and leave store behaviors. They simple get the store entrance transform, set the pathfinding target to its position and let it head there. 

The actual shopping behavior is more of a loop. The customer gets a random amount of items to purchase and the behavior finds a random shelf node to go to. Once there, it "adds" the item to the cart, and if it hit the desired/possible number of items the behavior gets replaced with the queue behavior. If not, it keeps finding shelves to go to until it hits the desired/possible number of items (you might run out of items in the store and they have to end their shopping early)

Does that makes sense?  

The pathfinding is just the A* algorithm with a grid.

And then I wrote a similar behavior system for the zombies, but more customizable as the zombies actually need to do something to be able to enter the store

Submitted(+1)

Wow, thank you for your explanation! Great game indeed!

Submitted(+1)

Really creative take! I love the player agency in the game, so many horror games take it away for that feeling of helplessness. I did get the stuck customers bug before reading this. The shotgun is firing 3 rounds at once, so 15 shots is gone in 5. Also a way to check out customers yourself would have helped, as you can lock yourself out of the rest of the game if you aren't careful.

Developer (1 edit)

you can stand at the cash to man it yourself! And the 3 rounds per fire is designed, as it actually fires three shots at once with a small spred. You can buy more ammo at the green fridge by the cashes!

Developer

Important!

A bug was found where sometimes the customers in line get stuck and do not proceed to the checkout. In the rare case this happens, if you pause and unpause that has been reported to fix their behaviour. I cannot upload the fix while the jam is underway!