pygame 2 update - the examples all work



 ๐ŸŽฎ๐Ÿ‘พ๐Ÿ‘ฝ๐ŸŽฎ๐Ÿ‘พ๐Ÿ‘ฝ๐ŸŽฎ๐Ÿ‘พ๐Ÿ‘ฝ๐ŸŽฎ๐Ÿ‘พ๐Ÿ‘ฝ

examples/chimp.py works

๐Ÿ‘ฝ๐ŸŽฎ๐Ÿ‘พ๐Ÿ‘ฝ๐ŸŽฎ๐Ÿ‘พ๐Ÿ‘ฝ๐ŸŽฎ๐Ÿ‘พ๐Ÿ‘ฝ๐ŸŽฎ๐Ÿ‘พ



That's a nice milestone for pygame 2 development.
(and also, now these examples also work...
    python -m pygame.examples.aliens
    python -m pygame.examples.scroll
)

I'm pretty sure all the examples are now working with SDL2/pygame 2.

New SDL2 functionality.

Also we have some new SDL2 functionality exposed
    (experimentally, the APIs are not done yet).
Multitouch, and AudioDevice, along with an example of recording audio.
@dlon has been fixing a number of bugs(implementing key repeat, fixing unicode issues)
and also prototyped some Window/Renderer classes (using ctypes and python).

The new events are done in a backwards compatible way,
so that games using them with pygame 1/SDL1 will still work.
You just won't get the events.

if event.type == pg.AUDIODEVICEADDED:
    print('a new sound card plugged in... let's offer the user to use it')

On pygame SDL1 AUDIODEVICEADDED is defined as -1, so you just never get these events.
See examples/audiocapture.py

Making an instrument, Free and Open Source

With a friend we made a loop recorder instrument/video thingo with microphone input.
It records the input and then lets you play back sounds as loops.
Then you can record over tracks making music in a performance.
The video synth reacts to beats and pitch changes driving video.
(pitch/beat detection not included in pygame... yet?)

(Demonstrating the app for a pygame presentation at an Open Source diversity event in Berlin)

Working on a project that uses pygame 2 has been good for me to push features forward.
Now you can ask pygame.mixer to use things like 32bit floats (good for audio apps).
As well as tell it to open a specific audio device for output (and input!).

Writing your own mixer/synth is now much easier.

Music making and performance app for pygame 2, looping and mixing sounds recorded in the microphone.

I think I learnt a lot from that event about making projects more accessible to people, and made some contacts with people from other projects and communities.
For contributors, I've written about how to debug pygame and other python extensions with gdb,
and also how to get started with SDL2 in C (strangely this did not exist on the internet). These will be tested and then merged into the pygame contributors guide.

Python, Cython(Pyrex), and C.

Now we have the start of a module using Cython (_sdl2.pyx). Why Cython?
  • We discussed on the mailing list already that it would be good for new features.
  • It also works with python 2.6+/3.
  • Cython can be used on platforms where ctypes can't, and is faster than ctypes.
  • Cython is more readable to python people.
  • Cython is also ok on pypy (cffi is the faster option on pypy still).
  • We already had one Cython/Pyrex module (the portmidi module that the midi.py module uses internally).

If we implement things in python using a fairly straight wrapping of SDL2 in Cython,
then it would be much easier for people in the future to make a CFFI enhancement for pypy.
If we keep the C parts separate from the python parts, then it will be easier to maintain.
What I mean, is that C+SDL code should not have any Python.h code in the file.

What language to use when? A summary.

  • New features in python. Python implementations are easier to debug, change and read. They run faster on pypy. They are a good educational resource, because the python code is very readable. They can be used to cross-check test implementations in C. The work done by e1000 on the line drawing code has shown the value of this approach. Also the pypy and Cpython projects use a 'python first' approach.
  • C code should be kept separate from the Python.h parts. This is 'cleaner' easier to read, and maintain. This opens the possibility to share the C code more easily with other projects.
  • Keep SDL2 wrapping close to the SDL2 C API. This makes a CFFI implementation easier if someone wants to do so in the future. And it is clean layering. With Cython we don't have as much of an overhead as with C+Python, because of the compiler.
  • new SDL2 functionality can be wrapped with Cython.
  • Accelerators of python code can be done in Cython (the sprite.py code is a great example of something that could use Cython to speed up collision detection and dirty rect handling).
  • We should generate .c files so that the user does not need to use Cython when installing pygame from source.
I'm excited that Cython will allow us to speed up sprite.py, collision handling and dirty rect handling.
It's one of the "Four new pygame things for slow computers." I wrote about in March 2017.
Note, we already have 2 of 4 done :)

