User Tag List

Results 1 to 8 of 8

Thread: Fighting Game Camera Style

  1. #1
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2014
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Fighting Game Camera Style

    Hello everyone. I need some help. I need to create a camera in the style of mortal kombat or other fighting games. Players can move the screen, approaching it, but only when moving backward, while in the middle the camera does not follow the players


    MKTXR 18.10.21 17-43-51+.png

    is it possible in simple ways?

  2. #2
    Forum Moderator Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    761
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Basically a 2 player camera is the middle point between the two characters.
    So basically: ( Player1_X + Player2_X ) / 2

  3. #3
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2014
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks, but I don't need the cameras to be in the middle all the time, players move it when approaching the edge of the screen

  4. #4
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,739
    Mentioned
    133 Post(s)
    Tagged
    0 Thread(s)
    Yeah, you probably want it to respond very subtly, and as little as possible, otherwise it could get jittery. You don't want the camera to zigzag and vibrate every time a player presses left-right-left-right for some combo sequence.

    Try placing an active object as a visible (for now) camera object, that will help you visualise it from the camera's point of view. Place it in the centre of the level, add an event at the end of the frame to always centre frame on it, and iterate from there. It'll be easier to see what's going right/wrong and how/why when you can always see the object. I suppose you'll want the camera object to never be more than a certain distance away from either player. Let's say 500px for argument's sake. And let's say the ideal centre point is x=800. So maybe start with something like:

    Always set x("camera Object") to Range(800, rightPlayer - 500, leftPlayer + 500). This would attempt to keep the camera at 800, but would force it to be within a minimum (no more than 500 pixels left of the right player) and maximum (no more than 500 pixels right of the left player). But it won't be enough. You'll have decisions to make, like what happens when that equation is impossible because the players are too far apart? Is the player allowed to move offscreen? Is the player forced to stop? Does the camera keep following the player who is moving, or try and split the difference between both players? Or does it just freeze where it was and wait for players to move back towards it? What happens when both players are moving backwards? If one player does a fast backflip will the other player feel like the camera has been yanked away from them unexpectedly? Etc. It's a lot of decisions to make, both in terms of the general logic of it and the actual implementation of it. So my advice is to just take it a step at a time. When you hit upon a problem (eg. both players moving backwards at once), try to recreate the same problem in Mortal Kombat or whatever and see how they handled it there.

    Eventually, when it's working well, you'll probably want to look into adding LERP to it, which is a relatively simple equation that will greatly reduce any camera jitteriness caused by twitchy player micromovements.

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    c4t's Avatar
    Join Date
    Aug 2018
    Posts
    109
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    I used this https://www.youtube.com/watch?v=eeGVuNR1Eio almightyzentaco tutorial and modified it to make my own camera system.

    What i did after doing the tutorial was make an alt value and depending on what the value was i set different camera positions for each value. Example if value is 1 i made camera object position close to the player. if value is 2 i made camera position further away. You can add as many positions as you like just by adding a new value and then setting a new position. if value = then set position to. So the system is expandable. Make the camera fly over away from the player to focus on something . In a fighting game when you king hit a enemy you could let the camera follow them across the screen also if you like and then back to the player. Ideas are pretty endless when you made the simple system.

  6. #6
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2014
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you all for the detailed answers. I am working on a remake of classic Mortal kombat Trilogy and no aspect caused such a problems like camera, not even artificial intelligence.







  7. #7
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleUniversal Windows Platform Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Jonathan's Avatar
    Join Date
    Sep 2013
    Location
    France
    Posts
    257
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Wow look pretty solide, nice job for the AI, seem hard for me to have a good one for this kind of game.
    You're camera looks good too, what's wrong?

    Did you plan to release the source code when it will be bone? Really curious to know how you manage all of this!

    Good luck!

  8. #8
    Clicker Fusion 2.5 DeveloperiOS Export ModuleUnicode Add-on
    daryuss's Avatar
    Join Date
    Apr 2012
    Location
    Italy
    Posts
    260
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hi.
    I would also like to achieve a similar effect, but with the floor curving towards the center, with the parallax object:
    https://community.clickteam.com/threads/109011-How-to-get-the-parallax-effect-with-the-floor-curving-towards-the-center

Similar Threads

  1. Old school style fighting game
    By Graeme2408 in forum WIP & Released Games & Apps
    Replies: 5
    Last Post: 17th February 2020, 03:08 PM
  2. Smooth Camera Scrolling Mario Style Question
    By render8 in forum Fusion 2.5
    Replies: 1
    Last Post: 28th May 2016, 02:03 AM
  3. Fighting Game
    By WareWolff in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 30th August 2010, 02:56 PM
  4. Fighting Game...
    By Typhoon in forum The Games Factory 2 - Technical Support
    Replies: 12
    Last Post: 2nd December 2007, 12:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •