November 22, 2017, 01:02:17 AM

Author Topic: HaxePunk VS FlashPunk  (Read 3429 times)

dodobird

  • Newbie
  • *
  • Posts: 2
    • View Profile
HaxePunk VS FlashPunk
« on: June 27, 2012, 05:41:53 PM »
Hello,

My name is Oded and this is my first post in this forum!

I'd like know if there are any differences that I should be aware of between HaxePunk and FlashPunk. Specifically, can I learn HaxePunk by following the FlashPunk tutorials?

Many thanks,

Oded.

Matt Tuttle

  • Administrator
  • Sr. Member
  • *****
  • Posts: 309
    • View Profile
    • Matt Tuttle's Blog
Re: HaxePunk VS FlashPunk
« Reply #1 on: June 27, 2012, 11:40:51 PM »
When I initially ported the code from FlashPunk to Haxe I tried to keep everything as close to the original as possible. There are a few key differences though.

Embedding is easier than flash using NME. Simply specify the name of the asset. These names can be modified in the build.nmml file found in the example project. FlashPunk uses class names if I remember right.

Input.define requires the keys to be passed in as an array. For example: Input.define("left", [Key.W, Key.LEFT]);

Haxe properties work a bit different than AS3 but for the most part you shouldn't run into any issues with them.

The other functions are practically identical so you can use the FlashPunk tutorials with no issues. Hope that helps!

dodobird

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: HaxePunk VS FlashPunk
« Reply #2 on: June 28, 2012, 06:48:09 AM »
Thanks!

I'm excited to make my first HaxePunk game!  8)

BTW there are some errors in the your 101,102 tutorials, some things wouldn't compile or work without changing the code, and also copying the code directly from the site causes compilation errors because of some illegal invisible characters. To compile it I had to use a script that removes all non ASCII characters.

Oded.