Inspiration from an old ATARI Game, implemented in Hype

gamedev

(darren_pearson) #1

Just finished creating a mock up of one of my favorite games as a kid, Adventure for the ATARI 2600. Would love any usability feedback.

http://darrenscorner.com/hype/adventure/adventure.html

Added a lot of Javascript and figured out how to do Axis Aligned Bounding Box Collisions in Hype to let the player move around. Hype does a wonderful job with audio. (Note: This is based off a video game from 1981, so the graphics are suppose to be primitive and “blocky”.)

If you find any bugs or quirks, please let me know what browser platform you are using. Thanks so much for any feedback.


#2

Doesn’t work on the ipad :stuck_out_tongue_winking_eye:


#3

Very cool! Thanks for sharing.


(laggarto) #4

Hi Darren,
cool, thanks for sharing.
I’m using Chrome, and in the second screen, I can move the arrow or the key of the limits of the game screen, inside the gate on the top of the screen. Maybe, if there are no more screen, you should use a static wall, for this not to happens.

Regards from Panama


(Nick ) #5

How did you implement the grab feature for the key that is really nice!


(darren_pearson) #6

Thanks. I’ll look into changing how the collisions work. Appreciate the feedback


(darren_pearson) #7

It’s part of collision detection. Took a lot of trial and error to make it work. Used a lot of global variables. For the key, I created a global variable called window.GOLDKEYATTACHED and set it initially equal to “no”. Depending on which side the player bumps into it, it takes on the value of “top”, “right”, “bottom” or “left”. I use this to determine the key position based off of the player position. When you press spacebar, the value goes to “no” and you drop the key.

For collision detection in general, I created a 2D array which is a grid of the scene. If a grid contains the value 0, you can move into it. I used 1 to represent a wall, 2 for the gold key, 3 for the black key, etc.

Thanks for playing and testing!


(Nick ) #8

Now this would be a great canned function for Hype in the future if that is possible.
The collision detection is a jewel in the holy grail to take Hype into Game engine status :smile:


(darren_pearson) #9

Agreed. Mine is a little “sloppy” when it comes to javascript coding but if I have time I might try to clean it up a bit.


(Zach) #10

Would you be willing to post a download of the Hype document any time soon?


(darren_pearson) #11

I plan to eventually. Right now need to finish up another project before I clean up the code for adventure. Also, have to balance the demands of my day job.