News for hackers. Stuff that matters.
Re:In-browser retro-futuristic tank game, open source by brianrisk on Sunday August 07, 2022 @04:11PM (#32379431)
Pure javascript/html. Would love feedback on ideas. Leave a star on Github if you like it!
Re:In-browser retro-futuristic tank game, open source by mysterydip on Sunday August 07, 2022 @04:45PM (#32379718)
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.
Re:In-browser retro-futuristic tank game, open source by brianrisk on Sunday August 07, 2022 @05:25PM (#32380068)
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
Re:In-browser retro-futuristic tank game, open source by jaeh on Monday August 08, 2022 @03:29AM (#32383134)
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)
Re:In-browser retro-futuristic tank game, open source by PostOnce on Sunday August 07, 2022 @04:54PM (#32379799)
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

Re:In-browser retro-futuristic tank game, open source by brianrisk on Sunday August 07, 2022 @05:29PM (#32380103)
You're the best
Re:In-browser retro-futuristic tank game, open source by madrox on Sunday August 07, 2022 @06:00PM (#32380323)
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. :)

Re:In-browser retro-futuristic tank game, open source by z9znz on Monday August 08, 2022 @05:43AM (#32383760)
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.

Re:In-browser retro-futuristic tank game, open source by madrox on Monday August 08, 2022 @12:57PM (#32388023)
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.

Re:In-browser retro-futuristic tank game, open source by z9znz on Monday August 08, 2022 @05:29PM (#32391273)
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.
Re:In-browser retro-futuristic tank game, open source by abetusk on Monday August 08, 2022 @04:00AM (#32383293)
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

Re:In-browser retro-futuristic tank game, open source by tjbrennan on Monday August 08, 2022 @06:01AM (#32383843)
You're in luck: https://github.com/victorqribeiro/retroSynthwave

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

Re:In-browser retro-futuristic tank game, open source by tech234a on Monday August 08, 2022 @12:50AM (#32382470)
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.
Re:In-browser retro-futuristic tank game, open source by modeless on Sunday August 07, 2022 @11:59PM (#32382283)
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...

Re:In-browser retro-futuristic tank game, open source by brianrisk on Monday August 08, 2022 @05:13PM (#32391084)
A popular suggestion today! Done!
Re:In-browser retro-futuristic tank game, open source by lbotos on Sunday August 07, 2022 @05:11PM (#32379948)
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

Re:In-browser retro-futuristic tank game, open source by brianrisk on Sunday August 07, 2022 @05:32PM (#32380122)
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")
Re:In-browser retro-futuristic tank game, open source by gkaemmer on Sunday August 07, 2022 @05:17PM (#32379992)
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.

Re:In-browser retro-futuristic tank game, open source by brianrisk on Sunday August 07, 2022 @05:28PM (#32380092)
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
Re:In-browser retro-futuristic tank game, open source by sh4rks on Sunday August 07, 2022 @08:48PM (#32381373)
I'm really surprised how smooth the controls felt on my phone. Even with eight direction buttons, the movement was intuitive.