Hello,
would it be possible to support the new CreaturePack in the current C2 runtime ?
Thanks.
CreaturePack for Construct2
Re: CreaturePack for Construct2
Hello,
I can take a look at it when I get the cycles. However, the WebGL runtimes all use a common core library so if you can find somebody with reasonable JS skills, I will be happy to point and guide that person in the right direction for porting.
Cheers
I can take a look at it when I get the cycles. However, the WebGL runtimes all use a common core library so if you can find somebody with reasonable JS skills, I will be happy to point and guide that person in the right direction for porting.
Cheers
Re: CreaturePack for Construct2
Thanks for the quick reply.
I know some JS (but got no webgl knowledge), so I tried to adapt the current C2 runtime to support the creature pack (CreaturePixiPackJSRenderer.js was helpful) .
This is what I've done so far : https://pastebin.com/VmvuCFv2
For my personal use, I only want the creature pack, so I deleted the json format support.
I test it, It works fine I guess, but the animations looks huge, I think because I'm missing this part :
I didn't find the API to port this part.
I tried using this:
https://github.com/kestrelm/Creature_We ... e.js#L3080
But it deals with regions and I have no idea what that is.
My question is how to fix the scale of the animations ?
I know some JS (but got no webgl knowledge), so I tried to adapt the current C2 runtime to support the creature pack (CreaturePixiPackJSRenderer.js was helpful) .
This is what I've done so far : https://pastebin.com/VmvuCFv2
For my personal use, I only want the creature pack, so I deleted the json format support.
I test it, It works fine I guess, but the animations looks huge, I think because I'm missing this part :
Code: Select all
// Compute Pixel Scaling
var target_creature = this.creature_manager["target_creature"];
target_creature["ComputeBoundaryMinMax"]();
var mesh_size_x = target_creature["boundary_max"][0] - target_creature["boundary_min"][0];
var mesh_size_y = target_creature["boundary_max"][1] - target_creature["boundary_min"][1];
this.pixel_scale_x = 1.0 / mesh_size_x;
this.pixel_scale_y = 1.0 / mesh_size_y;
I tried using this:
https://github.com/kestrelm/Creature_We ... e.js#L3080
But it deals with regions and I have no idea what that is.
My question is how to fix the scale of the animations ?
Re: CreaturePack for Construct2
Hello,
Great progress! Please look at:
https://github.com/kestrelm/Creature_We ... ime.js#L99
You can reference how the pixel scale is computed in the Construct 2 runtime and follow the same pattern.
After that, remember to actually scale your vertices:
https://github.com/kestrelm/Creature_We ... me.js#L145
Cheers
Great progress! Please look at:
https://github.com/kestrelm/Creature_We ... ime.js#L99
You can reference how the pixel scale is computed in the Construct 2 runtime and follow the same pattern.
After that, remember to actually scale your vertices:
https://github.com/kestrelm/Creature_We ... me.js#L145
Cheers