Live data from Hacker News

Show HN: A Tribute to “Asteroids”

harimohanraj89.github.io

11–17 of 17 posts

Re: Show HN: A Tribute to “Asteroids”

#11
post #7

A tribute to "Steroids" http://www.dailyutahchronicle.com/index.php/a-tribute-to-ste...

You have posted an unrelated link. Please don't do this, it does not move the conversation forward.

I'd like to introduce you a friend of mine called "humor sense"

:-P

Re: Show HN: A Tribute to “Asteroids”

#13
At first, I blasted everything in sight.

Then I noticed that if it wasn't going to hit me on the pass and wasn't the smallest size, that was bad.

I started waiting on the first big with a direct line, taking that guy down to basic and repeating.

Zen Astroids. :)

Re: Show HN: A Tribute to “Asteroids”

#14

On my browser (Safari), pressing arrow keys scrolls, making the game really hard to play. You should be able to `event.preventDefault()` or something to prevent scrolling.

Ah yes, the scroll is annoying! I think I tried some sort of preventDefault thing, but definitely need to get that working. Thanks!

Re: Show HN: A Tribute to “Asteroids”

#15

I like it. It harkens back to the original vector art version from '79, although you really should make the asteroids look more asteroid-y. If you make them circular it's still quite easy to do your collision detection and they'll look a lot better.

My collision code is overly simplistic, and so I went with squares to give the asteroids some jagged edges. I should totally try out circles to see if they look better, though. Thanks!

Re: Show HN: A Tribute to “Asteroids”

#16
post #9

Been a while since I played Asteroids... is this any different from the original, other than the asteroid shapes? Very clean code btw.

Thanks for the comment. It's ideally supposed to be the same as the original. If it is not, it's because I haven't implemented some features yet (spaceships, slowing down eventually if you don't thrust, ...).

Re: Show HN: A Tribute to “Asteroids”

#17

I did a similar thing some time ago adding rigid body collisions on the asteroids, which makes the game way harder. https://github.com/santialbo/Asteroids play here: https://rawgit.com/santialbo/Asteroids/master/default.htm

Asteroid collisions completely change the game! You also nailed that vintage look! Nice stuff! I'm diving into your source code for polygons in detail!
Post reply on HN