Twitter Freesound.org Ludum Dare One Game a Month github 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 for the XBox 360, Windows PC, iPad, and Windows 7 Phone, and am expanding my experience daily. I have enjoyed developing and playing games of diverse genres, themes, and art styles, and I am greatly looking forward to working on many more.

Blog RSS E-Mail

Previous Page | 80 total posts | page 1 of 16 | 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

Camera Obscura Indie Royale

March 25th, 2015 @ 17:28
Tags: camera obscura, indie royale, bundles

I'm excited to have Camera Obscura featured in this week's Indie Royale game bundle! Pay what you want for Camera Obscura and 5 other games. No reason not to pick it up now!

The Venetian Bundle


Permalink

Camera Obscura Steam Release

February 10th, 2015 @ 3:05
Tags: camera obscura, steam

It's happening. Three years after its inception, Camera Obscura has made it through Steam Greenlight. We've been hard at work through January getting everything ready for release, and it's coming on February 19th. I'm excited to finally get the game out to players so they can enjoy it!

For more information, visit cameraobscuragame.com.


Permalink

Magic Mobile Website Compatibility

January 31st, 2015 @ 21:39
Tags: site, html, mobile, random

I recently started working on making these pages more compatible with mobile devices. One piece of advice I found quickly was to include the following meta tag in my HTML header:

<meta name="viewport" content="width=device-width,initial-scale=1">

It took me a bit longer to figure out exactly what this seemingly magic piece of code actually means for a site being rendered in a mobile browser, and to convince myself that yes, this code can magically make your website display much better on small mobile devices - but only if your website's CSS is already set up in a nice, size-independent way.

By default, mobile browsers assume that most of the internet is not designed to display well in a very small format. For that reason, they will render webpages at a large resolution more comparable to a desktop, and force the user to zoom and pan to see the content. What this code is actually doing is informing the browser that, yes, your content is fine to be displayed in a very small window - you are promising that it will resize itself and nothing will bleed off the page. This causes the browser to disable the extra-large render, freeing users from needing to zoom or scroll content sideways. So, if you've set up all your CSS to use percentages instead of fixed positions, it should result in an instant improvement in user experience as users can now simply scroll vertically through your content.

In my case, there was one other change needed to make this site's content mostly mobile-compatible. I often use screenshot images here, and those images are usually wider than a typical phone display, so I need them to scale down if the window is smaller than they are. This was accomplished easily enough by including the following CSS in the HTML header:

<style>img{max-width:100%;}</style>

Which simply instructs every img element on the page to be no wide than its parent element. Aspect ratio is preserved automatically.

There are plenty of other small UX adjustments that can be made, but now my site renders in a much more convenient format for visitors on phones.


Permalink


Previous Page | 80 total posts | page 1 of 16 | Next Page