January 20, 2018, 03:10:11 AM

Author Topic: HaxePunk 2.3.0  (Read 15147 times)

Matt Tuttle

  • Administrator
  • Sr. Member
  • *****
  • Posts: 309
    • View Profile
    • Matt Tuttle's Blog
HaxePunk 2.3.0
« on: May 30, 2013, 08:07:26 PM »
This release has been submitted to haxelib for both Haxe 2.10 and 3.0. Here are some notable changes.

  • Added OpenFL support
  • Improved scaling, atlas layer management. Thanks MaskedPixel!
  • Added HXP.fullscreen to toggle between windowed and fullscreen modes

Thanks to everyone who has created pull requests and keep making HaxePunk better! This is the first version where I feel hardware targets have finally caught up with Flash.

mattchu

  • Full Member
  • ***
  • Posts: 190
  • Invisi-wizard
    • View Profile
    • Another Day, Another Game
Re: HaxePunk 2.3.0
« Reply #1 on: May 31, 2013, 05:48:36 AM »
This is the first version where I feel hardware targets have finally caught up with Flash.
Except for BitmapData. Use of BitmapData isn't CRASHING it anymore but it's still not working. :/

Matt Tuttle

  • Administrator
  • Sr. Member
  • *****
  • Posts: 309
    • View Profile
    • Matt Tuttle's Blog
Re: HaxePunk 2.3.0
« Reply #2 on: May 31, 2013, 06:00:58 PM »
BitmapData doesn't "work" in native because it is incredibly slow. However, if you want to use it then all you need to do is tweak Engine.hx to use buffer rendering instead.

Code: [Select]
#if flash
HXP.renderMode.set(RenderMode.BUFFER);
#else
HXP.renderMode.set(RenderMode.HARDWARE); // change this to BUFFER
#end

There are still plenty of limitations though since NME/OpenFL doesn't support a lot of BlendModes and other features found in Flash.

mattchu

  • Full Member
  • ***
  • Posts: 190
  • Invisi-wizard
    • View Profile
    • Another Day, Another Game
Re: HaxePunk 2.3.0
« Reply #3 on: May 31, 2013, 11:51:45 PM »
BitmapData doesn't "work" in native because it is incredibly slow. However, if you want to use it then all you need to do is tweak Engine.hx to use buffer rendering instead.
Oh, that's the reason? Okay. I was just told it stopped working it some point. Thanks. I'll see how it works out.

EDIT: Oh man. I didn't notice a performance hit but every object except the player didn't render correctly. Oddly enough, the bloom rendered without the object using the bloom rendering.

singmajesty

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: HaxePunk 2.3.0
« Reply #4 on: June 02, 2013, 11:04:46 AM »
OpenFL should support all Flash blend modes, but this is done using software.

Not all blend modes are efficient for hardware rendering (like drawTiles requires) but the newest version of the OpenFL release candidate includes additional hardware blending modes, compatible with drawTiles, Tilesheet.TILE_BLEND_MULTIPLY as well as Tilesheet.TILE_BLEND_SCREEN.

Matt Tuttle

  • Administrator
  • Sr. Member
  • *****
  • Posts: 309
    • View Profile
    • Matt Tuttle's Blog
Re: HaxePunk 2.3.0
« Reply #5 on: June 02, 2013, 04:15:22 PM »
Hi Joshua,

Thanks for your work on NME and OpenFL! Hopefully you didn't read my post as complaining about NME. It's a great framework and I'm constantly impressed with what you all have been able to accomplish over such a short period of time.

I hadn't noticed the BlendMode additions yet. Very nice! Here are a few things that I've noticed working with NME.

  • A SUBTRACT blend mode would be a nice to have for lighting/shadows.
  • TextField only rotates at 90 degree angles. This seems to mimic Flash so it might have been a design decision.
  • I haven't looked in a while but is there a way to do realtime audio, with flash.events.SampleDataEvent?
  • Layers were pretty hard to implement with drawTiles due to the lack of a z-axis. I ended up keeping each layer on it's own Sprite and managing them through the display list. This still has some issues because I'm making a best guess on how the layers are ordered based on the ones that already exist.

Also, my comment about BitmapData was not a fault of NME. I made a conscious decision not to handle rendering exactly like FlashPunk since it was too slow for mobile devices, using BitmapData blitting. Unfortunately there are a bunch of tutorials using BitmapData tricks in FlashPunk that won't convert to HaxePunk for that reason.

mattchu

  • Full Member
  • ***
  • Posts: 190
  • Invisi-wizard
    • View Profile
    • Another Day, Another Game
Re: HaxePunk 2.3.0
« Reply #6 on: June 03, 2013, 02:58:23 PM »
Layers were pretty hard to implement with drawTiles due to the lack of a z-axis. I ended up keeping each layer on it's own Sprite and managing them through the display list. This still has some issues because I'm making a best guess on how the layers are ordered based on the ones that already exist.
EDIT: Figured this out. Sorry about that. :/

singmajesty

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: HaxePunk 2.3.0
« Reply #7 on: June 06, 2013, 11:32:05 AM »
I'll look again if we can add a SUBTRACT mode, but its difficult to implement certain effects. I think you can use bitmapData.draw() to rotate a TextField? I believe real-time audio should be supported on SDL (Windows, Mac, Linux, BlackBerry, webOS) targets. I appreciate all that you've been contributing to the community, and hope you can feel productive and enabled using OpenFL as the backend for the framework :)

scutheotaku

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: HaxePunk 2.3.0
« Reply #8 on: September 01, 2013, 11:33:33 PM »
Hey,

New here :) I couldn't find an updated FlashDevelop template, so I went ahead and forked and updated cr0ybot's. This is my first time making a FD template, but it seems to work well for me.

https://github.com/scutheotaku/HaxePunk-FD-Template

Cheers,
Ben

RobertWrift

  • Newbie
  • *
  • Posts: 4
    • View Profile
I can not come up with the right answer to my problem :/
« Reply #9 on: December 19, 2017, 08:16:40 AM »
Great post\Nice post, I enjoyed it very much.I was very lucky to discover your website. There is so much useful info!
http://www.oponyserwis.com/professional-writing-service-6/