4,546

Views

Expert

Level

0

Comments

Modifying the Official Extensions

by Jon (Updated on 2014-02-12)


Notice: Due to an agreement with the OpenFL team, we have closed the source of our iAd, Game Center and Purchase extensions in order to respect their efforts to commercialize their platform through extensions. We should make clear that we are *not* using their extensions at this time. We still have kept the source open for other native functionality.

Contents

  • Introduction
  • Requirements
  • How to Install the Source
  • How to Build
  • How to Submit a Fix
  • Get the Sources

 

Introduction

As you may know, all "native" functionality in Stencyl is provided through extensions. This includes built-in features such as Ads, In-App Purchases, Game Center and a few other things.

We are now opening up the source to some of these extensions, in order to open the door to fixes and enhancements to these features. I also hope that having "real" extensions will also provide examples from which other extensions can be made.

Note: It helps immensely to be familiar with the basics behind native extensions before you start working with the official extensions.


Requirements

For iOS extensions...
- Mac
- Xcode 5 (with Command Line Tools installed)
- Haxe 3.0.1

For Android extensions...
- Haxe 3.0.1
- Nothing Else! If you can run games from Stencyl, you're all set.


How to Install (the source)

1) Grab the Stencyl engine from GitHub.

2) Follow the installation instructions posted there.


How to Build

Note: This only has to be done for iOS. If you're editing for Android, NOTHING has to be done. Just run from Stencyl.

1) Open Terminal

2) cd into the project directory for the desired extension

3) Run these 3 commands.

haxelib run hxcpp Build.xml -Diphonesim
haxelib run hxcpp Build.xml -Diphoneos
haxelib run hxcpp Build.xml -Diphoneos -DHXCPP_ARMV7

That's it! If those run without errors, you can run your game from Stencyl to see the changes. (You never need to restart Stencyl to see such changes.)


How to Submit a Fix or Enhancement

We prefer fixes / enhancements in the form of Pull Requests on Github.

Visit the Stencyl project on GitHub

 

Disclaimer: Use comments to provide feedback and point out issues with the article (typo, wrong info, etc.). If you're seeking help for your game, please ask a question on the forums. Thanks!

0 Comments

Be the first to make a comment!

Sign In to Comment