ppb / pursuedpybear Goto Github PK
View Code? Open in Web Editor NEWA python game engine.
Home Page: https://ppb.dev/
License: Artistic License 2.0
A python game engine.
Home Page: https://ppb.dev/
License: Artistic License 2.0
It's built to handle the event of an empty queue, but also catches an empty scene stack.
Break up the exception handling.
Copy from ppb_vector or write a new one.
There is no menu system.
The name field should be wrapped in quotation marks in the representation.
On macOS when passing flags=pygame.FULLSCREEN
to GameEngine the now fullscreen window does not have a close button, and without a keyboard escape can not be closed.
Proposed: Implement some form of keyboard value that will kill all PPB windows either by throwing a QUIT event or exiting the engine loop.
Right now, the flags
parameter accepts a single flag, which must conform to the bitwise-OR flags from SDL/PyGame. Would much prefer that flags
parameter accept either a single flag or an iterable of flags that will be combined for the user inside the engine.
flags
is an artifact of implementation and really is talking about rendering flags.Replace the **kwargs with keyword only arguments.
Currently the engine subscribes to itself to catch events, by subscribing to each scene in turn we can have only a single publisher active at a time.
Components will be the items that are used to make a game (As separated by the items that make the engine run.)
Components: Sprites and in game objects.
Utilities: View, Controller, Publisher and similar.
Right now, it is impossible to add debug logging to the Engine itself at the logging.DEBUG
level without it flooding a user's debug logging.
To prevent this, some sort of mechanism should be added to allow engine logging to use a level lower than the built in logging.DEBUG
To that end, a new logger class could be implemented.
Alternatively we can monkey-patch logging
to have an additional method.
Or finally we could, as developers on the engine proper, use the "hard" way of calling logging.log(NEW_LEVEL, debug_message)
directly.
Additionally, we should pick a logging value to use.
Probably too big as a single task. Low priority.
Each method needs a docstring and the class itself.
All sprites are two pieces: A model and a view. The view is based on the hardware rendering objects. The model is a class that listens for events from the engine and manages state.
Going to use MKDocs to hook into readthedocs.
Reported by two windows on Windows platforms, all sprites blink erratically during game play.
Probably a problem in SDL.
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ppb/scenes.py", line 31, in simulate
for group in self.groups.values():
RuntimeError: dictionary changed size during iteration
Logic is currently backwards, scene_stop
should be scene_running
and the logic should be
if not scene_running:
scenes.pop()
Will require some refactoring to BaseSprite.
Remove the constants TOP, BOTTOM, LEFT, and RIGHT and combine them with the side definitions inside of Side as the Enum Members.
BaseClass.change()
currently returns (self.running, {"next_scene": None})
which causes an error when the engine attempts to call None
during activate
.
Should Inherit Publisher and keep a reference to the view and controller interfaces.
Combine the Model, Mobile, and Conrollable into a single GameObject class.
Should return parent, side inside the displayed representation, not value, parent.
Plan a configuration layer to reduce necessity of using kwargs everywhere.
Place holder for me.
See the init of physics.Physics for pattern.
instead of leaving rendering code to the developer, the Engine
should use a Scene.game_objects
attribute to get a list of sprites, then filter the list by checking for collision against a Scene.viewport
attribute.
Scene.game_objects: Iterable[GameObject]
Scene.viewport: GameObject
The goal of this change is to simplify the drawing code and being able to centralize optimizations of rendering routines.
A Pygame based subsystem to create PPB Mouse events.
Figure out the best way to provide a save system.
Right now, when one system needed another system, there's no good way to do it.
As part of this issue, we should build an interface to allow this.
Considerations:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.