I do something similar in my 'pacman and ghosts' bit of code.

There are a few presentation slides in which I write about the same
idea Alex describes (and I add 'zoom' and 'rotation' into the mix as
well as x,y translation) See slides 5,6,7,8 of:
http://tartley.com/files/stretching_pyglets_wings/presentation/

The code which the presentation is talking about is here (in the zip
file).
http://tartley.com/files/stretching_pyglets_wings/
Demo 2 is the first (and hence simplest) one to incorporate a 'camera'
class which performs the sort of translation Alex is talking about.

Cheers,

  Jonathan

On Dec 12, 10:31 am, "Mic Pringle" <[email protected]> wrote:
> Thanks Alex, will have a go at implementing this tonight.
>
> Cheers
>
> -Mic
>
> 2008/12/12 Alex Holkner <[email protected]>:
>
>
>
> > On 12/12/08, Mic Pringle <[email protected]> wrote:
>
> >>  Hi Alex,
>
> >>  Thanks for the prompt response.
>
> >>  I will definitely look in this, but at the moment I'm just trying to
> >>  find my feet.
>
> >>  Could you tell me if the following theory is correct ...
>
> >>  1/ Set up X and Y variables, initially at say 0, 0 - this should
> >>  render a view of 0 + window.width and 0 + window.height
>
> >>  2/ Set up a scheduled event to fire say 5 times a second, in it
> >>  incrementing/decrementing X and/or Y as required but testing to make
> >>  sure we don't go of the edge of the overall screen
>
> >>  3/ In the on_draw event use glTranslatef using my X and Y variables
> >>  and 0 as the Z option as we are dealing with 2D, which will actually
> >>  render the view
>
> >>  In theory if I've understood you correctly this should move the 'view'
> >>  or 'camera' around as I need ?
>
> > Sounds right.
>
> > Alex.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to