After lots of hair pulling, head scratching and lip biting, my camera system sucks a little less every day.
I've come to a point in which I'd appreciate some feedback from the community, hence I ask:
How do you like Cameras to behave?
Let me explain this a bit more.
My camera sytem works on top of love.graphics operations: rotate, translate, scale, push and pop.
These operations are "direct". If you say "translate 20 pixels to the right" everything drawn afterwards is drawn 20 pixels to the right.
My camera sytem works that way now.
Trouble is, that's not how real cameras work. They are "inverted": If you move real cinema camera "20 meters right" everything on the camera's screen moves, yes ... but to the left!
So that is my dilemma. I'm wondering whether I should "invert" my camera system by default.
An inverted camera system has some advantages; you want to focus on an object that is on coordinates x,y? Just put the camera on those positions. Want to align the camera angle with an object's angle? Just call setAngle(object.angle). With a "direct" system, you have to invert the numbers, which is less obvious and a bit of a pain sometimes.
A direct camera, on the other hand, would be (I guess) more intuitive to OpenGL-familiar guys.
So what do you think?
I hate camera systems
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
I hate camera systems
When I write def I mean function.
Re: I hate camera systems
I would argue that an inverted camera feels more intuitive (to me, at least) - if I'm scripting an RPG, for instance, and in a cutscene I want the camera to show something that's offscreen to the right, I would tell it to pan to the right, thus moving everything to the left. This seems a lot more natural to me.
Re: I hate camera systems
I agree with anjo. I would love an inverted camera system! Get to work! *cracks whip*
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: I hate camera systems
It is actually done. Pretty much. The message I sent on the other forum seems lost.
If you feel adventurous, it can be found here: http://github.com/kikito/passion/blob/m ... Camera.lua
Some cleanup is still due, and also I haven't started implementing scissoring. But it works ok, more or less.
If you feel adventurous, it can be found here: http://github.com/kikito/passion/blob/m ... Camera.lua
Some cleanup is still due, and also I haven't started implementing scissoring. But it works ok, more or less.
Re: I hate camera systems
Inverted camera system! Gief! Thumbs up! Yep yep!
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 8 guests