flash.Memory patch to switch from alchemy to byte array
201 views
Skip to first unread message
Sam MacPherson
unread,
May 31, 2012, 6:56:02 PM5/31/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to haxe...@googlegroups.com
This is message to all of you out there who are developing with Stage3D and Domain Memory (aka Alchemy) with Haxe, but don't want to be locked into the license agreement (http://www.adobe.com/devnet/flashplayer/articles/premium-features.html) with adobe. If you have been using domain memory for a large project and don't want to bother with re-writing thousands of lines of code then feel free to apply this patch to std/flash/Memory.hx.
This will use an actual byte array instead of domain memory which will of course be slower, but it does get you out of the license agreement. To use the above patch simply replace Memory.hx and compile with the "-D flash_no_alchemy" flag. I haven't tested it other than just running my game so let me know if there are bugs.
Cambiata
unread,
Jun 1, 2012, 10:47:08 AM6/1/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to haxe...@googlegroups.com
Nice job, thank you Sam!
Why don't you write another patch that could do the opposite? I have a lot of ByteArray solutions that I would love to run using alchemy/Memory..! :-)
tom rhodes
unread,
Jun 1, 2012, 11:18:07 AM6/1/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to haxe...@googlegroups.com
ha, i'm looking at some old animated gif encoding code i need for a project that is slow as hell even with ByteArray, the opposite would be awesome ;)
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to haxe...@googlegroups.com
Np. Doing the opposite is definitely do-able, but would require a bit more work due to memory management issues. Since there is only 1 "byte array" for domain memory a memory manager needs to be built to handle allocation/deallocation/fragmentation/etc. It's an interesting thought though.
Cambiata
unread,
Jun 1, 2012, 11:30:20 AM6/1/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to haxe...@googlegroups.com
Wow. :-)
Tarwin Stroh-Spijer
unread,
Jun 1, 2012, 3:14:54 PM6/1/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message