Let’s see what we can figure out about the Arcade camera. I think we’ll look at an example, and maybe bash it a bit to see what it does. The simplest example I’ve looked at so far is a very simple side-scroller game that uses two cameras. One displays the score, and one contains the game world and player. The game scrolls sideways as the player moves. It keeps the player in the center of the play field, unless doing so would scroll outside the game’s boundaries. When the player moves, the camera eases back to center. Let me try to take a little movie. You can see how the camera kind of eases back and forth to center the player in mid view. It feels very natural, pretty much what we’re all used to in such games. Let’s look at the source for this little game. I’ll show the whole thing and then call out things I notice after that. """ Platformer Template If Python and Arcade are installed, this example can be run from the command line with: python -m arcade.examples.template_platformer…
No comments yet. Log in to reply on the Fediverse. Comments will appear here.