Stencyl 3.4.0 is now out. Get it now!

Ghost Song (back on Stencyl -- Warning, big GIFs ahead!)

I just wanted to say thinkyou for showing me what Stencyl is capable of. I started on my own project and I also want to stress Stencyl's limits.

twotimingpete

  • *
  • Posts: 1656
Thank you! I would be cautious in recommending Stencyl for a similarly sized project, because I'm finding myself dealing with a lot of anxiety over the project's size and how overladen it is and how it's starting to bog down (not the game at runtime, but the actual stencyl app) but much is possible if you are determined.

Here's a look at the molten shot, which can set enemies on fire:

https://gfycat.com/GrouchyYoungAsiansmallclawedotter

deepshock

  • *
  • Posts: 18
As someone else wanting to make a meaningful game in Stencyl, this is inspiring as all get-out. I'll keep this in my sights.



NobodyX

  • *
  • Posts: 1167
Whoa, zooming the camera with a shader?? Funky!

I've played around with
Code: [Select]
Engine.engine.master.scaleX = some number;
Engine.engine.master.scaleY = some number;
and it works well, except for the fact that it zooms the HUD as well. I suggested being able to set the scale of specific layers independently, to avoid this. I don't know if it would be an easy fix or not for a Stencyl dev (or maybe you can do that already and I don't know), but to me it seems like the shortest way to get proper zooming in Stencyl, I dunno.
“If you wind up with a boring, miserable life because you listened to your mom, your dad, your teacher, your priest, or some guy on TV telling you how to do your shit, then YOU DESERVE IT.”
― Frank Zappa

LIBERADO

  • *
  • Posts: 2141
I've played around with
Code: [Select]
Engine.engine.master.scaleX = some number;
Engine.engine.master.scaleY = some number;
I tried this, but it is inaccurate and difficult because we have not a formula to keep centered on the screen the exact point of the scene on which the camera will zoom in/out. Do you have such formula?
   
I use "engine.setZoom(some number);".
   
Both methods have drawbacks and don't completely fill the screen when zooming out.  :(

« Last Edit: February 02, 2017, 12:40:03 am by LIBERADO »
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

yoplalala

  • *
  • Posts: 1369
and it works well, except for the fact that it zooms the HUD as well. I suggested being able to set the scale of specific layers independently, to avoid this. I don't know if it would be an easy fix or not for a Stencyl dev (or maybe you can do that already and I don't know), but to me it seems like the shortest way to get proper zooming in Stencyl, I dunno.

Engine.engine.isHUDZoomable = false;
engine.setZoom(some number);

It will be quite difficult to have different zooms for different layers.
We have to think about the  "mouse over event".  ( this should be ok)
And we have to think about collisions too. ( I have no idea what will happen, if  box2d and simple physics will act the same)

LIBERADO

  • *
  • Posts: 2141
Engine.engine.isHUDZoomable = false;
engine.setZoom(some number);
This still zooms the drawn texts, which is an important problem because in any game we need to draw at least the score texts. I have to use Labels to prevent the texts from being zoomed.

« Last Edit: February 02, 2017, 05:06:25 am by LIBERADO »
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

yoplalala

  • *
  • Posts: 1369
Oh hadn't thought about this. I vever use drawn text.
So we should have an option for the drawn text on the screen. Is it the same with the draw text on the layer ?
Wasn't there a way to draw on a layer ? If we are able to draw the text on the layer hud, maybe it will work.

LIBERADO

  • *
  • Posts: 2141
When I use the block to set the drawing to the layer of an actor anchored to screen, the text is still zoomed.
Only when using Labels the text is not zoomed.
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

NobodyX

  • *
  • Posts: 1167
I tried this, but it is inaccurate and difficult because we have not a formula to keep centered on the screen the exact point of the scene on which the camera will zoom in/out. Do you have such formula?
Yeah I figured it out for myself a long while ago, it's really simple! The key is "1/scale", which you multiply by half of the screen width and height and then subtract that offset from the regular cam position. So like "x of camera = wherethecameranormallyis -  .5 * screenwidth / scale" (and then the same idea for y, obviously).
https://gfycat.com/QualifiedDistantKissingbug
As you can see it works, it jitters a bit though... I think it's because the camera position is always rounded to a pixel. But that's a minor concern at this point I think.

Both methods have drawbacks and don't completely fill the screen when zooming out.  :(
Oh yeah, tiles don't draw properly work when zooming outwards. Which is a problem but I guess I didn't mention it because I was thinking more about the bare minimum of getting it to work for a real game (where at least you can zoom in).
Engine.engine.isHUDZoomable = false;
engine.setZoom(some number);
Oh nice, thanks! So... I guess if the problem with drawn things like text being resized can be fixed, then Stencyl will have useable-for-a-real-game zooming?????? I know zooming has been brought up a ton in the past, and I think if we're this close maybe it needs to finally become a known feature with its own design mode blocks.
“If you wind up with a boring, miserable life because you listened to your mom, your dad, your teacher, your priest, or some guy on TV telling you how to do your shit, then YOU DESERVE IT.”
― Frank Zappa

twotimingpete

  • *
  • Posts: 1656
This weekend was fun.  Someone planted the idea of having ragdoll physics in the game -- for the corpses of enemies -- in my head. Initially I wasn't sure what to think because I'd never used joints and had no idea how to create them in scripting. A quick search yielded captain comics' joint extension.

It looked simple enough, so I gave it a shot. First thing I did was make a quick test to familiarize myself with it and determine whether it would be doable. I used some spare generic monster gib graphics I had to construct a ragdoll.



This was promising and was done using resolute joints and setting their limits. It's a little tedious setting up because there's no visual way of gauging all of the offsets and determining how and where joints should be placed without a lot of trial and error-- Tedious, but not impossible.

Next I constructed another ragdoll to proper scale and using proper graphics for one of my humanoid enemy types.



--

Next I did some tests in an actual game level just to see if they would impact performance or cause anything weird to happen. I made it rain men.

Then to try spawning them in context:



I did a lot of experimentation to try and make them fall over in more interesting ways. They can also break apart (by destroying the joints) if there is a lot of overkill or if certain weapons are used.



And that was my weekend. Super fun stuff -- I've noticed that in some cases the ragdolls can freak out when resting awkwardly on the ground and once even crashed the game. I'm still not sure why and I'm hoping it can be sorted later -- In the mean time I've taken some measures to try and make sure they don't rest too awkwardly (for instance, the arms tend to break off when they hit the ground to stop this from happening).

« Last Edit: March 20, 2017, 03:26:34 am by twotimingpete »

LIBERADO

  • *
  • Posts: 2141
The result is spectacular, I cannot stop watching it. Don't forget to disable the CCD in the enemy body parts.

I've noticed that in some cases the ragdolls can freak out when resting awkwardly on the ground and once even crashed the game. I'm still not sure why and I'm hoping it can be sorted later
Once the enemy is resting on the ground, you could destroy all its joints and immediately replace all its body parts with "Minimal" or "Simple" actors which have no collision shapes and are set to "Cannot Move".
This will solve your problem and greatly reduce the impact on performance.

« Last Edit: March 20, 2017, 03:10:23 am by LIBERADO »
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

twotimingpete

  • *
  • Posts: 1656
thank you!

making and inputting a second actor for every individual body part would just be a lot of extra legwork. I'd hope to be able to avoid that.

Alternatively I guess  I could just switch their animation to one without a collision shape at the same time as I lock them from any movement.