OpenFL running slow on the Apple TV

I think this could be helpful to other developers willing to play around with tvOS.
I’m going to go over this with you just like if I had to do it from scratch.

I’m assuming you have Haxe 3.2.0 installed on a Mac. I’m still on Yosemite so I do not know if El Capitan could bring issues to my workflow.

First thing we get hxcpp running:

git clone https://github.com/tanis2000/hxcpp.git
cd hxcpp
git checkout tvos
cd ..
haxelib dev hxcpp hxcpp
cd hxcpp/tools/run
haxe compile.hxml
cd ../build
haxe compile.hxml
cd ../hxcpp
haxe compile.hxml
cd ../../project
neko build.n
cd ../..

Next up is our copy of SDL and Lime

hg clone https://[email protected]/santinelli/sdl
cd sdl
hg update tvos
cd ..
git clone https://github.com/tanis2000/lime.git
haxelib dev lime lime
cd lime
git checkout tvos
git submodule init
git submodule update --recursive
cd project/lib/sdl/include
mv configs ../
cd ..
rm -rf include
rm -rf src
cp -R ../../../../sdl/include ./
cp -R ../../../../sdl/src ./
mv configs include/
rm include/SDL_config.h
lime rebuild tools -v -clean
lime rebuild tvos -v -clean

At this point you should be able to go to your project folder and do an openfl update tvos -v -clean to get the XCode project for tvOS.

Let me know if that works for you or if you encounter any problem.

Cheers!

1 Like