Dev Diary - Comics World: Spies in Trouble

SadiQ

  • Posts: 1770
Inside the Drawing Event (always) I am doing a "Create Region at..." for each animation, which is 5 at the moment, and then I am asking if the player enters that region (another event).

So you're effectively creating 60 regions/second??
Why not create 1 region in a When created event, then check when the player enters that region...then check what's the current animation for the light actor...then just perform your collision code based on that animation ???
Wouldn't that work??
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

gfalcaor

  • Posts: 279
Inside the Drawing Event (always) I am doing a "Create Region at..." for each animation, which is 5 at the moment, and then I am asking if the player enters that region (another event).

So you're effectively creating 60 regions/second??
Why not create 1 region in a When created event, then check when the player enters that region...then check what's the current animation for the light actor...then just perform your collision code based on that animation ???
Wouldn't that work??


Sorry.. I did explain it wrong!!

I use a "Do every N Seconds" (not a Drawing - always).
And that seconds being 3. So: Do every 3 Seconds.
In that behavior I do have a control, if it will increase or decrease the beam.
And, on each step I do change the animation and the region of it.

But thats the point...
I am worried about all those regions creation affecting the performance on the game.

I am avoiding collision because if I do use it, the player will never enter the light.
It will be "pushed out". Right? Collision does not allow two actors at the same space. Right?
So you will never see the actor inside the light.
Thinking about it I am starting to discard at all the collision behavior for it.

So:
Collision may be the best for performance, but not for the objective of the behavior.
Or is the way its currently implemented a "good practice" in matter of behavior performance (Do every 3 Seconds)?

I will try to print the behavior code and include it in here to be more visually effective.

« Last Edit: November 25, 2013, 10:56:16 am by gfalcaor »

Follow Me

SadiQ

  • Posts: 1770
My post was meant to be more of a "why use multiple regions? can't it be done with only 1?" type of question.
And yes..a little peek at the code would be nice :)
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

gfalcaor

  • Posts: 279
My post was meant to be more of a "why use multiple regions? can't it be done with only 1?" type of question.
And yes..a little peek at the code would be nice :)

Ahhh...
I use multiple regions because the camera has multiple bean formats.
Imagine a camera and a beam (like the one I shown before).
Now, imagine the camera rotating, going left and right. Searching... but on a 2D scenario it will go from foreground to background (if it makes any sense...).
ok?

So, the beam will increase and decrease its size.
For a puzzle you can imagine that when the beam is 100% decreased (not showing at all) is the moment when the character may pass by it.

For now I am using 5 different stages for it:
1st - Total opened beam.
2nd - almost total opened.
3rd - middle range.
4th - almost closed.
5th - total closed (not showing at all).

And then it goes up (5th, 4th, 3rd...).

If I keep only the first region as the "detection region" it will be strange, as the beam may be almost closed and the detection range wider than it.


Trying to exemplify it:

/________\   - Full Beam

  /_____\

   /___\

     /_\
 
    NONE     - Closed Beam

It will not be vertically as the example above.
It will be on a diagonal angle. So it will giving you the impression of the camera moving to the side (looking away).

That way I need 4 regions of detection and the last one with no detection at all.

Right?

« Last Edit: November 25, 2013, 11:39:24 am by gfalcaor »

Follow Me

thinkster

  • Posts: 149
You could make the light a sensor, then it wouldn't push the player. But it could still detect the collision.

Check out the info on sensors here http://www.stencyl.com/help/view/collisions-and-groups/

gfalcaor

  • Posts: 279
You could make the light a sensor, then it wouldn't push the player. But it could still detect the collision.

Check out the info on sensors here http://www.stencyl.com/help/view/collisions-and-groups/

Thanks a lot Mate...
Thats the reason I did create this topic!!!

Not only may I get some help from you guys, but maybe I may help someone who needs some behavior that I have already done.

I think that sharing knowledge is a great tool, for everyone.

I will try later (probably tomorrow) to change the behavior so it uses the collision as sensor!
Probably you did solve my issue!

Thanks!!!

« Last Edit: November 25, 2013, 01:20:23 pm by gfalcaor »

Follow Me

gfalcaor

  • Posts: 279
Walking Sprites / Frames

Quick question:
How do you guys draw your sprites for movements?
Do you use paper and pencil? Or you do draw directly on the computer?

I am using paper and pencil. Then I do scan it and finish the art on Photoshop.
I am attaching an eight frames movement draft that I did create for walking.

Its very clear, almost white, because I do print it and then I use pencil to draw on top of it. Afterwards I apply Nanking on it.

So, use it as a draft for your drawings.
Its only an example that I do work better later on, so don't mind the line traces on it.



Bellow is a "In Progress" / "Work In Progress" animation that I am creating for my game. Still in draft as you may realize (will update as the animation develops further on):



Regards

« Last Edit: November 27, 2013, 01:15:30 pm by gfalcaor »

Follow Me

gfalcaor

  • Posts: 279
You could make the light a sensor, then it wouldn't push the player. But it could still detect the collision.

Check out the info on sensors here http://www.stencyl.com/help/view/collisions-and-groups/

Just a quick update:
That sensor tip did solve my issue.
Now my camera detection behavior is working like a charm!

Thanks again!

I am a little late on the updates because I am doing some "art" / graphics changes, so it takes a little longer, as I am not a designer / artist.

Follow Me

ipe 369

  • Posts: 1001
The walk animation is nice, but his feet never leave the floor. If you're planning to trace over it in photoshop, it'll look like he's sliding his feet across the floor, not walking. i like it though:)

gfalcaor

  • Posts: 279
The walk animation is nice, but his feet never leave the floor. If you're planning to trace over it in photoshop, it'll look like he's sliding his feet across the floor, not walking. i like it though:)

You are right.
When I did include it into my game, some characters seemed to be walking like Michael Jackson's Moonwalker. Sliding on the floor.

Also, if my character moves too slow - patrol guard for instance-  I had to cut off 2 frames. I did cut frame 4 and 8. But I guess thats a rule for all animations. Specially for "comic" characters (see bellow).

I will try to raise the feet from the floor - using photoshop - on some frames, hope the result gets better.

I am saving the animations in my machine, I only need some spare time to create the animated GIFs, doing so it will be easier to demonstrate and compare the evolution.

Here is a picture of one of my characters on Idle Position:



It was taken from a cell phone, so please dont mind the lack of quality on it. It is still under progress. As soon I finish it I will include a better picture of it in here.

« Last Edit: December 09, 2013, 06:09:50 am by gfalcaor »

Follow Me

gfalcaor

  • Posts: 279
By the way...
Do you guys know a good software to create animated GIFs?

The online ones does not create a good GIF (dont know why), even If I have a perfect canvas one - all frames with the same canvas.

I want to demonstrate my moving character but I am not finding a good software to do animated GIFs.

Thanks!

Follow Me

Hectate

  • *
  • Posts: 4643
There's a simple one called gifcam that is easy to use.
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

gfalcaor

  • Posts: 279
There's a simple one called gifcam that is easy to use.

Thanks Hectate!
I did try to use it yesterday.
It seems to be good. But with one failure - My images were with transparency. Then it created an animated GIF with black background. :)

As it was late and I had to go to sleep, I did stop using it.
Maybe I will have to use it again, but filling the background with white color before creating the GIF.

Have you heard about LiceCAP?
I was searching on google just after I post my question.
It seems like a good tool, as it capture the screen and create a GIF from it.
So I can do the animated directly from the game. Seems to be a cool solution!

Follow Me

Hectate

  • *
  • Posts: 4643
There's a simple one called gifcam that is easy to use.

Thanks Hectate!
I did try to use it yesterday.
It seems to be good. But with one failure - My images were with transparency. Then it created an animated GIF with black background. :)

As it was late and I had to go to sleep, I did stop using it.
Maybe I will have to use it again, but filling the background with white color before creating the GIF.

Have you heard about LiceCAP?
I was searching on google just after I post my question.
It seems like a good tool, as it capture the screen and create a GIF from it.
So I can do the animated directly from the game. Seems to be a cool solution!
Not heard of LiceCAP; I'll look it up too. I've not experienced the clear background issue, that's new to me. As you say, you could fill it in advance, but you could also open it in a GIF editor and fill in the first frame with the background as well (GifCam saves space by only changing the parts of a frame that change, which means the background can be solid in the first frame and stay that way).
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

gfalcaor

  • Posts: 279
I will test that LiceCAP on the days to come.
If it works will be great, so I may demonstrate visually the things I am developing.

For instance, the camera behavior we did discuss earlier.
It would be really great!

Follow Me