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

Pages: 1 2
Ask a Question / Re: Trouble with layers
« on: March 18, 2014, 03:14:14 pm »
Has no one encountered this before?

Ask a Question / Re: Trouble with layers
« on: March 17, 2014, 03:45:05 am »
One of the actors in question doesn't even have any behaviors attached. It is only anchored to screen. Yet it shows on top of everything else even though it is in layer 0

Ask a Question / Trouble with layers
« on: March 15, 2014, 10:03:21 am »

I have some trouble with getting actors to show in the correct order. I have actors in Layer 0 that show in front of actors in Layer 1 that again show in front of some actors from Layer 2. This doesn't apply to all actors, which is incredibly annoying...

Has anyone encountered this before? Or do you have a solution?

EDIT: By the way. I only encounter this problem when running the game. When editing everything shows as I have planned...

Thanks Tobben. That might be a solution, I will have a look at the video tutorial :) Meanwhile, I am still open to suggestions if anyone else has some

Oh, I am sorry if I didn't explain well enough, but this is not what I need.

In my game I have 4 actors that stand in line waiting to be served by a salesman. When one is served he is killed, and after X time a new one is generated outside the screen before he moves right and stands in line behind the 3 others. But this salesman need also buy stuff so that he has something to sell the guys in line. To do this he enters the "shop". This is done by clicking a "shop" button. When the player presses this button, the game switches scenes from "main scene" to "shop"-scene. What happens then is that the actors I have waiting in line disappear as they are not initially in the scene when the game starts.  I need the same number of actors waiting in line when the player return from the "shop" scene.


In my game i sometimes need to switch scenes to stuff like "stats", "shop" and other stuff that isn't "gameplay related" in the meaning of the word. So what I need to eliminate is the removal of behaviorally created actors in my main scene while I shortly switch to, lets say, the shop. Because right now my main scene gets nulled when I switch scenes (not variables of course).

What is the best way to keep an actor on screen when switching scenes?


My game uses the "Actor Can't leave screen" behavior from StencylForge, but I wonder if it is possible to accomplish the same effect without the always/when updating block. Because, as my actors lie at the bottom of the screen being constantly pulled downward by gravity and the behavior setting their y position higher 60 times per second I imagine it will slow down my game at one point. Which I already think it does.

Also, when I enable "Debug drawing" it looks like the collision bounds for my actors are being less effected by the "set y position" block than the actor itself. Because it slowly slides on downwards, away from the actor it is attached to. It never fully leaves screen, but I get a offset that it about the size of the whole actor.

Ask a Question / Re: Killing and Creating Actors
« on: March 12, 2014, 08:59:17 am »
Those delays are just to let an animation finish before killing the actors. That doesn't seem to be the problem to me. That they are simultaneous is the point. I want all actors killed at the same time

What do you think about the "Cannot exit screen" behavior though? Is there another way to restrict an actor from leaving the screen than using a "when updated" block?

Ask a Question / Re: Killing and Creating Actors
« on: March 12, 2014, 08:13:57 am »
After double-checking my behaviors I realize that I have another "Always" block used. It is within a "actor cannot exit screen" behavior I downloaded from StencylForge. Could this be the reason I experience slow framerates after playing a while? Do you have any alternative suggestions to using an Always block for a behavior like this? I don't want this actor to be able to exit the screen.

Ask a Question / Re: Killing and Creating Actors
« on: March 12, 2014, 06:45:56 am »
Anyone know about flushing Recycled Actors Pool?

Ask a Question / Re: Killing and Creating Actors
« on: March 11, 2014, 04:29:20 am »
I made a custom event instead of the Always/when update, and it makes a lot of sense. I think it improved my framerate in the beginning on the game, but I still have trouble after 15-20 repetitions. I think it might have something to do with the actors piling up in the recycled pool.

Ask a Question / Re: Killing and Creating Actors
« on: March 09, 2014, 11:11:07 pm »
No one?

Ask a Question / Re: Killing and Creating Actors
« on: March 09, 2014, 07:58:01 am »

Does this help, or do you need the code that triggers 10tapped?

Here it is anyway:

Ask a Question / Killing and Creating Actors
« on: March 09, 2014, 07:44:19 am »
Hi, I have some problems in my game with killing and creating new actors. I have read through Stencylpedia, and found out that by default all actors are now recycled instead of killed and created. However, I believe this is causing low framerate in my game.

The idea of my game is that I have ten actors that are supposed to be clicked. When they are all clicked, they get killed and ten new actors of the same kind appear. This works fine and well until after the same process has been done 10-15 times. Then the game gets completely cluttered and slow. I am not quite sure why recycling actors should cause this as they shouldn't create more actors than the 10. But it seems that it is just created new actors and none of them are re-used. Is there a way to flush the recycled actors pool? Or do you just suppose this is caused by my code and that things are happening in the wrong order?

Old Bugs (3.x) / Re: Big problems with my game after Stencyl 3.0
« on: March 02, 2014, 07:31:22 am »
I re-did everything and I am now basically back to where I were before the update, but I am having big problems with the fonts though. They look very big and blocky and is almost un-readable. Has there been updates to the way fonts work?

Pages: 1 2