Jump to content

  • Log In with Google      Sign In   
  • Create Account

Mikkel Staunsholm

Emscripten On OSX

Posted by , 19 October 2013 - - - - - - · 1,379 views

Did you see that the Epic Citadel demo now runs at full speed under Chrome as well (http://www.unrealengine.com/html5/)?

This got me curious about emscripten once again, and so I set it up on my mac. Actually very straight forward, but not a one-liner:
  • install brew if you don't have it (if you're using macports, then you are on your own :-)
  • always good to update brew: brew update && brew outdated
  • brew install node spidermonkey closure-compiler yuicompressor
    • Of course, you can leave out any you already have installed (fx. I already had node and closure-compiler)
  • brew install llvm --with-clang
  • brew tap homebrew/versions
  • brew install llvm33
  • create symlinks to llvm33:
    • cd /usr/bin
    • sudo ln /usr/local/Cellar/llvm33/3.3/bin/opt-3.3 opt
    • sudo ln /usr/local/Cellar/llvm33/3.3/bin/llvm-as-3.3 llvm-as
    • sudo ln /usr/local/Cellar/llvm33/3.3/bin/llvm-dis-3.3 llvm-dis
    • sudo ln /usr/local/Cellar/llvm33/3.3/bin/llvm-nm-3.3 llvm-nm
    • sudo ln /usr/local/Cellar/llvm33/3.3/bin/lli-3.3 lli
    • sudo ln /usr/local/Cellar/llvm33/3.3/bin/llvm-link-3.3 llvm-link
    • sudo ln /usr/local/Cellar/llvm33/3.3/bin/llvm-ar-3.3 llvm-ar
    • sudo ln opt /usr/local/Cellar/llvm33/3.3/bin/ocpt-3.3
    • (you get the idea, basically emscripten will tell you if you forgot one)
  • setup Python:
    • cd /usr/bin
    • sudo ln python python2
    • sudo ln ../../System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 python22.7
  • setup emscripten:
  • try it out:
    • ./emcc tests/hello_world_gles.c -o hello_world_gles.html
    • open hello_world_gles.html
When the browser open the html file, it should display this scene:
Attached Image

And it is only 200k of js! Amazing :-P


PS! I don't have access to IE11 yet, exciting times if it actually works!

An Evening Of Fun

Posted by , 18 October 2013 - - - - - - · 481 views

Stumbled upon the PUTT contest: https://www.gamedev.net/topic/647849-power-up-table-tennis-contest/

Got inspired for a few hours, and here is the result:


Even has a title screen:
Posted Image

Game play is rubbish, basically you can only loose... Hopefully I'll find some time to polish it.

Code is here: https://github.com/staunsholm/ice-cube


October 2013 »


Recent Entries

Recent Comments