STALKER-X (Camera library)

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
adnzzzzZ
Party member
Posts: 305
Joined: Sun Dec 26, 2010 11:04 pm
Location: Porto Alegre, Brazil

STALKER-X (Camera library)

Post by adnzzzzZ » Fri Nov 17, 2017 5:49 am

Hi. I've created a camera library for LÖVE. It provides basic functionalities that a camera should have and is inspired by hump.camera and FlxCamera. The goal is to provide enough functions that building something like in this video becomes as easy as possible:



STALKER-X on github

User avatar
yetneverdone
Party member
Posts: 351
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: STALKER-X (Camera library)

Post by yetneverdone » Fri Nov 17, 2017 3:55 pm

Awesome! Very good documentation also! With lots of features hooray! Thanks dude

User avatar
Tjakka5
Party member
Posts: 240
Joined: Thu Dec 26, 2013 12:17 pm

Re: STALKER-X (Camera library)

Post by Tjakka5 » Fri Nov 17, 2017 10:10 pm

Absolutely fantastic! It seems to address all the issues I had with Hump Camera, while still being very easy to use.
I'll be sure to upgrade to this system once I can get around doing so.
Check out my portfolio: http://tjakka5.sorunome.de/

Fuzzlix
Citizen
Posts: 60
Joined: Thu Oct 13, 2016 5:36 pm

Re: STALKER-X (Camera library)

Post by Fuzzlix » Sat Nov 18, 2017 11:10 am

Nice work. Thank you for sharing.

looking into it and using luacheck in ZBS i found this:

Code: Select all

function Camera:attach(x, y, w, h)
    local x, y = 0, 0
    ...
I am not shure what you wanted to do. Probably remove parameters x and y ?

User avatar
adnzzzzZ
Party member
Posts: 305
Joined: Sun Dec 26, 2010 11:04 pm
Location: Porto Alegre, Brazil

Re: STALKER-X (Camera library)

Post by adnzzzzZ » Sat Nov 18, 2017 12:04 pm

Yea, I meant to do something else. I fixed it.

User avatar
master both
Party member
Posts: 259
Joined: Tue Nov 08, 2011 12:39 am
Location: Chile

Re: STALKER-X (Camera library)

Post by master both » Sat Nov 18, 2017 4:23 pm

Amazing camera! I will certainly use it for future proyects. But I have a question, is there a way to make the shaking not move the camera position when it finishes, like it does in the example gif?

User avatar
adnzzzzZ
Party member
Posts: 305
Joined: Sun Dec 26, 2010 11:04 pm
Location: Porto Alegre, Brazil

Re: STALKER-X (Camera library)

Post by adnzzzzZ » Sat Nov 18, 2017 5:06 pm

I should add an option for that. But for now you can just make the camera follow a target. If the camera is following a position then after the shake is done it will still be following that position.

User avatar
master both
Party member
Posts: 259
Joined: Tue Nov 08, 2011 12:39 am
Location: Chile

Re: STALKER-X (Camera library)

Post by master both » Sat Nov 18, 2017 5:25 pm

adnzzzzZ wrote:
Sat Nov 18, 2017 5:06 pm
I should add an option for that. But for now you can just make the camera follow a target. If the camera is following a position then after the shake is done it will still be following that position.
Oh right, I'm asking for some cases like cutscenes, where the player doens't have control over the player, but I guess I can make the camera folow a target during those.

User avatar
adnzzzzZ
Party member
Posts: 305
Joined: Sun Dec 26, 2010 11:04 pm
Location: Porto Alegre, Brazil

Re: STALKER-X (Camera library)

Post by adnzzzzZ » Sat Nov 18, 2017 9:31 pm

Just make it follow the center of the screen (in world coordinates).

User avatar
yetneverdone
Party member
Posts: 351
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: STALKER-X (Camera library)

Post by yetneverdone » Sat Nov 18, 2017 11:27 pm

Is there a debug mode where we can see the rectangular target as shown in the gif?

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests