Camera like Pocky and rocky 2 with no extensions

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hi everyone hope all is well.

    I want to create a camera like Pocky and rocky 2 where the room is big and the camera cuts off the player X and y display, when they reach a certain point. i'm making a top down shooter game and want to re-create this type of camera in fusion. here's the link to watch the game : Please login to see this link. .I hope i don't have to use extension as its an Android game i'm making.


    Thank you

  • Working on making you an example.

    Or maybe it's more of a small game which just happens to also have the code you are looking for.

    I think I'm going a bit overboard... But ya know what? Why just make an example, when I can also demonstrate just how the example's main code can be put into good use while I'm at it? XD

    My Please login to see this link. (which I actually use), my Please login to see this link. (which I mostly don't use), and my Please login to see this link. (which I don't use anymore pretty much at all really). If there are awards for "'highest number of long forum posts", then I'd have probably won at least 1 by now. XD

  • Heh, looks like somebody beat me to it. And right as I finished my example as well!

    Well, I'll upload mine as well, just because it's done, so no sense in not uploading it.

    (Though it seems we both had slightly different ideas on what the person who posted the thread wanted, so who knows? Maybe they'll get use out of both of them.)

    Oh, and FYI: I didn't get around to implementing the proper attack for the enemies. Oh well... not like an example should really need to do something like this. XD

    Files

    My Please login to see this link. (which I actually use), my Please login to see this link. (which I mostly don't use), and my Please login to see this link. (which I don't use anymore pretty much at all really). If there are awards for "'highest number of long forum posts", then I'd have probably won at least 1 by now. XD

  • Thank you i like how you made the gates that block you off how can i make the room big like pocky and rocky 2 where the camera blocks you of and you can choose your path?

    Edited once, last by nat (July 14, 2016 at 2:11 PM).

  • Notice how I coded the camera to only lock the horizontal camera position? You could probably design your game to use separate horizontal and vertical camera locking. For example, you could use three different kinds of camera locking objects: Horizontal+vertical, horizontal only, and vertical only. Maybe a few extra kinds of locks if you don't want the player to backtrack: One that prevents the camera from going farther left than it, one that prevent the camera from going farther up than it, one that prevents the camera from going farther right than it, and one that prevents the camera from going farther down than it. And you could potentially code it so that you can activate more than one lock at once, though I have no idea if that's really particularly necessary.

    My Please login to see this link. (which I actually use), my Please login to see this link. (which I mostly don't use), and my Please login to see this link. (which I don't use anymore pretty much at all really). If there are awards for "'highest number of long forum posts", then I'd have probably won at least 1 by now. XD

  • FYI, the camera direction changing zones are FAR too small, and they probably should use active objects instead of the "detect objects in zone" feature, since active objects give you more customization options (I tried fixing it somewhat in the example, but it did introduce a few new bugs, so if you still see a bit of white due to the camera locking in a SLIGHTLY incorrect position, well, that's why). For an example of the sort of advantage you can get by using actives instead, there's the segment in my example where the locked camera moves back and forth rather than staying stationary, which couldn't possibly be done with fixed points. Quite frankly, the IDEAL fix for this would use active objects for this, but to make it easier to add to your existing example, I'm just going to leave all that as-is for now (though I seriously recommend you do that).

    I've attached a very basic fix for the example you posted, but that being said I would much rather make a better version of my old example which has proper camera locking in all directions AND which keeps the camera from moving back beyond certain points, since I feel it could better demonstrate a somewhat more "clean" solution.

    Files

    My Please login to see this link. (which I actually use), my Please login to see this link. (which I mostly don't use), and my Please login to see this link. (which I don't use anymore pretty much at all really). If there are awards for "'highest number of long forum posts", then I'd have probably won at least 1 by now. XD

  • You're welcome! Glad I could help you get it figured out! :)

    My Please login to see this link. (which I actually use), my Please login to see this link. (which I mostly don't use), and my Please login to see this link. (which I don't use anymore pretty much at all really). If there are awards for "'highest number of long forum posts", then I'd have probably won at least 1 by now. XD

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!