JavaScript buggy game

Discussion about everything. New games, 3d math, development tips...
Post Reply
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

JavaScript buggy game

Post by Brainsaw »

OK, another small JavaScript game from me ;)

I surfed the internet last week without a real target and stumbled upon Box2Djs (http://box2d-js.sourceforge.net/), a 2D physics engine for Javascript based on Box2d which I already knew. So I downloaded and tested it and started a little "tech test" project. It's a simple 2d sidescroller, graphic sucks (but that was not the purpose of the project), but it works. If your browser has the HTML5 canvas element you can try it (it's only tested on Firefox however):

http://bulletbyte.de/products.php?sub=js&show=buggy

Here's the text from my homepage:
JSBuggy is just another little test project I did to see what's possible with the new HTML5 canvas and JavaScript. This time I found a JavaScript 2D physics engine, Box2dJS and did some testing with it. You have to drive a buggy over a racetrack (from left to right). You control the buggy with the "Cursor left" and "Cursor right" keys. Once you get stuck or flip you'll have to reload the page in order to restart the game. Have some fun.
Btw: you don't have to reload the page to restart the game ... I should change the text on the homepage I guess.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
DarkDepths
Posts: 126
Joined: Sun Apr 02, 2006 1:21 am
Location: Canada

Post by DarkDepths »

I tried in both Chrome and Firefox but I couldn't get it to work. I could see the cart and there was a floor and a wall to the left of the cart. I pressed the arrow keys on my keyboard and the timer started, but the cart wouldn't move.
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Post by serengeor »

Same here :(
Working on game: Marrbles (Currently stopped).
haffax
Posts: 13
Joined: Wed Jul 29, 2009 1:40 pm

Post by haffax »

You have to start to move before the car hits the ground, else it is stuck.
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

Hmm ... i know it sometimes doesn't react to key input, but reloading the page does (normally) fix the problem. Maybe I should put some more work in ;)
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
DarkDepths
Posts: 126
Joined: Sun Apr 02, 2006 1:21 am
Location: Canada

Post by DarkDepths »

haffax wrote:You have to start to move before the car hits the ground, else it is stuck.
Ah yes, that was indeed the problem. I was able to test it out this time and it was pretty fun to play around with!
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

I got the starting problem fixed (5 minutes between 2 meetings at work :D ): the simulation is now started when you press a key to accelerate, so it won't be stuck any more.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Armen138
Posts: 298
Joined: Mon Feb 23, 2004 3:38 am

Post by Armen138 »

this is pretty cool :)
if you're looking for me, start looking on irc, i'm probably there.
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Post by greenya »

Nice game :)

P.S.: "Race finished in 42.27 seconds!"
Post Reply