Anchored actors disappear?

superfried

  • Posts: 24
Hello

I am new to stencyl, but I have run into a couple of problems that are really simple, slowing me down and really infuriating. I have looked at lots of tutorials and can not work out what's wrong. I have two main issues. 1. When I attach an anchor to an actor and then test in flash the actor in question disappears. 2. When I set-up separate collisions for actors in different groups - ie. player hits hazard dies, player hits power-up actor and power-up actor dies - my player still dies in both scenarios. I know this is usually a problem with collision groups. I have also read that it can be due to the physics settings. For both items, other than the player, I stated they could not be moved.

I have included screen grabs. To make it simpler I have only used the default collision folders. The power-up has been assigned to tiles, the hazard has been set to actors and the main character to players. Since I have tried it again from scratch I was even wondering whether it maybe due to the wrong flash version installed or old version of Stencyl. I am using Stencyl 1.41.

Any help will be greatly appreciated before I destroy my mac in frustration!


Superfried

superfried

  • Posts: 24
These problems are driving me mad, please help?

I have searched the forum and online and when I follow tutorials the same things happen even if I start again from scratch??

superfried

  • Posts: 24
I found one post that mentioned the collision detection could be attached to a different group to the actor. I checked this and this was not the problem.

Consequently, I have created a temporary work around for the actor collision issue. For now I have placed the death collision on the hazard rather than the player, although I am not sure if this method is as efficient and may cause me problems later.

See behaviour attached.

However, I still have not solved the anchor issue?

Any thoughts?

Alexin

  • *
  • Posts: 3132
Quote from: superfried
1. When I attach an anchor to an actor and then test in flash the actor in question disappears.
What do you mean by "attach an anchor"? Are you anchoring an actor to the screen?
What are the physics settings?


Quote from: superfried
2. When I set-up separate collisions for actors in different groups - ie. player hits hazard dies, player hits power-up actor and power-up actor dies - my player still dies in both scenarios.
Looking at the behaviors, you always kill the current actor "self". If the power-up doesn't die, then perhaps the behavior isn't attached to it, but to the player instead.


Post the game too, if you want (or share it on Forge).
"Find the fun"
alexin@stencyl.com

superfried

  • Posts: 24
Hi Alexin

Thanks for your reply.

So, when I say attach anchor, yes I mean anchor actor to the screen. With regards to the physics I set it to can not move so that the other actors would not collide with it. Since you mentioned physics I also tried the other settings, can not be pushed/normal with the remaining settings constantly as no to rotate and gravity. However, on test scene in flash, after saving, the actor in question does not appear on the screen.

With regards to the collision groups, the pick-up object does die as intended and the player does die when it hits a hazard as intended. The problem is that the player also dies when it hits the pick-up even when the blocks do not instruct it to, and the two collision items are in separate groups.

I am sure it is something really simple, so any light you can shed will be gratefully received.


Superfried

Alexin

  • *
  • Posts: 3132
Make the anchored actor always simulate (Actor > Properties > Misc). There's a chance the actor is spawned offscreen and its behaviors aren't executed.


Verify the collision shapes for each animations, and for both actors, are in the same group as the actor itself.
"Find the fun"
alexin@stencyl.com

superfried

  • Posts: 24
Hi Alexin


Hows things?

Thanks for your help. So, I have managed to sort out the collisions and finally found out what was going on with anchoring. It was an off-screen issue, but this is where stencyl is really confusing as the scene does not start at the bottom of the screen area? To anchor the actors in question so that they appear at the bottom of the screen I need to place them half way up the scene. The game is designed so you scroll up vertically. This is not essentially a problem although it makes me think my settings maybe wrong? Please see visuals attached.

Two other problems have occurred. Firstly, when testing in ios the tiles will no longer animate. Is there a way round this?

The second is really strange. I have noticed that the software is degrading some of the graphics. In the attached visuals you can see the correct actor image and a degraded version that seems to appear at random for no reason? Have you seen this before?


Thanks in advance.


Superfried.

