Group Details Private


  • RE: Applying Shaders to everything except UI

    The way I've done this is to make my UI and game content separate scenes, something like this:

    class UIScene extends Scene {
        var gameScene:GameScene;
        public function new(g:GameScene) {
            gameScene = g;
            bgAlpha = 0;
        public function update() {
            if (!gamePaused) gameScene.update();
    class GameScene extends Scene {
        // ...

    And to activate both:

    var gameScene = new GameScene(),
        uiScene = new UIScene(gameScene);

    You can then apply shaders to either scene.

    posted in Help & Support
  • RE: enabling the console breaks the build

    Looks like an incompatibility with a specific Lime/OpenFL version. What versions of HaxePunk/OpenFL/Lime are you using?

    posted in Help & Support
  • RE: Error when trying to setup HaxePunk

    Try running this first: haxelib git munit

    posted in Help & Support
  • RE: A Simple Shooter Doesn't Work?

    sign and other math functions that were on HXP have been moved to haxepunk.math.MathUtil.

    posted in Help & Support
  • Ludum Dare 41 entry: Streets of Style

    Link to the LD submission. Created in 48 hours with HaxePunk!

    If you entered Ludum Dare, I'd love to rate your entry and also retweet it from @HaxePunk - shoot me a message or reply to this thread

    Streets of Style is an NES-styled side-scrolling beat-em-up, with dressup and incremental features.

    I used the new haxepunk.pixel.PixelArtScaler for this, which is available on dev and will be in the 4.1 release.

    Conquer the streets with your fists of steel, and sport the hippest fashions! Convert aggressive thugs into adoring fans with your unparalleled sense of style.


    posted in Showcase
  • RE: Rotating sprites while keeping resolution consistent?

    Help me understand what you mean by shaky. I've noticed when using fixed time step it can appear shaky when there are dropped frames, and lowering the resolution makes this appear worse.

    posted in Help & Support
  • RE: Rotating sprites while keeping resolution consistent?

    One more thing, on the Git version you can also set Graphic.smoothDefault = false and Graphic.pixelSnappingDefault = true to make sure things at non-integer positions don't blur. globalActivate does this for you, just make sure you call it prior to creating any Graphics so that the default applies.

    posted in Help & Support
  • RE: Rotating sprites while keeping resolution consistent?

    This is the expected behavior (different from how the Flash target used to work, but it's always worked this way on native.) But actually I juuust added something to handle this on the dev branch.

    In your project.xml you need <set name="hxp_extras"/>, and then call haxepunk.pixel.PixelArtScaler.globalActivate();. This will cause your game to be rendered at the lower resolution of HXP.width x HXP.height, then scaled up in a way to minimize blurring in case the window resolution isn't a perfect multiple.

    Take a look at my port of Matt Tuttle's Spelunk for an example. Note that you'll need to install HaxePunk from git to get this to work.

    posted in Help & Support
  • RE: Drawing in Haxepunk?

    There's not a way to use Draw on a BitmapData anymore, but if you create a BitmapData (using OpenFL, not HXP) and draw whatever you want on it using OpenFL's APIs, you can pass that to the Image constructor. (Initializing an image using a BitmapData does still work.)

    posted in Help & Support
  • RE: Drawing in Haxepunk?

    Draw is no longer just for debugging, you can use it as part of a Graphic's render method and it'll work fine. It's an officially supported way to hook into our rendering code. Drawing lines should work fine, and if you need more than what's in the API, please reach out.

    There's not an official or straightforward way to use OpenFL's Sprite drawing methods on top of HaxePunk. They probably don't make any guarantees about raw OpenGL and DisplayList interaction so I imagine you're going to run into challenges and inconsistencies across targets. If you do want to experiment, is an OpenFL Sprite when you're using the OpenFL backend... good luck! If we can support what you want to do in HaxePunk itself though, that would be the ideal.

    posted in Help & Support

Looks like your connection to NodeBB was lost, please wait while we try to reconnect.