How to document with Cython?

There are some open questions with Cython however. The main one being...
  • How do we use the documentation from inside a .pyx file and have it included in sphinx?
If we don't do this, then we need to maintain two sets of documentation.
  (Like we do for midi.py)
The other way is a possibility too... maintaining the documentation in the .rst files,
and somehow inserting the docs at build time.
Hopefully someone else in the Cython/Pyrex community knows how to do this documentation workflow well.

Using projects to guide development.


Working on the looper/video synth project was good to get some audio code working.
But also, I've been working on fixing issues with 'solarwolf' as a test game,
and it's playable but still with a couple of graphical glitches left.

Since we don't have unit tests which cover absolutely everything,
using apps I know well to test is a pretty good alternative.

The approach of looking for issues, and then going into the debugger to find the
Surface blit/transform combinations that are failing in the solarwolf game is a good one.

The first 'game' using pygame 2. A community game.

Speaking of using projects to drive development.
I'm starting this "pygame community game" thingo we talked about a while ago... now.

To enter it into the Ludumdare/Github GameOff jams which end in about 4.5 days.

I'll start another email thread and website announcement but...
Anyone who wants to be involved can join the discord channel
web based chatroom(discord) in the "#communitygame" channel.





Comments

Kajal Agarwal saidโ€ฆ
Microsoft Office Setup is the complete bundle of Microsoft programs as it takes to the a variety of jobs, servers, and affiliations like PowerPoint, Excel, Word, Outlook, Publisher, OneNote, and Access.office setup is the best programming which is broadly utilized in globe .It is a dazzling association that causes you release your best contemplations, complete things, and stay related on the go.for more subtleties visit Office.com/setup today. Be more innovative and accomplish what is important with Outlook, OneDrive, Word, Excel, PowerPoint, OneNote, SharePoint, Microsoft Teams, Yammer, and that's only the tip. For more details go through the links. visit Office.com/setup here. Microsoft Office Setup is the full suite of Microsoft utmost programming that joins a mix of livelihoods, affiliations, and server like Excel, PowerPoint, Word, OneNote, Publisher, and Access. Get to know more details visit the links Office.com/setup .
Kajal Agarwal saidโ€ฆ
Webroot AntiVirus is a decent, secure program that effectively perceives and shields you from Mac malware. It has safe program includes that solitary work in Safari, which additionally makes Webroot's less viable at recognizing a few Windows dangers. Go to the link for more information:  webroot.com/safe here. Webroot digital security is an extreme web security suite for complete assurance against the present different scope of danger on windows. key highlights are 100% secure shopping, 1 snap infection examining, pernicious site separating, unblock antivirus.if you need to introduce it at that point visit our site: webroot.com/safe . Webroot AntiVirus is a not too bad, secure program that successfully sees and shields you from Mac malware. It has safe program remembers that single work for Safari, which also makes Webroot's less practical at perceiving a couple of Windows perils. visit webroot.com/safe here.
ROSHIYA saidโ€ฆ
Norton Security Real-time norton.com/setup insurance against existing and developing malware including ransomware and infections.mcafee antivirus is widely mcafee.com/activate used aantivirus helps to detect and neutralize computer virus, the mail worms,the trojan programs,and also helps your system free of virus and other malware is quite a daily challenge. for more details visit todaymcafee antivirus is broadly mcafee.com/activate utilized aantivirus distinguishes and kill PC infection, the mail worms,the trojan programs,and likewise helps - your framework free of infection and other malware is a significant every day challenge. for more subtleties visit today.
ROSHIYA saidโ€ฆ
Microsoft Office Setup is office.com/setup the full suite of Microsoft utmost programming that joins a mix of livelihoods, affiliations, and server like Excel, PowerPoint, Word, OneNote, Publisher, and Access. Get to know more details visit the links: Microsoft office setup isn't office.com/setup open for Windows contraption, yet in like a way for Macs, and phones. The Microsoft Office 2016 suite looks as strong and major as its harbingers and a marvelous arrangement has changed. Having any doubts visit the links: Microsoft Office is an office office.com/setup suite that wires a degree of master report and database applications, servers and affiliations. This wide range joins perpetual indisputable and obvious tasks like Word, Excel, PowerPoint, Outlook, Microsoft Access, OneNote, other than applications, for instance, Microsoft Publisher, Microsoft Project, Microsoft Visio, Skype for Business, and SharePoint Designer. Have a trial of it... and to setup it in your pc Do visit :
ROSHIYA saidโ€ฆ
Roku enables you to watch free Roku.com/link and paid video content on your TV by means of the Internet. For Activating Roku, go to record enter Roku com connection code showed on Roku TV.Roku empowers you to watch free Roku.com/link and paid video content on your TV by methods for the Internet. For Activating Roku, go to associate record enter Roku com association code appeared on Roku TV. Initiate Roku tv, go to roku com Roku.com/link link record enter Roku com connection code showed on Roku TV. My roku com connect not working utilize new Roku code

