Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Justin

Pages: 1 2 3 ... 182
1
The latest version of the sdkmanager that can be downloaded through Stencyl unfortunately can't accept licenses.

See here for the manual steps you currently need to take to get the licenses accepted.

http://community.stencyl.com/index.php/topic,58484.0.html

2
Ask a Question / Re: PC Full Screen not using 2x scaled assets
« on: Yesterday at 10:57:27 am »
Zooming out to 67% to make it report 1920x1080 sounds like it's just tricking the screen size detection used by the website.

I'm not positive about this, but you might want to look at the "Make text and other items larger or smaller" link that's visible in your last screenshot in the first post.

3
Ask a Question / Re: PC Full Screen not using 2x scaled assets
« on: Yesterday at 09:47:43 am »
Are you using Windows UI magnification settings? Perhaps you have your UI set to a 1.5x scale. That might explain the game's reporting 1280x720 instead of 1920x1080.

5
Ask a Question / Re: How to set the API on Android to 26
« on: Yesterday at 01:14:18 am »
Quote
make sure you have the latest version of stencyl too

This is the important part. You cannot use anything higher than 22 with the version of Stencyl you're currently using. When you update, as corban mentions, you'll have a little work to do getting the android sdk set up.

6
Ask a Question / Re: Unable to add repositories.
« on: April 21, 2019, 11:15:40 pm »
You add repositories from within Stencyl.

http://dialogextension.com/guides/index.php?f=getting_started

7
Ask a Question / Re: How do you accept android licences?
« on: April 18, 2019, 06:10:32 pm »
Download the appropriate archive for your OS:
Windows
macOS
Linux

Extract it. Go to extracted folder and open "bin". Open a terminal inside the bin folder.

Replace [STENCYLWORKS] in the following command with the path to your Stencyl workspace, then run it.

Code: [Select]
sdkmanager --sdk_root="[STENCYLWORKS]/android-sdk/android-sdk-windows" --licenses

The output should be like this. Just say yes to everything.
Code: [Select]
Warning: File C:\Users\Justin\.android\repositories.cfg could not be loaded.
6 of 6 SDK package licenses not accepted. 100% Computing updates...
Review licenses that have not been accepted (y/N)?

8
Ask a Question / Re: What does "Dynamic -> Void" mean in this context?
« on: April 14, 2019, 08:46:55 pm »
"Dynamic -> Void" is a Haxe type notation for a function that accepts any value and returns nothing. (Argument1Type -> Argument2Type -> Argument3Type -> ... -> ReturnType)

In this case, it's complaining because it wants a function (Dynamic->Void) and you're giving it something else (KeyboardEvent).

If you want to add and then remove an event listener, you need to set a variable to your function, and then pass that same variable to your add/remove event calls.

Code: [Select]
var someFunction = function(keyboardEvent:nme.events.KeyboardEvent):Void
{
    //do stuff
}
Engine.stage.addEventListener(nme.events.KeyboardEvent.KEY_DOWN, someFunction, false, 2);
Engine.stage.removeEventListener(nme.events.KeyboardEvent.KEY_DOWN, someFunction);

In your case, since you're trying to remove the event listener from within the function you're defining, you need the function to be available at a higher scope. For example, as a class field. At that point, you might as well just add a function to your class and use that instead.

(This needs to be in a "custom code" event from the advanced events list.)
Code: [Select]
private function someFunction(keyboardEvent:nme.events.KeyboardEvent):Void
{
    if(keyboardEvent.charCode == 13)
    {
        Engine.stage.removeEventListener(nme.events.KeyboardEvent.KEY_DOWN, someFunction);
        _Response = _drawText;
        playSound(getSound(107));
        shoutToScene("_customEvent_Response");
    }
}

When you want to add this function, just call this:
Code: [Select]
Engine.stage.addEventListener(nme.events.KeyboardEvent.KEY_DOWN, someFunction, false, 2);

9
Ask a Question / Re: XML Cannot Build Block (or something similar)
« on: April 12, 2019, 05:26:15 pm »
Can't say anything without logs. If the problem is recent enough, perhaps you still have the logs from it. If you remember what day it happened, you can peek through your logs folder and take a look at logs from that day.

10
It's benign, no need to worry about it.

11
Ask a Question / Re: Help - iOS crash related to getFontHeight()
« on: April 09, 2019, 02:28:23 am »
Ah, sorry, I presumed it was already enabled for you. It should be enabled by default, but perhaps it's not behaving as expected.

12
Ask a Question / Re: Help - iOS crash related to getFontHeight()
« on: April 08, 2019, 07:38:26 pm »
Look at a few more lines from what you labeled as "crashes at" for a better idea. Copy it and paste it over if you're unsure.

Alternatively, you can also get something that maps more directly to the Haxe code by running the game in debug mode.

1. Ensure that "Run > View logs through game controller" is checked.
2. Run > Run App in Debug Mode (iOS).
3. Click "Game Controller" in the top bar, and go to the "logs" tab.

When the game would normally have crashed, it may or may not continue to crash in debug mode, but it should also print an error in the log. Click the error for more details in the bottom pane, and then you can click the blue links in that pane to see what code you're using, or what code from the Stencyl engine, is causing the problem.

13
Drawing used to be hardware accelerated on non-Flash platforms, using a specially written C++ rendering pipeline. Now it's not (except in a few rare cases, like just drawing a rectangle). This change was made on OpenFL's side around 4 years ago in order to unify more code under a single codebase. The manually coded hardware-accelerated graphics were dropped in favor of the Cairo library, which has better parity with what's possible with the Flash API, but unfortunately, it's all done in software (using CPU, not GPU).

https://www.openfl.org/blog/2015/06/08/openfl-3-1-brings-on-the-graphics/

This was one part of a general movement on OpenFL's side to unify all the code for different platforms in a single codebase. While this transition was happening, there was the possibility to use OpenFL's "legacy" mode or "next" mode. Stencyl stuck with legacy mode for as long as that choice was available, due to various issues with "next".

It was still possible to access the old, hardware accelerated code, until OpenFL 4 was released. The Stencyl 3 release line was the last that included that legacy code.

https://www.openfl.org/blog/2016/07/11/openfl-4-is-live/

In the first link, you can see that Cairo was touted as "faster" and "more accurate" than the hardware renderer. That's likely true in some cases, but given the blocks available in Stencyl, that's not likely to hold for the use cases of most of our users. However, the best I could do to increase drawing performance without breaking the API was to cache the drawing from the previous frame.

If the drawing doesn't change each frame, it doesn't need to be re-drawn. If the drawing changes each frame (a vignette that closes and opens on a scene, for example), it needs to be redrawn every frame.

Cairo does have an OpenGL backend (meaning it would be hardware accelerated), but for various reasons, that's never been deeply looked into on OpenFL's side. It's possible that if that path opens up, we may be able to regain some of the lost performance. Until then, if you can somehow recreate your effects using actors, the Image API, or shaders, the performance should be better.

14
Yeah, the first link I posted in this thread is the Haxe manual. Here's the main page.

https://haxe.org/manual/introduction.html

From there, you can also click on "Learn Haxe" in the top menu bar for more content.

15
Oh, I see, the problem is you don't want a hardcoded name. You want a name passed in through a variable. In that case, you can use reflection.

Code: [Select]
function jsonReturnValuesForKey(myKeyValue:String, myJSONString:String){
    var json = haxe.Json.parse(myJSONString);
    return Reflect.field(json, myKeyValue);
}

https://api.haxe.org/Reflect.html#field

Pages: 1 2 3 ... 182