Mar 22
Adjust HaxePunk Framerate Settings

Working with HaxePunk? Having framerate issues in the browser? Try the code below.

HXP.fixed = true;

Add this line of code to the new() function inside of your first scene class and you should be good to go. If you want to further adjust the framerate settings you can change the frameRate and assignedFrameRate values with the code below.

HXP.frameRate = 60;
HXP.assignedFrameRate = 60;

Just like before, add these lines to the new() function inside of your first scene class.

Just a note, this may help framerate issues in the browser, but not so much on desktop. Be sure to omit this code from non-browser builds of your game or use HaXe’s conditional code compilation to only compile this framerate code for your browser build.

Oct 21
Hello World

There are many ways to say “Hello World”, so here are just a few.

Java: System.out.println(“Hello World”);

Python: print(“Hello World”)

HaXe: trace(“Hello World”);