/ Development Tools

Setup OSX Mountain Lion for ImpactJS game directory

If you are trying to develop ImpactJS games on your mac you're going to need to get your apache server and php (for weltmeister) running locally. You  could just try and run your 'index.html' file out of your file system but you'll likely run into issues and you'll see bugs in chrome developer toolbar. This is because the engine files need to run on a webserver. So I'll quickly walk you through how I did that.

  1. The first step is to enable Apache & PHP. Follow the instructions found here up through the step of installing PHP, then come back. 
  2. So now you have an empty site running on 'http://localhost/~username/'
  3. You may not want to drop your game folder into your ~/Sites/ directory so instead you'll want to use Aliases to point to where your doing development. To do that we'll need to enable apache to follow symlinks. Do this by modifying 2nd line in the file you created at /etc/apache2/users/ by changing this "Options Indexes MultiViews" to this "Options Indexes MultiViews FollowSymLinks". Save & Quit the file. 
  4. Now we'll actually add the symlink. Navigate to your ~/Sites/ directory and run this command "ln -s original_dirname link_name".
  5. You should see a "Folder" in your ~/Sites directory which if you click on, will take you to your game's folder.
  6. Restart your server via 'sudo apachectl restart'
  7. In my case my game is called zops so I ran this command "ln -s ~/Development/zombie-ops/ zops"
  8. So here's what I paste in my browser to go to my game: http://localhost/~coreysnyder/zops/
  9. I can also view the level editor by visiting: http://localhost/~coreysnyder/zops/weltmeister
If you have any questions feel free to reach out to me on twitter at twitter.com/coreysnyder/

 

 

Corey Snyder

Corey Snyder

Senior Front-End Engineer for Aver Inc.. I have independently developed & released multiple video-games. I play Ice Hockey, I race FPV Drones, and I love my Subaru WRX STI.

Read More