ROSHIYA saidโ€ฆ
Roku gadgets are easy to set-up Roku.com/link and simple to-utilize. They accompany a straightforward remote, and incredible highlights like Roku Search which makes it easy to discover what you need to watch.Roku spilling players need Roku.com/link web access to stream content. They utilize remote to interface with your home system. You need a Roku record to Roku.com/link enact your gadget and access diversion. There are no month to month gear rental expenses. Including an installment technique lets you effectively lease purchase motion pictures or buy in to well known administrations.
ROSHIYA saidโ€ฆ
McAfee Activate! you can mcafee.com/activate start incitation with enter thing code/key at and visit for more nuances.It is unsurpassed best mcafee.com/activate defensive antivirus and against spyware .It is ongoing security innovation and it is more secure.mcafee antivirus is mcafee.com/activate widely used aantivirus helps to detect and neutralize computer virus, the mail worms,the trojan programs,and also helps your system free of virus and other malware is quite a daily challenge. for more details visit today.
ROSHIYA saidโ€ฆ
mcafee antivirus is mcafee.com/activate broadly utilized aantivirus distinguishes and kill PC infection, the mail worms,the trojan programs,and likewise helps your framework free of infection and other malware is a significant every day challenge. for more subtleties visit today.mcafee antivirus is mcafee.com/activate widely used antivirus helps to detect and neutralize computer virus, the mail worms,the trojan programs,and also helps your system free of virus and other malware is quite a daily challenge.to uninstall the mcafee, or for more details visit: mcafee uninstall.McAfee thing in citation mcafee.com/activate is an antivirus program. this program secure your PC with tainting so you can display it. to see significantly more please visit our site .
ROSHIYA saidโ€ฆ
Xfinity. Let's activate your xfinity.com/authorize device. Enter your activation code: Access on Roku and smart TV's will be available once your Xfinity products have been set up in your home.Enjoy and manage TV, high-speed xfinity.com/authorize Internet, phone, and home security services that work seamlessly together Xfinity services are xfinity.com/authorize cancelled during the agreement term. Kit offer for kit serviceable locations only.

