Twitter
github
npm
Freesound.org
Ludum Dare
Ludum Dare
Game Jolt
Kongregate
One Game a Month
Youtube

Welcome to brianmacintosh.com. I'm Brian MacIntosh, and I am a game programmer in the Orange County area of Southern California. This site serves to host and distribute some of my games and my blog, below.

I have developed games and apps for the XBox 360, Windows PC, iPad, Amazon Alexa, and Windows 7 Phone. I'm particularly interesting in procedural generation, pixel art, and emergent gameplay, and I'm looking forward to developing more games with these technologies.

Blog RSS E-Mail

You are filtering on tag 'box2d'. Remove Filters
Previous Page | 2 total posts | page 1 of 1 | Next Page

Contact Listeners in box2d.js


April 20th, 2015 @ 17:49
Tags: box2d, javascript, contactlistener, emscripten

To implement physics in Porcupine Dogfight, I used Alon "kripken" Zakai's emscripten port of Box2D to Javascript. It was very easy to get working and almost entirely identical to the original Box2D implementation, however, it lacks documentation for some of the differences. After some experimentation and trying to read the crazy auto-generated source code, I finally figured out how to implement a Contact Listener. There are two things that are not immediately obvious: the listener must be an instance of JSContactListener, and the parameters passed in are not objects, but pseudo-pointers that need to be dereferenced with wrapPointer.

I post some sample code on Github for the benefit of anyone else who has this problem in the future.


Permalink

Ludum Dare 32 Brainstorming


April 18th, 2015 @ 12:31
Tags: ludum dare, game jam, threejs, javascript, box2d

Brainstorming thought process for Ludum Dare 32: An Unconventional Weapon.

  1. I like airships.
  2. Unconventional airship warfare?
  3. Porcupines.
  4. What's more fun than airships slinging porcupines at each other?
  5. Porcupines flying airships, slinging themselves at each other!

Screenshot of porcupines flying balloons.


Permalink


Previous Page | 2 total posts | page 1 of 1 | Next Page