{ "info": { "author": "Eric Dennison", "author_email": "ericd@netdenizen.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "![automatic build status with Travis](https://travis-ci.org/BrythonServer/ggame.svg?branch=master)\n\n# ggame\nThe simple sprite and game platform for Brython Server (Pygame, Tkinter to follow?).\n\nGgame stands for a couple of things: \"good game\" (of course!) and also \"git game\" or \"github game\"\nbecause it is designed to operate with [Brython Server](http://runpython.org) in concert with\nGithub as a backend file store.\n\nGgame is **not** intended to be a full-featured gaming API, with every bell and whistle. Ggame is\ndesigned primarily as a tool for teaching computer programming, recognizing that the ability\nto create engaging and interactive games is a powerful motivator for many progamming students.\nAccordingly, any functional or performance enhancements that *can* be reasonably implemented\nby the user are left as an exercise.\n\nPlease visit the\n[detailed documentation page for ggame](https://ggame.readthedocs.io/en/latest/introduction.html).\nThis is generated automatically from the ggame sources.\n\n## Functionality Goals\n\nThe ggame library is intended to be trivially easy to use. For example:\n\n```python\nfrom ggame import App, ImageAsset, Sprite\n# Create a displayed object at 100,100 using an image asset\nSprite(ImageAsset(\"bunny.png\"), (100,100))\n# Create the app, with a default stage\napp = App()\n# Run the app\napp.run()\n```\n\n## Another Example\n\nThe following example illustrates the more common use case in which the basic ggame\nclasses, Sprite and App, are subclassed as Bunny and DemoApp and given event handlers\nand step (i.e. poll) functions.\n\n\n```python\nfrom ggame import App, ImageAsset, Sprite, MouseEvent\nfrom random import random, randint\n\nclass Bunny(Sprite):\n\n asset = ImageAsset(\"bunny.png\")\n\n def __init__(self, position):\n super().__init__(Bunny.asset, position)\n # register mouse events\n App.listenMouseEvent(MouseEvent.mousedown, self.mousedown)\n App.listenMouseEvent(MouseEvent.mouseup, self.mouseup)\n App.listenMouseEvent(MouseEvent.mousemove, self.mousemove)\n self.dragging = False\n\n\n def step(self):\n \"\"\"\n Every now and then a bunny hops...\n \"\"\"\n if random() < 0.01:\n self.x += randint(-20,20)\n self.y += randint(-20,20)\n\n\n def mousedown(self, event):\n # capture any mouse down within 50 pixels\n self.deltax = event.x - (self.x + self.width//2)\n self.deltay = event.y - (self.y + self.height//2)\n if abs(self.deltax) < 50 and abs(self.deltay) < 50:\n self.dragging = True\n # only drag one bunny at a time - consume the event\n event.consumed = True\n\n def mousemove(self, event):\n if self.dragging:\n self.x = event.x - self.deltax - self.width//2\n self.y = event.y - self.deltay - self.height//2\n event.consumed = True\n\n def mouseup(self, event):\n if self.dragging:\n self.dragging = False\n event.consumed = True\n\n\nclass DemoApp(App):\n\n def __init__(self):\n super().__init__()\n for i in range(10):\n Bunny((randint(50,self.width),randint(50,self.height)))\n\n def step(self):\n \"\"\"\n Override step to perform action on each frame update\n \"\"\"\n for bunny in self.spritelist:\n bunny.step()\n\n\n# Create the app\napp = DemoApp()\n# Run the app\napp.run()\n```\n\n## Installing ggame\n\nBefore using ggame with your Python source repository on Github, you may add the ggame source\ntree to your repository. If you are executing your code in http://runpython.com, then the current\nggame repository is already added to your import search path and no installation is required.\n\n## Contributing to ggame\n\n### Environment\n\nSet up the development environment with Python 3.7+. For example, with \n[this procedure](https://tecadmin.net/install-python-3-7-on-ubuntu-linuxmint/).\n\nCreate a virtual environment with venv and activate it:\n```\n$ python3.7 -m venv venv\n$ source venv/bin/activate\n```\n\nInstall the requirements:\n```\n$ pip install -r requirements-headless.txt\n```\n\nTest your environment by running the tests:\n```\n$ scripts/run_tests.sh\n```\n\n### Code Quality\n\nPython sources in ggame should be passed through `black`. For example:\n\n```\n$ black ggame/app.py\n```\n\nPython sources should also be tested with `pylint`. For example:\n\n```\n$ python3 -m pylint -r n ggame/app.py\n```\n\nYou can perform all of these checks in concert with a full Sphinx build\nby executing the script:\n```\n$ scripts/run_tests.sh\n```\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/BrythonServer/ggame", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "ggame", "package_url": "https://pypi.org/project/ggame/", "platform": "", "project_url": "https://pypi.org/project/ggame/", "project_urls": { "Homepage": "https://github.com/BrythonServer/ggame" }, "release_url": "https://pypi.org/project/ggame/1.0.11/", "requires_dist": [ "Pillow (==2.9.0)" ], "requires_python": "", "summary": "A lightweight sprite-based game and graphics framework", "version": "1.0.11" }, "last_serial": 5647304, "releases": { "1.0.10": [ { "comment_text": "", "digests": { "md5": "4b3dab749aced8a8b0924f4d8f86acdd", "sha256": "a0393173eaf0746a4bc6df1a0cf5281aecb266bb10e22f83781139239c474c18" }, "downloads": -1, "filename": "ggame-1.0.10-py3-none-any.whl", "has_sig": false, "md5_digest": "4b3dab749aced8a8b0924f4d8f86acdd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 231580, "upload_time": "2019-07-06T19:27:25", "url": "https://files.pythonhosted.org/packages/c5/2a/1704ab5d8fa2aa29810dea8c732c7ad4564f2ae77a798c5d292e5a4eeb36/ggame-1.0.10-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8d4b36676f76541f557788b22ba3bfa1", "sha256": "004c2aeba557a7ee2452ef227cec777d552a569ccb473181c43b78b157b68ae0" }, "downloads": -1, "filename": "ggame-1.0.10.tar.gz", "has_sig": false, "md5_digest": "8d4b36676f76541f557788b22ba3bfa1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 226322, "upload_time": "2019-07-06T19:27:27", "url": "https://files.pythonhosted.org/packages/5e/18/ca9a8e28fb24aec66c240bef52ab2a80db414ad99a91718bcf08e486bd39/ggame-1.0.10.tar.gz" } ], "1.0.11": [ { "comment_text": "", "digests": { "md5": "21ec7429bdb1a0fdc0dd23299ecd0deb", "sha256": "7b2f706fb8dadcb64161c8f0548021b6d28f59d3fae9c8c051204b64ea06d0cd" }, "downloads": -1, "filename": "ggame-1.0.11-py3-none-any.whl", "has_sig": false, "md5_digest": "21ec7429bdb1a0fdc0dd23299ecd0deb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 231440, "upload_time": "2019-08-07T22:45:18", "url": "https://files.pythonhosted.org/packages/f3/f8/71240974af3faf9e2357b479dcf9a6fc85a4317cd6a5f58e6bb53dbf1971/ggame-1.0.11-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b210d299f76c458786dc54e786c8db90", "sha256": "b9793c9c7fa4b51b01dc1d14b4ce5dc2a081915bd07a75ca2a1f32eb782d117a" }, "downloads": -1, "filename": "ggame-1.0.11.tar.gz", "has_sig": false, "md5_digest": "b210d299f76c458786dc54e786c8db90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 226204, "upload_time": "2019-08-07T22:45:20", "url": "https://files.pythonhosted.org/packages/b4/70/e6ac3d23235e6f1ddd7d6a944b991e677708e21da60ac1f9493c6509a65a/ggame-1.0.11.tar.gz" } ], "1.0.7": [ { "comment_text": "", "digests": { "md5": "a09ba7b5ac8b59aca8ecb74d83e8dc64", "sha256": "c75248f2c9ab854a50a84795bd98d68ae8f38f05658d0de36ddbd3bbf2614908" }, "downloads": -1, "filename": "ggame-1.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "a09ba7b5ac8b59aca8ecb74d83e8dc64", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 220207, "upload_time": "2019-01-06T03:02:03", "url": "https://files.pythonhosted.org/packages/b5/1b/f7762c340fc8a1465c7e3e31f23c387f4e51722e71079383c2f957dcb571/ggame-1.0.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dbeb562f60dd2ae0a51be12a6e073218", "sha256": "126968885e9838cc1ca8dfa60ec8897fd8469a570c61abd674c7938278825a95" }, "downloads": -1, "filename": "ggame-1.0.7.tar.gz", "has_sig": false, "md5_digest": "dbeb562f60dd2ae0a51be12a6e073218", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 225370, "upload_time": "2019-01-06T03:02:06", "url": "https://files.pythonhosted.org/packages/38/c8/2c81b9a286469940d04c0d9ff82451320c7eb27bacd66be8c0edebe32e98/ggame-1.0.7.tar.gz" } ], "1.0.8": [ { "comment_text": "", "digests": { "md5": "7dda6053d0073d113489e1362bc06bc7", "sha256": "61f55fe308d49f8c15cb7c7833d439de55e5fd525961ca8124242cdd98696466" }, "downloads": -1, "filename": "ggame-1.0.8-py3-none-any.whl", "has_sig": false, "md5_digest": "7dda6053d0073d113489e1362bc06bc7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 220209, "upload_time": "2019-01-09T02:23:51", "url": "https://files.pythonhosted.org/packages/65/a2/2561d1cb3f41215423a9daad2fe094b51f8a69178a988ff79e1f948bb9d2/ggame-1.0.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4ea02046ff8b95974d66de8efa8ef7c8", "sha256": "55d2eedc607789934050c73b97415cb03441d48f4ca062c938cc5575e4589dd1" }, "downloads": -1, "filename": "ggame-1.0.8.tar.gz", "has_sig": false, "md5_digest": "4ea02046ff8b95974d66de8efa8ef7c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 225374, "upload_time": "2019-01-09T02:23:53", "url": "https://files.pythonhosted.org/packages/fa/c0/6e8e902126ba629180c3f59fe9c2a83c1a565579d7c880211c10fca019d4/ggame-1.0.8.tar.gz" } ], "1.0.9": [ { "comment_text": "", "digests": { "md5": "5220daf77a3dc5df6373a4c0d2d2ba93", "sha256": "6a9c206f4e24f5a4b3e3b9b2c6186bb1244202983aaff5b3d1d56e226b83c30b" }, "downloads": -1, "filename": "ggame-1.0.9-py3-none-any.whl", "has_sig": false, "md5_digest": "5220daf77a3dc5df6373a4c0d2d2ba93", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 54394, "upload_time": "2019-06-20T21:27:05", "url": "https://files.pythonhosted.org/packages/62/41/e294f081ca4bfbfacb918931268a28d39f2f41e97be6e99bbbb3da64a158/ggame-1.0.9-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "200fd0a391f079f81d7a39be69b4117f", "sha256": "2ce57cef5778ca8b6241963f62206709e77d1ad0ab641c8f1dd3c384e18fc9c3" }, "downloads": -1, "filename": "ggame-1.0.9.tar.gz", "has_sig": false, "md5_digest": "200fd0a391f079f81d7a39be69b4117f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 46469, "upload_time": "2019-06-20T21:27:06", "url": "https://files.pythonhosted.org/packages/a3/0d/d8ee541c5de212c185a7e19fab638d4626665a1e7a988f299580cc18c197/ggame-1.0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "21ec7429bdb1a0fdc0dd23299ecd0deb", "sha256": "7b2f706fb8dadcb64161c8f0548021b6d28f59d3fae9c8c051204b64ea06d0cd" }, "downloads": -1, "filename": "ggame-1.0.11-py3-none-any.whl", "has_sig": false, "md5_digest": "21ec7429bdb1a0fdc0dd23299ecd0deb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 231440, "upload_time": "2019-08-07T22:45:18", "url": "https://files.pythonhosted.org/packages/f3/f8/71240974af3faf9e2357b479dcf9a6fc85a4317cd6a5f58e6bb53dbf1971/ggame-1.0.11-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b210d299f76c458786dc54e786c8db90", "sha256": "b9793c9c7fa4b51b01dc1d14b4ce5dc2a081915bd07a75ca2a1f32eb782d117a" }, "downloads": -1, "filename": "ggame-1.0.11.tar.gz", "has_sig": false, "md5_digest": "b210d299f76c458786dc54e786c8db90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 226204, "upload_time": "2019-08-07T22:45:20", "url": "https://files.pythonhosted.org/packages/b4/70/e6ac3d23235e6f1ddd7d6a944b991e677708e21da60ac1f9493c6509a65a/ggame-1.0.11.tar.gz" } ] }