# Player Camera

**URL:** <https://www.ruby-forum.com/t/player-camera/194270>\
**Category:** Ruby\
**Created:** [September 1, 2010, 10:05pm UTC](https://www.ruby-forum.com/t/player-camera/194270 "2010-09-01T22:05:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![andr92](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/5daacb/32.png) [@andr92](https://www.ruby-forum.com/u/andr92)\
**Post date:** [September 1, 2010, 10:05pm UTC](https://www.ruby-forum.com/t/player-camera/194270/1 "2010-09-01T22:05:54Z")

</div>

Hello

Im pretty new. Im creating a 2d racing game and want to make the camera  
to stick to the player. I have give this many thoughts and i can’t come  
to any conclusion. Search this forum for answer but couldn’t find  
anything. Its probally pretty simple but i just can’t understand how to  
do. Anyone who may help?

---

<div class="post-metadata">

**Author:** ![andr92](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/5daacb/32.png) [@andr92](https://www.ruby-forum.com/u/andr92)\
**Post date:** [September 2, 2010, 1:28am UTC](https://www.ruby-forum.com/t/player-camera/194270/2 "2010-09-02T01:28:06Z")

</div>

> Im pretty new. Im creating a 2d racing game and want to make the camera  
> to stick to the player. I have give this many thoughts and i can’t come  
> to any conclusion. Search this forum for answer but couldn’t find  
> anything. Its probally pretty simple but i just can’t understand how to  
> do. Anyone who may help?

And your question is, exactly?

---

<div class="post-metadata">

**Author:** ![andr92](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/5daacb/32.png) [@andr92](https://www.ruby-forum.com/u/andr92)\
**Post date:** [September 2, 2010, 1:39am UTC](https://www.ruby-forum.com/t/player-camera/194270/3 "2010-09-02T01:39:15Z")

</div>

> > And your question is, exactly?
> 
> My question is how should i do to make my player in the center of the  
> window all the time?

what framework are you using, or is this all hypothetical?  
-r

---

<div class="post-metadata">

**Author:** ![andr92](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/5daacb/32.png) [@andr92](https://www.ruby-forum.com/u/andr92)\
**Post date:** [September 2, 2010, 1:39am UTC](https://www.ruby-forum.com/t/player-camera/194270/4 "2010-09-02T01:39:55Z")

</div>

Roger P. wrote:

> > > And your question is, exactly?
> > 
> > My question is how should i do to make my player in the center of the  
> > window all the time?
> 
> what framework are you using, or is this all hypothetical?  
> -r

Im using Gosu

---

<div class="post-metadata">

**Author:** ![andr92](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/5daacb/32.png) [@andr92](https://www.ruby-forum.com/u/andr92)\
**Post date:** [September 2, 2010, 1:30am UTC](https://www.ruby-forum.com/t/player-camera/194270/5 "2010-09-02T01:30:22Z")

</div>

Roger P. wrote:

> > Im pretty new. Im creating a 2d racing game and want to make the camera  
> > to stick to the player. I have give this many thoughts and i can’t come  
> > to any conclusion. Search this forum for answer but couldn’t find  
> > anything. Its probally pretty simple but i just can’t understand how to  
> > do. Anyone who may help?
> 
> And your question is, exactly?

My question is how should i do to make my player in the center of the  
window all the time?

---

<div class="post-metadata">

**Author:** ![andr92](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/5daacb/32.png) [@andr92](https://www.ruby-forum.com/u/andr92)\
**Post date:** [September 2, 2010, 1:59am UTC](https://www.ruby-forum.com/t/player-camera/194270/6 "2010-09-02T01:59:14Z")

</div>

> Im using Gosu

Ok, cool. You may want to ask them then, as they know more about it:

[http://www.libgosu.org/cgi-bin/mwf/forum\_show.pl](http://www.libgosu.org/cgi-bin/mwf/forum_show.pl)
