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

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

Thank you so much Robin!

Cheers,

JBG

4
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

5
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

6
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

7
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

8
I to am having the same issue :(

9
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 :)

10
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

11
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

12
Thank you so much!

JBG

13
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

14
Ask a Question / Re: Simulator won't work anymore?
« on: November 01, 2017, 05:08:48 am »
Looks like I can only read the file, and not edit it. It asks me if I would like to unlock it, but then it comes up saying that I cannot edit the volume. I tried looking online for a solution, but to no luck. Is this a normal thing?

Cheers,

JBG

15
Ask a Question / Re: Simulator won't work anymore?
« on: October 31, 2017, 04:25:59 pm »
hmmm, when i open that file, this is what shows (attached). Looks similar to what you have suggested, so I'm not sure what else to change?

JBG


Pages: 1 2 3 ... 6