Pyglet

 
  1. Pyglet Tutorial
  2. Pyglet Button
  3. Pyglet Api
  4. Pyglet Ui

What is causing my pyglet application to run slow? I posted to stack overflow, but I'm posting on reddit now too because I didn't get any responses. I'm writing an openworld RPG and It's in the really early stages. Hi I use pyglet to play songs in wav and mp3 formats. According to docs of Pyglet, I should install ffmpeg, so I did it but problem is: p = pyglet.media.Player file = pyglet.media.load(r'C: Zeta.mp3') TraceBack (most recent call last). Pyglet program drawing a single textured square. The square can be moved, rotated, and scaled, to demonstrate how the image remains attached to the shape. texturedSquare.py.

Pyglet Tutorial

pyglet is a cross-platform windowing and multimedia library for Python,intended for developing games and other visually rich applications. It supportswindowing, user interface event handling, game controllers and joysticks,OpenGL graphics, loading images and videos, and playing sounds and music.pyglet works on Windows, OS X and Linux.

Some of the features of pyglet are:

  • No external dependencies or installation requirements. For mostapplication and game requirements, pyglet needs nothing else besides Python,simplifying distribution and installation.
  • Take advantage of multiple windows and multi-monitor desktops. pygletallows you to use as many windows as you need, and is fully aware ofmulti-monitor setups for use with fullscreen games and applications.
  • Load images, sound, music and video in almost any format. pyglet hasbuilt-in support for common audio and image formats, and can optionally useffmpeg to load almost any other compressed audio or video files.
  • pyglet is provided under the BSD open-source license, allowing you touse it for both commercial and other open-source projects with very littlerestriction.

Please join our Discord server, or join us on the mailing list!

If this is your first time reading about pyglet, we suggest you start atWriting a pyglet application.

Programming Guide

  • Installation
  • Writing a pyglet application
  • Windowing
    • Creating a window
    • Appearance
    • Windows and OpenGL contexts
  • Working with the keyboard
    • Keyboard events
    • Text and motion events
  • Working with the mouse
  • Working with other input devices
  • Graphics
    • Vertex lists
    • Batched rendering
  • Shapes
    • Creating a Shape
  • Displaying text
    • The document/layout model
    • Formatted text
    • Font sizes
    • Loading custom fonts
    • OpenGL font considerations
  • Images
    • Accessing or providing pixel data
    • Image sequences and atlases
    • Displaying images
    • OpenGL imaging
  • Sound and video
    • Audio drivers
  • Application resources
    • Loading resources
  • The pyglet event framework
    • Creating your own event dispatcher
  • Keeping track of time
    • The frame rate
  • Creating an OpenGL context
    • Displays, screens, configs and contexts
    • OpenGL configuration options
  • The OpenGL interface
  • The application event loop
    • Customising the event loop
  • Debugging tools
    • Debugging OpenGL
    • Platform-specific debugging
  • Advanced topics
  • In-depth game example
    • Basic graphics
    • Basic motion
    • Giving the player something to do
    • Collision response

API Reference

  • pyglet.app
    • Applications
  • pyglet.clock
  • pyglet.event
  • pyglet.graphics
    • pyglet.graphics.vertexattribute
  • pyglet.image
    • Classes
  • pyglet.input
  • pyglet.media
  • pyglet.resource
  • pyglet.sprite
  • pyglet.text
    • pyglet.text.document
    • pyglet.text.layout
  • pyglet.window
    • pyglet.window.key

External Resources

Pyglet
  • Third party libraries
  • Projects using pyglet

Development Guide

Pyglet Button

Pyglet
  • Contributing
  • Development environment
    • Linux or Mac OSX
    • Windows
  • Testing pyglet
    • Test Suites
    • Writing tests
  • Documentation
    • Writing documentation
  • Making a pyglet release
  • OpenGL Interface Implementation
  • ctypes Wrapper Generation
  • wraptypes
  • Media manual
    • Current code architecture
  • Media logging manual
    • Workflows
    • Commands Summary
    • Code Layout and conventions
    • Commands detailed

Pyglet is a library for the Pythonprogramming language that provides an object-orientedapplication programming interface for the creation of games and other multimedia applications. Pyglet runs on Microsoft Windows, Mac OS X, and Linux; it is released under BSD Licence.

It supports windowed and full-screen operations as well as multiple monitors. Images, video, and sound files in a range of formats can be done natively, with more additional capabilities supplied by the optional AVbin plugin, which uses the Libav package to provide support for audio formats including MP3, Ogg/Vorbis, and Windows Media Audio, and video formats such as DivX, MPEG-2, H.264, WMV, and XviD.

Example[edit]

See also[edit]

  • Pygame, another Python game API, a layer over Simple DirectMedia Layer
  • Kivy (framework), a Python OpenGL based UI for multitouch interactions

External links[edit]

Pyglet Api

  • Pyglet's project page on GitHub
  • AVbin, Pyglet's wrapper for Libav

Pyglet Ui

Retrieved from 'https://en.wikipedia.org/w/index.php?title=Pyglet&oldid=1016698420'