Is this doable? A shooting game with Gills

want some advice on whether or not this is doable. I’m making a game for Gills. no need to connect any other stuff.

shoot in the dark
a survival horror game on Gills

instructions

  • twist encoder to turn or ‘look’ around
  • press the encoder to shoot with gun
  • you have limited ammo
  • listen where your enemies are
  • block with S1
  • switch guns with S4 (tbc)

gameplay execution:

  • player on centre position
  • enemy position calculated by angle and distance relative to player position
  • enemies run towards the centre aka player position
  • shoot the monsters or dodge their attack. otherwise you die

As no one else has answered:

I guess the main issue is representing behind and front? I guess a simple solution is to remove some of the higher frequencies when the baddy is behind.

It all seems doable though to me.

1 Like

that’s the thing: I need to figure out how to make enemies sound like they’re coming from behind you. need some advice on that.

Well with a stereo signal you are a bit limited, so probably the best way is to over do it, so over exaggerate the physical way our hearing works :slight_smile:

So you could define a baddy from the listeners perspective with three variables (I don’t think you need X&Y?).

  1. Angle from player
  2. Distance from player
  3. Velocity towards player

Distance determines volume, maybe also velocity as well, their footsteps get closer together and louder the faster they go?

The angle can maybe determine two low pass filters, two delays and two levels on your stereo channels.

If we say that 0 degrees is directly in front of you then you have no delays and no filtering.

At 90 degrees off to the right you have a small delay on the left channel and also some filtering and a bit less volume. Same with 270 degrees but the other way round. At 180 degrees behind you would filter both channels but no delays and a bit less volume. So you need to determine an algorithm based on angle that sets these 3 parameters for each channel, left and right.

You can also use the velocity to implement a Doppler effect, possibly only useful if you could dodge the baddy and it went flying past you. That would be neat rather than blocking maybe? Not much use I guess if they are slow moving though?

Look up binaural algorithms for lots of details and complexity or mess around with those filters, delays and levels until it works :slight_smile:

1 Like

yeah I’m still thinking what the enemies will be like. I’m thinking they will be fast. dodging is better than blocking, I agree.

I think for my prototype, I won’t use the Doppler effect since I don’t really know how to synthesize it.

and I’ve look up some binaural or Doppler effect tutorials on YouTube. they all seem really complicated :open_mouth:

You can “bodge” the complexity though, for Doppler the faster the baddy is coming towards you the higher you make the frequency of its sounds, the faster it is going away from you the lower you make the frequency of its sounds.

The “bodge” for the binaural stuff is the filters, delays and volumes I listed before.

1 Like

spatial rotator test.axp (3.8 KB)

revisiting this thread with the spatial rotator object test. i think if an enemy is coming the left, there doesn’t need to be any sound coming from the right channel. now i’m figuring out how to mimic sound coming from behind. will try your filter and delay methods soon.

also thinking of how the enemy will sound. i’m thinking something like the monster from Amnesia: The Bunker.

bark test.axp (15.9 KB)
bark.wav sample:

spatial audio test. 3 dials.
dial_LR = left & right
dial_FR = front & rear
dial_dist = distance

I’ll give a go a bit latter…

in the end I still used X & Y axis to determine sound from left or right, from behind or in front. just need to find a way to convert XY into angle. I already have the distance parameter

bark test.axp (24.2 KB)
gun.wav sample:

used polar2cartesian for angle & radius to X Y position

for Gills
twisting encoder now mimics turning your head
press encoder to fire the gun

current issues
sample sounds different when played through table/play
when barking is on the left ear, there are phase issues, but normal ears dont behave like this

reviving this.

so far I got the gun system and 3D audio system working. right now I’m thinking of using a wavetable as a map for the player to walk and navigate. and the tutorial level (first level) will just be a long hallway with a door at the end and sounds of flies flying around a corpse. no guns during the beginning of the game.

I saw somewhere online that you can draw wavetables, but is it possible to pinpoint a location on the wavetable? I can figure out the movement aspect later.