Hacker News new | ask | show | jobs
by brianrisk 1414 days ago
Pure javascript/html. Would love feedback on ideas. Leave a star on Github if you like it!
9 comments

Neat! Smooth performance on my iPhone. The controls might need some tweaking in terms of values, like faster turning if I'm holding it down, but less if I'm tapping trying to line up a shot.
Glad it worked for you on the iPhone! I'd love to figure out how to resize the screen correctly if the phone is in portrait and then you rotate it to landscape
do you mean like this?

  const onResize = () => {
    const { innerWidth: w, innerHeight: h } = window
    camera.aspect = w / h
    camera.updateProjectionMatrix()
    renderer.setSize(w, h)
  }
  window.addEventListener('resize', onResize)
I know the github link is on the main screen, but people are going to click past it to play of course

so here's the github link to click on from HN: https://github.com/brianrisk/SYNTHBLAST

You're the best
Good fun! As a FPS player, I want an option to bind A and D to strafe and use mouse or arrow keys to turn.

Also, maybe have the music fade in so I have a chance to save my ears. "Blast" indeed. :)

But tanks can't usually strafe...

The sound is very reminiscent of the old video game arcades. Just about every game cabinet was pumping out some soundtrack and game sounds like this, so the entire place had a certain acoustic character which was very unique. I'd hate it now with my older sensitive ears, but as a kid it was a siren song.

It isn't a tank. It's a triangle. Tanks also don't have infinite ammo. We make concessions to unreality all the time in the name of making things more fun.

And this isn't an arcade. It's a web page. It's a common courtesy to people visiting web pages to not get immediately blasted with sound at the high end of the range.

And yet, this game was clearly intended to be a throback to old arcade games. And old arcade games like this typically modeled tanks (and didn't have strafing). Old arcade games also DID have loud music like this, and as I noted above the whole arcade was full of these competing sounds.
Almost completely unrelated but I have long wanted an in-browser/real-time/javascript/FOSS 'synthwave screensaver' in the style that you sometimes see on YouTube [0].

Maybe I'll use your code as a baseline for it if I get the motivation.

In terms of actual feedback, the game itself has a lot going for it. I would, at the very least, add some 'juice' to it, which would probably add a lot. There are many videos on it but the most enlightening one I found was from Nijman of Vlambeer [1].

You might need to take care with literal screenshake as it's 3d but there are many other suggestions that are relevant (kick back from firing, enemy blood/armor splatter, detritus persistence, small variations in bullet direction, etc.).

[0] https://www.youtube.com/watch?v=zgsJohwr9EQ

[1] https://www.youtube.com/watch?v=AJdEqssNZ-U

You're in luck: https://github.com/victorqribeiro/retroSynthwave

This plus the macos app Plash makes for a sweet desktop wallpaper.

Very cool! Multiplayer could be a fun addition where players could choose to collaborate or could try to prevent other players from reaching future levels.
The floor desperately needs anisotropic texture filtering. Hopefully should be easy to turn on.

Better yet, check this article and implement some really high quality texture filtering: https://bgolus.medium.com/sharper-mipmapping-using-shader-ba...

A popular suggestion today! Done!
Great job!

- Maybe a warning for tanks behind you? Felt overwhelming at times

- Maybe top down tile one level sooner?

- In top down mode maybe larger bullets

The warning idea could actually add to some of the suspense. Maybe a creepy sound they make within a certain radius? And: larger bullets? That's hands-down the easiest suggestion to try out I've ever seen! (as opposed to "multiplayer and wearables inventory woudl be cool bruh")
Very groovy visuals.

There was something sort of terrifying about the enemy tanks. Maybe a minimap would help with this, but I almost got Slenderman vibes when I would turn around and see a tank right there in front of my face. Got my heartrate going.

I fully get it. Their seeking algo is pretty primitive, but their steady relentlessness is unnerving. At level 3 or higher there are green pads you can run over that gives you an overhead view
I'm really surprised how smooth the controls felt on my phone. Even with eight direction buttons, the movement was intuitive.