Spawning actor behind another actor (shadow)

UPUP Member Posts: 70
edited November -1 in Working with GS (Mac)
Hi all,
I'm just starting with Gamesalad, seriously love it so far!!
As a starter I'm going over the Pachinko tutorial but adding my own graphics
and other elements along the way o learn how things work.

Now I have a ball (actor) which is being spawn when I click a certain area.
All good so far. Now I added a shadow (actor) which should appear behind each ball spawn.

I got it to work for the first ball (constrains), looks great, but each ball spawn after the first one does not have the shadow behind it.
Now the shadow IS being spawn each time I click, but it's showing up behind the first ball only. It's piling up behind the first ball, making it's shadow appear to be darker and darker.

I've been messing with all the settings etc trying to make it work but I'm lost by now...
I must be overlooking something very obvious...

Hope my explanation is making sense ... Any ideas, anyone...??
Thanks a lot in advance!

Comments

  • UPUP Member Posts: 70
    Hi tshirtbooth, many thanks for your quick reply!

    Hhhmm... I don't like the idea of this being a bad idea though,
    having a little shadow under each ball makes it all look much more 'realistic'...
    First thing I did was adding a shadow to the main actor which obviously didn't work well with collision detection etc.

    I guess if I'd only have 1 actor with a shadow constraint to it, it would not be an issue concerning frame rate? (Like a shadow under the main character walking around)

    Would there be another way to pull this off though??
    A method/trick that doesn't influence the performance too much but gives me the more realistic look anyways?

    Also, how can I check my games performance? Check the frame rate etc?

    Just for the sake of understanding what's going on (learning the program),
    I do want to get this to work, although I'd most likely stay away from it in
    the future from any serious game creation attempt.

    Thanks again for your input!!
  • nulonulo Member Posts: 315
    why not just make the shadow already in the graphic of the ball?
    the actor for the ball will end up being a little bit bigger because of the shadow around it. but at least it wont affect the frame rate.
  • UPUP Member Posts: 70
    Hi Nulo, thanks but nope, doesn't look good, it was the first thing I tried and it was way too obvious.

    tshirtbooth, cool, thanks for the info! For now, since I just started playing around, I'm only using the free creator though, but I'll soon enough get the paid version granting me access to the viewer.

    Regarding performance, I also have a tiny shadow behind static objects (pegs) in the game
    which the balls bounce off from. Does this influence the performance just as much as shadows behind a moving object (ball)??
    The shadow behind the static objects are not using any constraints, they're just sitting there looking pretty, and I like pretty :-)

    Maybe I just had an idea...
    What if I DO put a shadow in the graphic itself, and somehow manage to make the area of collision detection SMALLER then the graphic?
    See where I'm getting at? This way the object would look like it's bouncing off the ball, not the shadow.

    Or is this again only possible by using 2 separate actors + constraints?

    Many thanks so far guys, this forum is incredibly responsive :-)
  • nulonulo Member Posts: 315
    so i imagine you have bigger shadows than the normal "drop shadows" from photoshop.
    you could make a different actor for the collision, but it would need the constrain also, and constrains suck for frame rates AND they have a small lag. so if you actor moves really fast, the one thats supposed to be constrained wont be exactly on top of it.
    so if you don't put the shadows on the graphic itself, forget the shadows.
    will just damage your frame rate and look laggy in really fast movements (specially with several constrain attributes)
  • UPUP Member Posts: 70
    To me, even the tiniest shadow will always be slightly bigger then the object casting the shadow (logical no? How else could you see a shadow if it ain't bigger then the object casting it?).
    So it'll always look like the objects colliding aren't really touching each other.
    I'm not sure what you mean with the 'normal drop shadows from photoshop' since to me that would also give the same result, shadow is bigger thus objects won't touch when colliding (but maybe I don't get your point)

    I noticed the slight lag in speed, but in this case it would not bother too much.

    Anyhoo too bad, I guess I've already bumped into a limitation I wasn't hoping for :-(

    Just for my understanding, is this a Gamesalad limitation or would this also be the case if I'd be coding everything from scratch in Objective C / cocoa? (sorry if it's a stupid question, I have no coding experience whatsoever)

    Another shadow related question then,
    if I'd have a character walking around (imagine viewing a game from top) with a shadow under the character, how could I have the shadow scale down when the character jumps??
    See what I mean? In reality the shadow would become smaller the further away an object is from the ground. Would that be possible 'easily?
Sign In or Register to comment.