Camera Tricks DEMO

firemaplegamesfiremaplegames Member Posts: 3,211
edited November -1 in Working with GS (Mac)
Hey All!

I realize this isn't iAds but...

Here are some cheesy and cool camera tricks you can incorporate into your games!

http://gamesalad.com/game/play/67610

I am using a bunch of transitions and camera effects in my new game and I thought I'd share...

This is an easy way to create interesting transitions and effects without needing more artwork.

Make the camera shake for really big explosions!

Zoom in and out or create hypnotic spiralling effects...

Feel free to use this for whatever you want!

Joe
Fire Maple Games

Comments

  • Rob2Rob2 Member Posts: 2,402
    super cool stuff...thanks very much
  • QuinnZoneStudiosQuinnZoneStudios Member Posts: 452
    Wow that's crazy Joe!
    I could see that being handy on my next game.

    Thanks once again!
  • UtopianGamesUtopianGames Member Posts: 5,692
    Nice work FMG!

    Is it possible to zoom in with a finger touch or better still 2 fingers apart to zoom 2 finger pinch to zoom back?

    Darren.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Neat, Joe! :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • firemaplegamesfiremaplegames Member Posts: 3,211
    @Darren: I'm sure it's possible to do pinch/zoom.

    It would require math though.

    Wherever you put your two fingers, imagine a line segment going between them.
    The initial length of this line segment would be 100% - or no zoom.

    As this line segment increases and decreases, the zoom factor would correlate to it.

    The center point on the line segment would be the focal point where things zoom towards.

    That's the mechanics of it... but the implementation requires a bit of math, which I'm not terribly great with..

    I'll see if I can figure it out at some point.
  • quantumsheepquantumsheep Member Posts: 8,188
    That is so helpful, sir! I might be able to squeeze camera shake into Kraken :D

    Thanks!

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • firemaplegamesfiremaplegames Member Posts: 3,211
    QS: Awesome!
  • QuinnZoneStudiosQuinnZoneStudios Member Posts: 452
    quantumsheep said:
    That is so helpful, sir! I might be able to squeeze camera shake into Kraken :D

    QS :D

    "SHAKE THE KRAKEN!!!!"
  • quantumsheepquantumsheep Member Posts: 8,188
    Hahaha!

    I had a quick look at it, and it hurt my head. Obviously I did not consume enough alcohol...

    I'll take another look tomorrow - would be fun to include it I think :D

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • firemaplegamesfiremaplegames Member Posts: 3,211
    Let me know if you need help with it!

    All of the code is in that little black box actor in the lower center.
    You only need to worry about the one Shake Rule.

    You just have to put a similar little box actor out of sight in your scene.
    And just put that one Shake Rule in it.

    I have the shaking triggered by a single global boolean Attribute: 'PleaseShake'
    When that gets set to true, it triggers the shaking cam.
  • quantumsheepquantumsheep Member Posts: 8,188
    Right... so I have a Kraken explosion for when it blows up...

    It's a prototype actor that's the same across all scenes...

    It should work if I make 'pleaseShake'=true when that spawns....?

    Thanks for the help mate,

    QS :D

    Edit - oh, and the camera is set to follow the player ship - will that affect anything do you think?

    I should go try it out, but I'm scared I'll screw something up.

    Oh, sod it, I'll go try!

    Cheers,

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • firemaplegamesfiremaplegames Member Posts: 3,211
    Yep. That would work perfectly.

    And by all means please fiddle with the shaking. I just threw that in real quick as an example.
    If you look at the Shake Rule, you'll see a bunch of random(-10,10), random(-8,8), etc...
    Just play with those amounts to get something nice.

    And it doesn't have to be random either, you can hard code it if you want it too look specific each time.

    Good luck!
    Joe
  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    FMG, so far this has been the only bright spot in my day... :-)

    Good work. You never fail to impress!
  • quantumsheepquantumsheep Member Posts: 8,188
    firemaplegames said:
    Yep. That would work perfectly.

    And by all means please fiddle with the shaking. I just threw that in real quick as an example.
    If you look at the Shake Rule, you'll see a bunch of random(-10,10), random(-8,8), etc...
    Just play with those amounts to get something nice.

    And it doesn't have to be random either, you can hard code it if you want it too look specific each time.

    Good luck!
    Joe

    Hey Joe,

    Where ya going with that gun in your hand?

    ;)

    I've tried it, and got the camera shake to trigger on a Kraken exploding!

    So far so good.

    The actual camera shake looks horrible though. It might be because of the scene length (4800), the fact that your ship is constantly moving. that the camera is controlled by the ship, or that X is wrapped or something else!

    Not sure. I think, though, that it doesn't look anywhere near good enough right now, despite some experimentation. it'll have to come out :(

    Perhaps in the first update it'd be a nice addition :D

    Here's what it looks like atm:



    Cheers,

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    Could you temporarily disable control camera on the ship? Link the camera to the kraken and apply the shake there...
  • quantumsheepquantumsheep Member Posts: 8,188
    That's not a bad idea... though I don't like the idea of the player maybe not being able to see his ship for even a second...

    I'll give it a try though - probably in first update as mentioned - thanks!

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    I understand your concern. Although, I've played many games where the player is off screen during a boss kill sequence. I can't think of any linkable examples off the top of my head, but that's old age for you...
  • quantumsheepquantumsheep Member Posts: 8,188
    I getcha - but the Kraken aren't bosses - so there'll be others around you firing, including UFOs and the ever present 'don't crash into the ground' threat :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • firemaplegamesfiremaplegames Member Posts: 3,211
    I see. hmmm...

    For the shaking, I am Interpolating to coordinates like random(-10,10)...
    That is based on a camera origin of [0,0] though.

    You would need to change that to the current camera coordinates, not 0,0...

    It might be tricky with the ship controlling the camera.

    Instead of shaking the origin of the camera, you can also try adjusting the zoom in and out just a little bit, real fast. That might work better...

    It might need to be put in an update, but we should be able to get it working at some point!
  • quantumsheepquantumsheep Member Posts: 8,188
    Thanks Joe!

    I'm sure this will come in handy in other projects, and for other people in the meantime! Thanks again for sharing!

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • cptongsgcptongsg Member Posts: 70
    Thanks so much for sharing this great demo, it really handy!
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    Thanks again Joe, am using the camera shake on my new game that goes live tomorrow - Buzz Buzz Bang. Its not in this version but i have now programmed it in so when you destroy the Hornets and Queens the camera shakes, this will go into the 1st update! Love it, cheers
Sign In or Register to comment.