Alexin

  • *
  • Posts: 3132
I'm fine thanks.


By default, the scene "starts" at the top-left corner of the screen. It can start elsewhere if the camera is follows an actor placed at the bottom of the screen, for example.


I think animated tiles aren't available in iOS.


There was a problem with imported graphics that affected the the brightness of some colors. It's fixed now.
Does it always happen?


Can I see the game to investigate the degradation and anchored actors problems?
"Find the fun"
alexin@stencyl.com

superfried

  • Posts: 24
Hi Alexin


Thanks for getting back to me.

I have the camera following the main character, so that should not be a problem and the anchor issue is ok now.

The tiles not animating on ios is a big problem as the sea effect will be completely lost without it and I am guessing that using actors would be far too demanding on the processor.

I have also noticed that I am unable to change the timing of animation frames for tiles like you can for actors?

I am starting to think my idea will be too complex for me to develop. The control system I intended was for the tiles to be selected by the user and then for the player to follow the selected path. The idea is simple, but making it work is perhaps too complex for my limited brain!


Superfried

superfried

  • Posts: 24
Ok, so I swapped the sea tiles to actors. I was still getting about 30fps, but when I removed the foreground anim I am now back at about 60fps. So that is one issue dealt with.

I still wanted the cloud effect, but changed it to prevent horizontal anim and just used the parallax effects and repeat image to save on resources. Works well in flash, does not in ios. Then saw a parallax effect for ios in the forge which sounded great, but I do not see how it will work if you can no longer repeat the image?

To improve performance I was trying to kill actors as they left the scene. However, this does not work as this then also kills those that have yet to appear on the scene. I then saw the 'kill in pit' on an example game where it tells the actors to only kill themselves when they leave the bottom of the scene. Please see visual, but this only seems to work for some actors despite the same behaviours being applied to all?

Although the anchor situation seemed to be solved in flash, it is still an issue in ios. Logically speaking if the actor is set to always simulate and the camera is directed to the player which starts right next to the actors I am trying to anchor, they should appear even if it starts out of the screen boundary?

Another issue on ios is that when I set the background colour of a scene, it appears in flash, but reverts back to black in ios. Please see visual attached.

Could this all be to do with the simulator version of I am using? I am currently using version 4.3?

You mention sending you the game to check, how would I go about this?

Thanks in advance.


Superfried.

superfried

  • Posts: 24
Hi Alexin


Did you receive my email with a link to download the game?

In the interim I have been reading on the site re. versions of xcode. I am on snow leopard, but I have now upgraded to version 4.2 of xcode and I am now testing on the simulator in version 5 in the mobile game settings. Unfortunately this has made no difference to the bizarre disappearing actors. What is also strange is that when I placed a collision detection on them, they still prevent the player from moving into that area yet they are not visible? This would suggest that they are there, but I just can not see them? Could this be a layer issue? Not sure if that info. helps with the diagnostics?


Kind regards


Superfried

superfried

  • Posts: 24
Hi Alexin


Sorry about all the posts. Bizarrely the new xcode does seem to have now made a difference, after several tries and performing tests in a completely new blank scene, it then decided to work on the original scene? To make the actors appear anchored at the bottom of the scene I need to place them at the bottom of the screen boundary when your are viewing the very top of the scene. Strangely this does not place them in the same location in the flash test.

Another strange thing. The actors graphics still look degraded in the software and in the flash test. However, they look fine in the ios simulator?

Lastly, for some reason, if I change the background colour to a scene, it still appears as black in the ios simulator?

Thanks in advance.


Superfried

Alexin

  • *
  • Posts: 3132
I received your email but I've been busy. I didn't forget about the problems you are a facing and I'll get back to you as soon as I can. Sorry for the inconvenience.
"Find the fun"
alexin@stencyl.com

superfried

  • Posts: 24
Hi Alexin


No worries. Really appreciate your help so far, so please do not take any comments made the wrong way. I can imagine you are constantly inundated with with questions and problems.

As you were...



Superfried