Making a "camera" follow character?

13 views
Skip to first unread message

Johnny M.

unread,
Mar 2, 2011, 8:41:14 PM3/2/11
to ruby4kids
Well, I plan on being here a lot, so please don't feel I'm bombarding
this group with questions.

My new project involves me doing something like a Mario-type
platformer.The only problem with that, is I don't want to make my
window super huge, and have a small viewing space for one level.
Instead, I think it would be best to just have a "camera-view" follow
the X-Axis of my player. How could I do that?

Alberto Morales

unread,
Mar 2, 2011, 10:07:32 PM3/2/11
to ruby...@googlegroups.com
I think you want to look at Chingu. It is a gem that wraps some functionality that the author developed for Gosu.

I will take a look at it and see if we can extract just the viewport.

For now look at their examples.

To run, you will need to install their gem. (sudo gem install chingu or gem install chingu on windows)

Alberto.

Reply all
Reply to author
Forward
0 new messages