ROSHIYA saidโ€ฆ
Learn about Xfinity xfinity.com/authorize Multi-factor Authentication. Multi-Factor Authentication for Signing in and Xfinity Authenticator Setup.Xfinity Mobile is a xfinity.com/authorize flexible wireless service designed to save the consumer money.It is built for the xfinity.com/authorize way people use their phones today with the internet at the centre of the experience.

ROSHIYA saidโ€ฆ
Roku empowers you to watch Roku.com/link free and paid video content on your TV by methods for the Internet. For Activating Roku, go to www.roku.com/associate record enter Roku com association code appeared on Roku TV. Canon IJ does not canon.com/ijsetup come with the Manual CD for the installation of printer drivers. Canon IJ Network Tool canon.com/ijsetup is a free application that allows you to install, view or configure the network settings of the printer that is connected through a network.
ROSHIYA saidโ€ฆ
Canon.com ijsetup is canon.com/ijsetup the online way to setup canon printer wirelessly, e Scan Utility gets installed along with the printer driver.Canon PRINT Business canon.com/ijsetup Canon PRINT Business Canon PRINT Business. Scan from Canon multi-function devices to a mobile device,Microsoft Office is office.com/setup an office suite that wires a degree of master report and database applications, servers and affiliations. This wide range joins perpetual indisputable and obvious tasks like Word, Excel, PowerPoint, Outlook, Microsoft Access, OneNote, other than applications, for instance, Microsoft Publisher, Microsoft Project, Microsoft Visio, Skype for Business, and SharePoint Designer. Have a trial of it... and to setup it in your pc Do visit :
ROSHIYA saidโ€ฆ
Microsoft Office A Series office.com/setup Of Subscription-Based Services Which Includes Client Software As Well As Server Software. It Is Generally Offered As A Component Of The Microsoft Office Product Line Which Can Be Installed By Office setup. Any question regarding this visit our site: Office Setup To begin with office.com/setup your Microsoft Office Installation you should require substantial item key code and visit our webpage and we can likewise assist you with your whole procedure to arrangement office item on the web. Here is the link you need to visit:office it the store of office.com/setup office gadgets to make your working smooth and effective.visit: www.office.com arrangement to downloaded in your PC with the savvy help.
ROSHIYA saidโ€ฆ
All you have to do is amazon.com/mytv to activate your Amazon Prime Video on amazon.com mytv using the activation code you retrieve ...Amazon Instant Video amazon.com/mytv application on your LG TV or Blu-ray Player and then Prime Instant Video to start watching. Amazon.com mytv is a amazon.com/mytv registration portal of Amazon Prime from which members can watch thousands of movies and TV shows
ROSHIYA saidโ€ฆ
Amazon.com mytv is a registration amazon.com/mytv portal of Amazon Prime from which members can watch thousands of movies and TV shows The instant video service can only amazon.com/mytv be watched after registering your device with a simple subscription code.Amazon Prime on your Roku,Amazon Fire amazon.com/mytv TV, Chromecast, and similar streaming devices.

ROSHIYA saidโ€ฆ
Amazon Prime is a subscription-based amazon.com/mytv platform that gives access to the users of a large range of services such as unlimited video streaming,Amazon.com Store Card; Amazon Business amazon.com/mytv Card; Amazon Business Line of Credit; Shop with Points; Credit Card Marketplace; Amazon Web Services Scalable Cloud amazon.com/mytv Computing Services: Audible Download Audio Books: DPReview Digital Photography: IMDb Movies, TV & Celebrities :

ROSHIYA saidโ€ฆ
Activate mcafee antivirus mcafee.com/activate with the highly professional tech team and get rid of antivirus from computer click the link for more details.mcafee antivirus is broadly mcafee.com/activate utilized antivirus recognizes and kill PC infection, the infected mail ,the malware programs,and enables your framework to free of infection and other malware is a serious every day challenge.McAfee Activate! you can mcafee.com/activate start incitation with enter thing code key at and visit for more nuances.
ROSHIYA saidโ€ฆ
It is unsurpassed best mcafee.com/activate defensive antivirus and against spyware .It is ongoing security innovation and it is more secure.mcafee antivirus is widely mcafee.com/activate used aantivirus helps to detect and neutralize computer virus, the mail worms,the trojan programs,and also helps your system free of virus and other malware is quite a daily challenge. for more details visit today.mcafee antivirus is broadly mcafee.com/activate utilized aantivirus distinguishes and kill PC infection, the mail worms,the trojan programs,and likewise helps your framework free of infection and other malware is a significant every day challenge. for more subtleties visit today.

