Skip to main content

Packaged Windows Build Creator (file lost)

I plan to use this code from now on when I start new projects. The best thing about it is the premade windows and mac exe that has everything I need so I don't have to look at py2exe or py2app ever again - just drop the code in the core/ folder and it's ready to ship! There's also some other builtin best practices that I sometimes forget to add when I start from scratch, such as fixing the timestep or being able to toggle fullscreen.

Write one code and distribute to all 3 OS without hassle.


patrick mullen
(saluk)
This is some base code I use for my projects, since I started developing it for PyWright.

It doesn't do a whole lot (it's base code, what do you expect?) but it does enough very nice things that can take a lot of time to add to a new project - or they are just forgotten and left out altogether. Or the timestep is implemented in a bad way, etc.

There are a few main benefits to using this code, at least for me - I'm not sure how useful other people will find it.

But the main benefits are:
  • executable - A prebuilt windows and macintosh exe with all the dependencies I will ever need. I can update code without rebuilding it. I have used py2exe once this year, and that was to change the name from PyWright to main. Using py2exe is a pain in the butt. I want to touch it as infrequently as possible
  • timestepping - the engine in PWBC has a decent timestep. It runs at a locked 60 seconds, so update functions generally only have to think in terms of frames rather than the time changed on a frame (although you have access to that if you need it). You can also alter the logic framerate so that it is different from the display framerate.
  • display - the display runs by default at 320x240, and scales to 640x480. These values can be modified, and scaling of the window to change the scaled resolution is built in as well. Alt-enter toggles fullscreen.
  • worlds - I also included a barebones world/sprites system. Worlds display all the sprites they contain, and you can subclass different worlds for different modes, such as one world for a menu, and another for the actual gameplay

Changes

Links

Home Page
https://www.pygame.org/project/1992

Releases

Packaged Windows Build Creator (file lost) 1 — 17 Aug, 2011

Packaged Windows Build Creator (file lost) 002 — 22 Feb, 2012

Packaged Windows Build Creator (file lost) 003 — 26 May, 2014

Pygame.org account Comments

  • Osval Barajas 2012-07-26 02:21

    Thanks, and keep the good work!!
    :D

  • Eelco Sommer 2014-04-25 09:36

    Thanks for providing this! After some experimenting and tweaking I can now create a single osx application bundle. I had to patch some files to get everything into (and running from) the application bundle. I use an ant build script to automate the process. As the final step I create a dmg file (using hdiutil).