Stencyl 3.4.0 is now out. Get it now!

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 - rob1221

Pages: 1 2 3 ... 409
1
It looks like a permissions issue as there is stuff like this earlier in the log:
Quote
java.io.FileNotFoundException: I:\stencylworks\games-generated\test\newgrounds.swf (Access is denied)

2
Ask a Question / Re: On Screen Buttons get stuck
« on: April 24, 2017, 07:14:38 pm »
I've used that behavior a few times before but I haven't encountered that issue, which makes it difficult to fix.  Is there a way to reproduce the problem consistently?

4
Ask a Question / Re: Error #1034: Type Coercion failed
« on: April 21, 2017, 02:55:06 pm »
It looks like you didn't select an actor type in your second image.

5
This issue was reported here: http://community.stencyl.com/index.php?issue=775.0

There was a change made in 3.4 that requires empty lists to be set to the "create new list" block, but sometimes it also affects non-hidden lists which is probably not intentional.  For now you can set all empty lists, whether hidden or not, to the "create new list" block before using.

6
Ask a Question / Re: New Game +, Is there a better way?
« on: April 20, 2017, 04:42:18 pm »
If you happen to be using lists or maps, make sure you're adding the "copy of ___" block so the attributes aren't referring to the same data.

7
Chit-Chat / Re: Steam Greenlight Being Replaced
« on: April 15, 2017, 08:04:01 pm »
They'll only go to itch.io if they can't afford the Steam Direct fee (which will be on the lower end according to Jim Sterling's video).  For me, I don't see the fee being high enough to deter me from publishing more games on Steam.

8
Ask a Question / Re: scene doesn't match resolution
« on: April 15, 2017, 08:59:15 am »
I should also mention that web games in Stencyl don't scale based on screen size.  You pick a size (1-4x of your game resolution) and that's the size it stays at.

9
Ask a Question / Re: scene doesn't match resolution
« on: April 15, 2017, 08:15:12 am »
Either your game resolution is too large or your scene size is too small.  Correct one of those depending on what result you want.

10
Ask a Question / Re: APK not building
« on: April 15, 2017, 06:54:03 am »
Quote
com.android.dex.DexException: Multiple dex files define Lcom/onemoreround/nightshiftv1/BuildConfig;
Try Run > Clean Project and see if that solves the problem.

11
There's no error logged at the end of the log file.  Also I'm curious why the toolset is spamming so many log messages.  I have never seen log files even close to that size before.

12
Shared Resources / Re: Some Custom Shaders
« on: April 13, 2017, 12:08:00 pm »
This shader displays two sets of bars that come in from opposite sides of the screen and cross each other to cover the screen.  It could be used as a scene transition.
https://gfycat.com/SimplePoliteHummingbird

Here are the properties of the shader that you can set:
enabled (bool) -- This is used to control whether most of the shader code is run.  It's useful if you want to disable the shader without needing to reapply shaders.  If not using the custom block it defaults to false so you'll need to set it to true first.
counter (float) -- This controls the current position of the shader and it must be 0 or higher.  Set this under the always/updating event or in a timer.  Increase to move the bars in and decrease to move the bars out.  The example GIF changes the counter by + or - 8 every 0.01 seconds.
direction (float) -- This is the direction (in degrees) that the first set of bars will move.  The second set moves in the opposite direction. (range: 0-360)
barWidth(float) -- This is the width of each bar.
red(float) -- This is the red value of the bars. (range: 0-1)
green(float) -- This is the green value of the bars. (range: 0-1)
blue(float) -- This is the blue value of the bars. (range: 0-1)

Shadertoy Code
Code: [Select]
bool enabled = true;
float counter = 0.0;
float direction = 45.0;
float barWidth = 20.0;
float red = 0.1;
float green = 0.2;
float blue = 0.4;

void mainImage(out vec4 fragColor, in vec2 fragCoord)
{
vec2 uv = fragCoord.xy / iResolution.xy;
    vec4 tex = texture(iChannel0, uv);
   
if (!enabled)
{
fragColor = tex;
return;
}

    vec2 res = vec2(iResolution.xy);
    float rad = radians(direction);
    float s = sin(rad + radians(180.0));
    float c = cos(rad);
    float start = res.x * abs(c) + res.y * abs(s);
   
    if (false) // for testing: false = transition out and true = transition in
    {
        counter = start - iGlobalTime * 500.0;
    }
    else
    {
        counter = iGlobalTime * 500.0;
    }
   
    float x = fragCoord.x;
    float y = fragCoord.y;
    float startX = x;
    float startY = y;
   
    if (direction >= 0.0 && direction < 90.0)
    {
        startY = y - res.y;
    }
    else if (direction >= 90.0 && direction < 180.0)
    {
        startX = x - res.x;
        startY = y - res.y;
    }
else if (direction >= 180.0 && direction < 270.0)
    {
        startX = x - res.x;
    }
    else
    {
        // no changes between 270.0 and 360.0
    }

    float offset = res.x * 2.0; // avoids inconsistent bars
    float rowFloat = abs((x + offset) * s - y * c) / barWidth;
    int row = int(floor(rowFloat));
   
    if (counter > abs(startX * c) + abs(startY * s) && row % 2 == 0)
    {
        fragColor = vec4(red, green, blue, 1.0);
    }
    else if (abs(res.x * c) + abs(res.y * s) - counter < abs(startX * c) + abs(startY * s) && row % 2 == 1)
    {
        fragColor = vec4(red, green, blue, 1.0);
    }
    else
    {
        fragColor = vec4(tex);
    }
}

Stencyl Code
Code: [Select]
#ifdef GL_ES
precision mediump float;
#endif

varying vec2 vTexCoord;
uniform vec2 uResolution;
uniform vec2 uResolutionUs;
uniform sampler2D uImage0;

uniform bool enabled;
uniform float counter;
uniform float direction;
uniform float barWidth;
uniform float red;
uniform float green;
uniform float blue;

void main()
{
vec2 uv = vTexCoord;
    vec4 tex = texture2D(uImage0, uv);
   
if (!enabled)
{
gl_FragColor = tex;
return;
}

    vec2 res = uResolution;
float scale = res.x / uResolutionUs.x;
    float rad = radians(direction);
    float s = sin(rad + radians(180.0));
    float c = cos(rad);
    float start = res.x * abs(c) + res.y * abs(s);
    float x = uv.x * res.x;
    float y = uv.y * res.y;
    float startX = x;
    float startY = y;
   
    if (direction >= 0.0 && direction < 90.0)
    {
        startY = y - res.y;
    }
    else if (direction >= 90.0 && direction < 180.0)
    {
        startX = x - res.x;
        startY = y - res.y;
    }
else if (direction >= 180.0 && direction < 270.0)
    {
        startX = x - res.x;
    }
    else
    {
        // no changes between 270.0 and 360.0
    }

    float offset = res.x * 2.0; // avoids inconsistent bars
    float rowFloat = abs((x + offset) * s - y * c) / (barWidth * scale);
    int row = int(floor(rowFloat));
   
    if (counter * scale > abs(startX * c) + abs(startY * s) && row % 2 == 0)
    {
        gl_FragColor = vec4(red, green, blue, 1.0);
    }
    else if (abs(res.x * c) + abs(res.y * s) - counter * scale < abs(startX * c) + abs(startY * s) && row % 2 == 1)
    {
        gl_FragColor = vec4(red, green, blue, 1.0);
    }
    else
    {
        gl_FragColor = vec4(tex);
    }
}

13
Ask a Question / Re: Big numbers
« on: April 13, 2017, 10:56:30 am »
I don't think there is a max value, but it loses precision at very high values.  Even for idle games this shouldn't be a problem.  Only integers hit a cap and start looping around.

14
Ask a Question / Re: Big numbers
« on: April 13, 2017, 09:54:13 am »
The attributes are already Floats, so you're probably converting to Int somewhere (the round block for example).

15
Ask a Question / Re: How to decrease flash game size?
« on: April 12, 2017, 05:57:27 am »
Who expects Flash games to be that small?  I've seen suggestions years ago on FGL to keep games under 10MB or 5MB.

All game engines contribute to file size in exchange for making things easier to do.

Pages: 1 2 3 ... 409