{ "info": { "author": "Sven Mika", "author_email": "sven.mika@ducandu.com", "bugtrack_url": null, "classifiers": [], "description": "Quick Setup Instructions\n========================\n\n.. figure:: https://raw.githubusercontent.com/sven1977/spygame/master/examples/platformer_2d/screen2.png\n :alt: The Lost Vikings - Sample spygame Level\n\n The Lost Vikings - Sample spygame Level - *All graphics are (c) Blizzard Entertainment Inc (The Lost Vikings)*\n\n\nGet the code\n------------\n- You may need a pygame version that matches your python version. E.g. for Windows 10 64bit + python3.6, you can download `pygame\u00e2\u20ac\u20181.9.3\u00e2\u20ac\u2018cp36\u00e2\u20ac\u2018cp36m\u00e2\u20ac\u2018win_amd64.whl from here `_ and then do a ``pip install [path to downloaded wheel]``\n- Git the `spygame `_ code or do a ``pip install spygame``\n\nGet started\n-----------\n- write a simple game against the engine:\n\n.. code-block:: python\n :linenos:\n\n import spygame as spyg\n\n\n class MyAgent(spyg.Sprite):\n def __init__(self, x, y):\n super().__init__(x, y, sprite_sheet=spyg.SpriteSheet(\"data/erik.tsx\"), tile=0)\n\n # some custom settings\n self.handles_own_collisions = True # our agent handles its own collisions (instead of letting the Stage do it for us)\n # add a HumanPlayerBrain for keyboard input handling\n self.cmp_brain = self.add_component(spyg.SimpleHumanBrain(\"brain\", [\"up\", \"down\", \"left\", \"right\"]))\n # add a physics component to physics handling (here we use: simple 2D top-down view and controls)\n self.cmp_physics = self.add_component(spyg.TopDownPhysics(\"physics\"))\n\n # plain spyg.Sprite objects do not implement the `tick` function, so nothing ever happens with them\n # - we need to implement it here to make sure our components (brain and physics) are ticked as well\n def tick(self, game_loop):\n self.cmp_brain.tick(game_loop)\n self.cmp_physics.tick(game_loop)\n\n\n if __name__ == \"__main__\":\n # create a spyg.Game object\n game = spyg.Game(screens_and_levels=[\n # the only level\n {\n \"class\": spyg.Level, \"name\": \"MAZE\", \"id\": 1, # <- this will read the data/maze.tmx file for the level's layout and setup data\n },\n\n # add more of your levels here\n # { ... },\n\n ], title=\"The Maze Runner - An A-maze-ing Game :)\")\n\n # that's it, play one of the levels -> this will enter an endless game loop\n game.levels_by_name[\"MAZE\"].play()\n\n\nAll you need in order to run this game is the above code in a directory, and the additional subdirectories data/ and images/, which can\nbe found `here `_. These directories contain the necessary SpriteSheets,\nlevel background images and level setup (collision layers, background images, position and class of the player, etc..).\n\nThis should give you a level like this:\n\n.. figure:: https://raw.githubusercontent.com/sven1977/spygame/master/examples/maze_runner/screen1.png\n :alt: The Maze Runner - An A-maze-ing Game :)\n\n The Maze Runner - An A-maze-ing Game :) - *All graphics are (c) Blizzard Entertainment Inc (The Lost Vikings)*\n\nYou can now control the Agent via the four arrow keys (up, down, left, right).\n\nNext steps\n----------\n\nIf you would like to create more complex levels (or entire Games with many Screens and Levels), read the\n`spygame documentation `_, in which we'll create a full-blown 2D platformer Level\n(sorry, documentation is still very WIP!).\n\nAI (Reinforcement Learning) with spygame\n----------------------------------------\n\nI'm currently working on making spygame available as an openAI-gym Environment type, so that reinforcement learning algorithms can run against any spygame\nLevel objects.\n\nContribute to spygame\n---------------------\nIf you would like to contribute to the spygame library, the following items are currently open:\n\n- add audio/sound support\n- create more example games\n- create more \"Lost Vikings\" levels\n- create more physics components (apart from the existing top-down and platformer)\n- create support for GUI elements (label, buttons, tick-boxes, etc..). This is an open Pygame problem and should probably be solved on the Pygame level.\n- help out with integrating spygame into openAI-gym and openAI-rllab repos\n\n.. figure:: https://raw.githubusercontent.com/sven1977/spygame/master/examples/platformer_2d/screen1.png\n :alt: Lost Vikings - Sample spygame Level\n\n Lost Vikings - Sample spygame Level - *All graphics are (c) Blizzard Entertainment Inc (The Lost Vikings)*\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/sven1977/spygame/archive/spygame-0.1.zip", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.github.com/sven1977/spygame", "keywords": "python-3", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "spygame", "package_url": "https://pypi.org/project/spygame/", "platform": "", "project_url": "https://pypi.org/project/spygame/", "project_urls": { "Download": "https://github.com/sven1977/spygame/archive/spygame-0.1.zip", "Homepage": "http://www.github.com/sven1977/spygame" }, "release_url": "https://pypi.org/project/spygame/0.1a9/", "requires_dist": null, "requires_python": "", "summary": "2D game engine based on pygame and level-tmx files (soon to be: fully openAI gym integrated)", "version": "0.1a9" }, "last_serial": 3025127, "releases": { "0.1a2": [ { "comment_text": "", "digests": { "md5": "27540a3a150192a4f5559fb1093a89a5", "sha256": "5bd38d51dbea99e46d6f7d4c11cc23cea97471834683cb7013ad57e73f24ecd4" }, "downloads": -1, "filename": "spygame-0.1a2.tar.gz", "has_sig": false, "md5_digest": "27540a3a150192a4f5559fb1093a89a5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 56181, "upload_time": "2017-07-05T10:31:11", "url": "https://files.pythonhosted.org/packages/4a/9f/4ecdcbde128848d3d9e1293acc08d35c365aa93f7d65d7bb6c7c9e01024d/spygame-0.1a2.tar.gz" } ], "0.1a3": [ { "comment_text": "", "digests": { "md5": "2b7006eca093d8562261524f262abc71", "sha256": "d1e3a7fa9de9fbc538d921e6b1b84fc2ec158f21e2f100381bc5f3eca1b81150" }, "downloads": -1, "filename": "spygame-0.1a3.tar.gz", "has_sig": false, "md5_digest": "2b7006eca093d8562261524f262abc71", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 56456, "upload_time": "2017-07-05T10:38:49", "url": "https://files.pythonhosted.org/packages/d3/3e/70310e61b6942fdb99edb1c064ef5bcb21fe7a10d0b74cdb1079e427465f/spygame-0.1a3.tar.gz" } ], "0.1a4": [ { "comment_text": "", "digests": { "md5": "36f30d9593aafd0c273903dd7155c744", "sha256": "7e316d2aa8817222856a13651618d48e13936bac60bdf80d544662614e115841" }, "downloads": -1, "filename": "spygame-0.1a4.tar.gz", "has_sig": false, "md5_digest": "36f30d9593aafd0c273903dd7155c744", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 55838, "upload_time": "2017-07-05T11:41:16", "url": "https://files.pythonhosted.org/packages/5d/7d/adbd4ea20f5cd33a6fd75c8dc03668a18d021f15c44cf19e8130c0e47e8a/spygame-0.1a4.tar.gz" } ], "0.1a5": [ { "comment_text": "", "digests": { "md5": "8b2819134be71087e7a8d469405b8899", "sha256": "1bba7e06cf0e650ad3e5dafc7e3ee3104c2f8e26be65ca4c0a0274051ec66795" }, "downloads": -1, "filename": "spygame-0.1a5.tar.gz", "has_sig": false, "md5_digest": "8b2819134be71087e7a8d469405b8899", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 56271, "upload_time": "2017-07-05T12:45:41", "url": "https://files.pythonhosted.org/packages/67/77/323923127930681231483c8d32905d63224d3fbdf662f7ea2373e80b0cd5/spygame-0.1a5.tar.gz" } ], "0.1a6": [ { "comment_text": "", "digests": { "md5": "1a78601a006b541a8c92352b3e0a1e1b", "sha256": "0af7531c8aa230c216b0b2901d684e45ba1e520c75f21b2ec27f8be80fb965d0" }, "downloads": -1, "filename": "spygame-0.1a6.tar.gz", "has_sig": false, "md5_digest": "1a78601a006b541a8c92352b3e0a1e1b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 56114, "upload_time": "2017-07-06T11:30:19", "url": "https://files.pythonhosted.org/packages/9d/dd/3d09d5bce81ed2c71ffa1ff4089e26fcc8615a1d2ad983349ad5f4388451/spygame-0.1a6.tar.gz" } ], "0.1a7": [ { "comment_text": "", "digests": { "md5": "5f0098e7d08d7f87f25eb6b6b5618123", "sha256": "b36e38acb0fd084ad6974faab1c9d24ad8124400e437b92f6ebea063fd262986" }, "downloads": -1, "filename": "spygame-0.1a7.tar.gz", "has_sig": false, "md5_digest": "5f0098e7d08d7f87f25eb6b6b5618123", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 68003, "upload_time": "2017-07-10T09:36:18", "url": "https://files.pythonhosted.org/packages/95/ca/fb2e1d112abb256aade251624ccebecc86049ba7aad62f3650823b676b7b/spygame-0.1a7.tar.gz" } ], "0.1a8": [ { "comment_text": "", "digests": { "md5": "5e7f757a5e669d5cea0e1f3eb12b7d6e", "sha256": "0ca0facd865c773730eac7cfce45b02629d90fa44a4f18e36465dd953405aa32" }, "downloads": -1, "filename": "spygame-0.1a8.tar.gz", "has_sig": false, "md5_digest": "5e7f757a5e669d5cea0e1f3eb12b7d6e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 67993, "upload_time": "2017-07-10T09:39:10", "url": "https://files.pythonhosted.org/packages/17/f5/75d848fa830f0c21644d96c95b79ec65506189d897397b15cd7dd020fcc3/spygame-0.1a8.tar.gz" } ], "0.1a9": [ { "comment_text": "", "digests": { "md5": "9e8a975792d8761e9103b2c4c7fd94da", "sha256": "6c36282b2d3d7028660be3fb2841dcadee1dffc036e50feb9b1cf8be9109f861" }, "downloads": -1, "filename": "spygame-0.1a9.tar.gz", "has_sig": false, "md5_digest": "9e8a975792d8761e9103b2c4c7fd94da", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 70622, "upload_time": "2017-07-15T15:14:50", "url": "https://files.pythonhosted.org/packages/4c/41/e6205f9718e5703d7ba02c3bb20aa52a80bcbcc4ad50a5f457abc6abbbb1/spygame-0.1a9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9e8a975792d8761e9103b2c4c7fd94da", "sha256": "6c36282b2d3d7028660be3fb2841dcadee1dffc036e50feb9b1cf8be9109f861" }, "downloads": -1, "filename": "spygame-0.1a9.tar.gz", "has_sig": false, "md5_digest": "9e8a975792d8761e9103b2c4c7fd94da", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 70622, "upload_time": "2017-07-15T15:14:50", "url": "https://files.pythonhosted.org/packages/4c/41/e6205f9718e5703d7ba02c3bb20aa52a80bcbcc4ad50a5f457abc6abbbb1/spygame-0.1a9.tar.gz" } ] }