How to create height illusion

petrakebab

  • Posts: 34
HI - I am new to coding but learning fast (I think!).

My game is a top-down (birds-eye) view of a game where the character is thrown across the screen.

Does anyone know the best way for me to make it look like the character is higher in the air and then give the appearance of bouncing?

I am looking at the Grow self function to make the character bigger when higher but I only really have X and Y speed which makes it difficult to decide when to grow him and when to reduce him back to normal, as the character can be thrown different distances and speeds.

I use push self towards degrees at force to throw the character which works perfectly but means I don't know beforehand where the character will land etc...

Also can anyone explain the difference between all of the Tweening settings: back in/out, bounce out/in, normal etc - I can't seem to find this anywhere.

A good example would be this flash game: http://www.mousebreaker.com/games/hammerthrow/playgame

Thanks for anyone helping out there fellow stencylers.

IAP

  • Posts: 33
The easiest way to make an illusion of height is just adding shadow effect.
Just be careful of two things: the shadow effect should be carefully tweaked to look appropriate, and too many effects can hurt the performance.
Sorry for my English, it's not my first language :)

petrakebab

  • Posts: 34
Yes I think shadows would be useful. What would the best way to incorporate shadows into my game? I could only see 1 resource pack with various special effects but the 'shadow manager' behavior doesn't run properly for some reason once downloaded? thanks.

Leaufai

  • Posts: 327
Wouldn't the shadow effect be reasonably cheap performance wise? You could make the shadow a seperate lightweight actor linked to the character's actor.

captaincomic

  • *
  • Posts: 6108
Yes I think shadows would be useful. What would the best way to incorporate shadows into my game? I could only see 1 resource pack with various special effects but the 'shadow manager' behavior doesn't run properly for some reason once downloaded? thanks.
I guess you're talking about the Eye Candy Pack. The Shadow Manager alone doesn't do anything. You also need to attach the Drop Shadow behavior to your actors. The Shadow Manager allows you to specify a layer at which the shadows are drawn (without it the shadows are drawn at the same layer as the actors).

Nomosoft

  • Posts: 122
Manipulating the size of the object/player and adding a shadow that also changes size during the object's flight should give the illusion you're looking for. As for when to make the object bigger or smaller, you have a couple of simple options:

1) Pre-calculate the time and distance of the throw, then grow for half and shrink for half.
2) While velocity of the object is increasing, keep growing. While velocity is decreasing, shrink.

Those are simplifications, but should work OK for what I understand you are trying to do.

MyChairHasALooIn

  • Posts: 310
How do you decrement speed? If your speed is being reduced by a constant amount, you could use something like this instead.
Halfway point = speed at launch / 2

If current speed > halfway point then grow
If current speed < halfway point then shrink

This would make the actor appear largest some way after the mid point, but halfway through the total flight time.

Hope that helps a bit.