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

Pages: 1 2 3 ... 6
1
Extensions / Re: Spine2D Extension - Create new [SpineAsset] issue
« on: April 03, 2019, 09:18:08 pm »
So I've managed to fix it.

Basically just used a game attribute instead, and it turned out that my spine export has some errors on it so it didn't export correctly (missing textures, hidden slots, etc.)

Cheers anyway :)


2
Hey All,

I have a question about choosing your spine asset...

A player can chose any character they wish, and based on their choice, it will use a NEW json file with a different name (i.e. different spine).

My question is; how do I update the "Create new [Spine]..." automatically when the player changes to a different spine character?

I see that it uses the actual name of the 'anything' attribute rather than the value, so I cannot use other attributes to as a substitute.

I've also tried using the "get actor value [attribute] for [self]" block, but it doesn't seem to work either.

Is there anyway I can do this correctly and efficiently?

P.S. all spine .json files use the same animations (i.e. "idle", "attack", "left", etc.)

Cheers,

JBG

3
Ask a Question / Spine2D - Performance Question
« on: March 05, 2019, 11:44:40 pm »
Hey All!

I have a question about the Spine2D extension (@robinschaafsma)...

I have a character in my mobile game which is broken into multiple pieces 8 ways (roughly 30 - 50 images). I eventually want to incorporate character customization, where the player can switch between different types of characters through the store (character skins). What would be the best approach for this?

A - To have all images in the one Spine2D skeleton. Doing it this way though, I'm afraid that it will lag like crazy when moving the character around and loading each image when needed.

Or...

B - Having multiple Spine2D skeletons which will act as each character skin.

Bear in mind that the character also has unique death animations (squished, sliced in half, electrocuted, etc.), so I would also have to have image skins which accommodate for these deaths as well.

The character will only change between skins when the game first loads and chooses which skin the player has chosen (similar to the custom jet pack system in Jetpack Joy-Ride).

Any advice on mobile optimization would be amazing!

Cheers,

JBG.

5
Extensions / Re: Spine2D Extension - Scaling for multiple devices
« on: February 17, 2019, 04:10:44 pm »
Awesome!

Thank you so much Robin!

Cheers,

JBG

6
Extensions / Re: Spine2D Extension - Scaling for multiple devices
« on: February 17, 2019, 02:49:55 pm »
Hey Robin,

Wow, I ONLY just realised there is a block called "current scale" which is exactly what I needed".... hahaha!

Since my Spine file was created at a size 4x the scale, I would essentially use the [3 / scale factor] which should technically give me the correct scale regardless of device being used?

Also, when it comes to collision bounds, does the box collider natively scale with the Spine scale, or would I also need to scale the collision bounds as well (i.e. create the box collider to the new scale size, or just set it to the original Width/Height of the Spine file)?

Thanks again!

JBG

7
Ask a Question / Re: Spine2D Extension - Scaling for multiple devices?
« on: February 17, 2019, 01:38:52 am »
This is the code for the Image API script to know which image to use based on the device scale...

------------------------

package scripts;

import com.stencyl.Engine;

import nme.display.BitmapData;
import nme.geom.Matrix;

class ImageUtil
{
   public static function scaledImg(name:String):BitmapData
   {
      if(Engine.IMG_BASE == "1x")
         return nme.Assets.getBitmapData("assets/data/ImageAPI/"+ name +".png");
      else
      {
         var toReturn = nme.Assets.getBitmapData("assets/data/ImageAPI/"+ name + "@" + Engine.IMG_BASE + ".png");
         if(toReturn == null)
            toReturn = scaleBitmap(nme.Assets.getBitmapData("assets/data/ImageAPI/"+ name +".png"), Engine.SCALE);
         return toReturn;
      }
   }

   public static function scaleBitmap(src:BitmapData, s:Float):BitmapData
   {
      var newImg:BitmapData = new BitmapData(Std.int(src.width * s), Std.int(src.height * s), true, 0);
      var matrix:Matrix = new Matrix();
      matrix.scale(s, s);
      newImg.draw(src, matrix);
      return newImg;
   }
}

-------------------------

If there is something like this, but for Spine2D, I would love to know how to implement it :)

Cheers,

JBG

8
Ask a Question / [SOLVED] Spine2D Extension - Scaling for multiple devices?
« on: February 15, 2019, 10:10:30 pm »
Hey All,

(The original post is in 'Extensions which I believe is not the correct location for this question, so I shall post it here instead).

I'm currently using the ByRobin Spine2D extension, and am curious to know how to apply scaling for each mobile device. In the past I have used a 'Freeform' block for my images (image_API) to find any image with the file name ".....@1x.png", "....@2x.png", "...@3x.png", and so on based on the device used, which works perfectly! But I'm curious to know if there is a way to do this for Spine Assets as well. I have attached a few screenshots on what I have currently done for my spine assets. But if there is a way to use the correct scale for each mobile device, that would be awesome!

Cheers in advance!

JBG

9
Extensions / [SOLVED] Spine2D Extension - Scaling for multiple devices
« on: February 14, 2019, 03:11:23 pm »
Hey All,

I'm currently using the ByRobin Spine2D extension, and am curious to know how to apply scaling for each mobile device. In the past I have used a 'Freeform' block for my images (image_API) to find any image with the file name ".....@1x.png", "....@2x.png", "...@3x.png", and so on based on the device used, which works perfectly! But I'm curious to know if there is a way to do this for Spine Assets as well. I have attached a few screenshots on what I have currently done for my spine assets. But if there is a way to use the correct scale for each mobile device, that would be awesome!

Cheers in advance!

JBG

10
I to am having the same issue :(

11
Ask a Question / Re: Stretching an Actor based on Mouse X and Y
« on: September 05, 2018, 10:26:21 pm »
Thanks guys for your help!

The code I am using is below :)

12
Ask a Question / Re: Stretching an Actor based on Mouse X and Y
« on: September 04, 2018, 11:55:35 pm »
Glad to know I'm not the only one interested in this. Yeah, it would be something to do with the "grow" tween, but I'm not sure exactly how to program it.

JBG

13
Ask a Question / Stretching an Actor based on Mouse X and Y
« on: September 04, 2018, 03:11:00 am »
Hi there Stencylers!

A quick question; Is there a way to stretch an actor based on X and Y of the mouse while it stays in position?

Basically I have something similar to the old school Mario 64 game, where you can click on a part of the characters head and stretch it around the place, while that piece still stays in a same position.

https://www.youtube.com/watch?v=Nn-Rz6lBGW0

Any thoughts, or solutions would be greatly appreciated!

Cheers,
JBG

14
Thank you so much!

JBG

15
Hey Liberado,

Awesome work with these tools! Really love your stuff.
If I may, would I be able to try out an extension which moves an actor along a bezier curve, rather than draw one?

Cheers,
JBG

Pages: 1 2 3 ... 6