Stencyl 3.0 Compatibility With Stencyl 2.x

Stencyl LogoSo you may be wondering — is Stencyl 3.0 compatible with 2.2, 2.1, and 2.0 projects?

The short answer: Yes! It is reverse compatible with previous versions.
The real answer: Mostly!

As the Haxe programming language is being adopted, you will have to rewrite your ActionScript 2.0 / 3.0 code into Haxe programming language.

This can be pretty easy to do…Or more complicated, depending on what you had setup in the first place.

Everything else more-or-less converts fine or requires just minor tweaks.

You will notice that a lot of 3.0 projects will run even more smoothly in fact once converted into 3.0.

However, the release is still far away. Some bugs are holding it up right now and thus it remains a private beta.

Do not expect Stencyl 3.0 to be available publicly for at least a couple more months.

Stencyl 3.0 Using Haxe Programming Language

While Stencyl 3.0 is still not out yet (just available for Beta — subscribers only), they have released additional information on what to expect.
Stencyl Compatibility
For starters, Stencyl 3.0 now uses the programming language known as Haxe. This helps them unify the entire platform support, as Haxe can translate into Flash, JavaScript, C++, Java and C# easily.

What does this mean for you? An easier time writing code that works on all platforms. This language won’t be hard to understand for many people either — as it is very similar to both JavaScript AND ActionScript.

For people who DON’T program, then there’s good news too. This new language being adopted will allow for the Stencyl / Stencylworks team to release new updates for Stencyl at a much faster rate than ever before and there will be increased compatibility. Stencyl 3.0 is able to export to the following platforms: iOS, Android, Flash, HTML5, Windows, Mac, Linux

NME is also being used to redo the Flash API.

A lot of these changes to Stencyl 3.0′s framework will not be physically visible, but an all-important underlying change.

The Stencyl team has no set release date for Stencyl 3.0 yet, but they promise to give additional information next week on the update, though it will be pertaining Stencyl 3.0 IOS support.

Stencyl 3.0 Beta Update!

There hasn’t been too much news lately about Stencyl 3.0 and its progress towards being released to the general public.

At the moment, it has been under closed beta, which is available for paying customers / subscribers to download only — and this particular beta has been available since August.

Many nightly updates have been available to people since then and through lots of collaboration, Stencyl 3.0 is looking to be one heck of a fantastic release!

In a recent blog post, the following updates / upgrades / changes have been mentioned:

- Publish to iOS, Android, Flash, HTML5, Windows / “Metro”, Mac, Linux.
- Unification – 1 engine, 1 programming language
- Framework for building native and cross-platform extensions to the engine.

Mobile Workflow
- Test on iOS without going through Xcode
- Publish all games directly from your computer. (except iOS if not on a Mac)
- Test iOS apps on Windows (without remote builds)
- Atlases are optional. If you use them, they come with much fewer strings tied
- No more MAC address requirement to test

- Automatic handling of arbitrary screen sizes
- Improved Ad Support (iAds, AdWhirl, Events)
- Improved Social Gaming API Support (Game Center, TBA for Android, Events)
- Improved In-App Purchase Support (Consumables, Restore Purchases, Events)
- Improved Native UI Support (Keyboard, Swipe, better Joystick, Alerts, Vibrate)
- Uniform handling of mouse and touch events
- Improved handling of multi-touch and gestures

- Improved Performance on all platforms
- Simple Physics Mode – opt out of physics for better performance if you don’t need it
- No more “works only on Flash” features. All core features work everywhere.
- Blend Modes
- Full Screen Mode for Flash & Desktop

- Stencyl is now translated to more languages
- Improved Font Support / Draw international characters in-game
- Improved Sound Playback (Gap Free MP3 Playback, more supported formats)
- Map multiple keys to a control
- Universal Log Viewer

That’s a nice, hefty list of good updates! Some people have reported their games running up to 400% faster in the new release!

So all of that is nice, but more importantly, when is it being released?

As per their blog post, they are expecting a Quarter 4 (Q4) release — so Stencyl 3.0 would be available anywhere from November to some time in December. Realistically, that is not that far away!

Though they haven’t mentioned the specifics, the programming language within Stencyl is being overhauled as well. They have promised to release more details on this specific aspect of Stencyl 3.0 within the upcoming week or so — and we’ll do our best to report on it here!

Solve: Bug With Enabling a Deactivated Behavior

Recently, I encountered a pesky error with Stencyl.

I had an actor with a follow behavior that I wanted to enable after 2 seconds of being created. This means that the actor would start with the behavior disabled under its list of behaviors. The code for doing this is so simple — yet it would not work at all.
Enable / Disable Behavior - Stencyl
So what’s the problem here? Well, it would seem the behavior needs to actually run before it can be disabled or re-enabled later AND the behavior being disabled needs to get passed the “Created” event stage before its on/off state can be changed. What’s this mean?