ROSHIYA saidโ€ฆ
mcafee antivirus is widely mcafee.com/activate used antivirus helps to detect and neutralize computer virus, the mail worms,the trojan programs,and also helps your system free of virus and other malware is quite a daily challenge.to uninstall the mcafee, or for more details visit: mcafee uninstall.McAfee thing in citation is mcafee.com/activate an antivirus program. this program secure your PC with tainting so you can display it. to see significantly more please visit our site .It is unequaled best mcafee.com/activate defensive antivirus and hostile to spyware .It is continuous insurance innovation and it is more secure , quicker and more total than any time in recent memory before.if need to introduce it at that point visit our site.
ROSHIYA saidโ€ฆ
McAfee is committed to mcafee.com/activate your security and provides an assortment of free McAfee tools to aid in your security protection. Simply select a tool and download it for free.Mcafee login To Activate mcafee.com/activate your 25 Digit Product Key Login Mcafee on your PC with ... You can without much of a stretch sign into your mcafee my account and activate the product visit here.Would you like to set up hulu hulu.com/activate antivirus in your PC?... at that point click here for more subtleties.

ROSHIYA saidโ€ฆ
To activate Hulu Plus on your hulu.com/activate device, either use the on-screen keyboard to enter your Hulu log in information or go to Hulu.com/activate and enter the device activation code. Either of these methods will allow you to use Hulu on any Hulu-supported device.Switch plans or drop hulu.com/activate anytime,Watch on your preferred gadgets ,Get boundless access to the Hulu gushing library with constrained or no promotions. Appreciate full periods of restrictive arrangement, hit films, Hulu Originals, kids shows, and the sky is the limit from there website to setup your 123.hp.com/setup printer get started with your new printer by downloading the software.
ROSHIYA saidโ€ฆ
Canon IJ does not come with the canon.com/ijsetup Manual CD for the installation of printer drivers. Canon IJ Network Tool is a free canon.com/ijsetup application that allows you to install, view or configure the network settings of the printer that is connected through a network. Simply download the Canon canon.com/ijsetup PRINT App, press your printerโ€™s Wireless Connect button and the information stored on your phone,
ROSHIYA saidโ€ฆ
Canon.com ijsetup - Click canon.com/ijsetup download and start the canon ij setup downloading. On the completion, double-tap on the downloaded file and start installation.Canon IJ does not come with canon.com/ijsetup the Manual CD for the installation of printer drivers.Canon.com ijsetup is the online canon.com/ijsetup way to setup canon printer wirelessly, e Scan Utility gets installed along with the printer driver.
ROSHIYA saidโ€ฆ
Canon PRINT Business Canon PRINT canon.com/ijsetup Business Canon PRINT Business. Scan from Canon multi-function devices to a mobile device,

Canon.com ijsetup offers canon.com/ijsetup the Printer Setup download link where you can install the printer setup further. With the online, the user can set up the canon.com/ijsetup Canon Printer Model. When you do connect the Canon printer into your pc, your system does not need to install the driver on it.Learn about Xfinity Multi-factor Authentication xfinity.com/authorize Multi-Factor Authentication for Signing in and Xfinity Authenticator Setup.
Slot saidโ€ฆ
เธฃเธนเน‰เธชเธถเธเน„เธกเนˆเธ”เธต
ambbet

Popular posts from this blog

Draft 3 of, ^Let's write a unit test!^

Is PostgreSQL good enough?

post modern C tooling - draft 6