It means that…
– Behaviors CANNOT start out disabled/deactivated and then be enabled/activated later
– You CANNOT deactivate the behavior immediately when it’s created

Fortunately, there’s an easy solution for it — though depending on what you want to do, it may not work for you as nicely as it did for me [though you can in fact make this more elaborate to do so].

The Solution:
– Have the behavior activated by default
– Disable the behavior AFTER a brief pause (i.e. 0.1 seconds)
– Re-enable at your own convenience

Check out the image in this post to see an example of what I’m talking about. Hopefully it helps!

Just to be clear — I was trying to make an actor NOT follow a character until after 1 or 2 seconds. After implementing this solution, it now works.

How to Solve: Tiles Not Showing Up On Scene

Stencyl SceneSometimes in Stencyl / Stencylworks, you’ll add tiles to a scene, preview it, and then see a blank scene or a scene with the newly added tiles missing from it. There are two primary reasons that this happens.

Case 1: The tile size is not the same size as your other tiles (i.e. 16×16 instead of 32×32)
Case 2: the tile sheet is too large for Stencyl or Flash to handle (there’s a limit!)

The solution to case 1? Simple: Resize the tilesheet. If it’s too small [and in the case of 16 x 16 pixels] then increase it by 200% for width and height or by whatever percent will have it match your tile size.

The solution to case 2? Split the sheet into multiple pieces. Be sure to keep the dimensions correct so that the tilesheet fits and loads correctly into Stencyl.

So if your game tiles aren’t appearing, that may be why!

How to Solve: Can’t See Atlas Panel – Blinks and Closes

Stencyl Logo
Can’t see Atlases on the recentl Stencyl 2.2 update?

This is a common problem. Luckily, it has been resolved by the Stencyl / StencylWorks team!

Simple download the newest nightly build to solve it. Easy solution huh? How’s that for help!

If you have any questions, then please comment here or make a post on the forum.

An Example of Using ActionScript In Stencyl: MultiLine Text

Make a behavior in Stencyl that asks the user to enter text into a box? For example — displaying a message on the screen. Ever wish you could make it so that users could enter multiple lines of text? That requires a bit more thinking and gives us a good opportunity to talk about implementing raw ActionScript into Stencyl!

ActionScript 3 Stencyl Example

The above example uses a Text Attribute called Text to Write (the internal name, which we use in ActionScript 3, is TexttoWrite). The user writes a message there and if they want text to go on the next line, they write “\n” (without quotes). The ActionScript 3 code reads the text and looks for the text “\n” and replaces it with a real linebreak, as stored in myPattern so that when the font / text is displayed and written on the screen, it’s on multiple lines. Below is an easy, copy-pastable version of the code.

var myPattern:RegExp = /\\n/g
_TexttoWrite = _TexttoWrite.replace(myPattern,"\n");

Easy programming, huh? And it shows a nice example of how ActionScript can work with Stencyl nicely.

Note that the idea for this post came from the “Text Actor” behavior on StencylForge.

Video: Story of a Game Engine – Indie Developer Notebook

Here’s another video guys — of Alistair Aitcheson talking about physics engines he’s made and how they’ve evolved.

He speaks of their design and cites examples in games such as Sonic.

The focus overall, is 2D platformer physics engines. He used Blitz Basic and then moved to XNA.

Stencyl makes use of Box2D to deal with all physics-related activities.

Video: Indie Game – The Movie

This movie came out recently — Indie Game: The Movie.

It’s actually very interesting. Famous indie game developers were interviewed and had their progress tracked as they went through the release of their game, were actively working on it for demo, and also reflecting on the post-release.

It shows Edmund McMillen and programmer Tommy Refenes during the release of their game Super Meat Boy on Xbox Live, as well as Phil Fish – creator of FEZ, and Jonathan Blow — the creator of Braid.

They all talk about the stress they went through, problems encountered, their ideas and thought processes behind the game, as well as level design.

This video shows that indie game developers can be successful and should not feel discouraged because of all the competition. Do note though that the movie tries to seem overly-dramatic at some points, which is okay since it spruces things up more.

Be sure to watch it if curious. It may give you inspiration, follow Stencyl users!

Stencyl & Windows 8, Windows 7, Vista, Linux, Mac, etc.

Windows, Linux, Apple / Mac
I’ve had the liberty of being able to test Stencyl / Stencylworks with many different operating systems.

Windows XP — Works great
Windows 2003 — Works fine!
Windows Vista — Works perfectly. May encounter UAC / User Account Control message.
Windows 7 — Works fine. Run as administrator to avoid possible writable directory issues.
Windows 8 — I used consumer preview / cp rather than developers preview, but the result is the same. Run as an administrator to avoid issues.

No matter which flavor of Windows OS you run, it’ll work well.

While I have not used Linux or Macintosh (Mac) with Stencyl, it is widely said that certain small inconsistencies exist between Linux distributions / distros and on occassion also with Mac OS X (i.e. Lion or Snow Leopard).