{ "info": { "author": "Silvio Marco Costantini", "author_email": "agsilvio@protonmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# GameStorm - Library\n\nWelcome!\n\n## What is GameStorm?\n\nGameStorm is a python package - with batteries included - which helps you makes small, grid-based games easily and with very little code. It is built on top of PyGame which is a very flexible and wonderful 2D game engine.\n\nhttps://www.pygame.org\n\n## Small? Grid-based? Can you show me an example?\n\nSure! Look at the following picture. It is an example of what you can make using GameStorm out of the box (remember, batteries included)!\n\n#### Example 1\n![Example Image 1](docs/game1.png)\n\n#### Example 2\n![Example Image 2](docs/game2.png)\n\n## What does 'batteries included' mean?\n\nThat means GameStorm has all you need to make a small game? Sample graphics, text, and sounds are already present. You can use your own, but you don't have to! Also, gamestorm is preconfigured to work with specific keyboard keys as well as gamepads!\n\n## GameStorm seems limited. What is the point?\n\nGood question. GameStorm has three purposes:\n\n1. Learning. GameStorm makes it easy to learn game-programming. In fact, why not learn programming in general with GameStorm? Graphical content can be more fun than text (\"Hello World!\")\n2. Prototyping. GameStorm gives you the ability to prototype a game idea very easily. Sure, the idea will have to use a grid, but many games do; Chess, Tetris, Sokoban. There are many things you can do with a grid and tiles.\n3. Fun! It's fun to make games. It's more fun to see your concept on screen quickly than it is to learn to use a fully fledged game engine.\n\n## I'm intrigued. How can I give this a try?\n\nFirst, install it with pip:\n\n`pip install gamestorm`\n\nThen continue reading the for more detailed instructions. Enjoy!\n\n# GameStorm Documenation\n\nBefore looking at any code, you should understand the system and the conventions that GameStorm uses. It's simple and effective.\n\n## The GameStorm 'System'\n\n\n### Grid\n\nThe grid is the visual game area. It takes up the entire window. You can specify how big or small you want it to be. The grid is made up of columns and rows which contain tiles. You don't work much with the grid, other than to set it up. Mainly you work with its tiles.\n\n### Tiles\n\nThese are the main resources of the game. Each 'cell' in the grid is a tile. A tile has three major components; a background, a symbol, and a cursor, and they are drawn in that order. You can perform various operations on the tiles and their components. Some examples are:\n\n- Set the background of all the tiles.\n- Set the symbol of a specific tile. \n- Clear (remove) the cursor of a specific tile.\n- Draw some text starting as a specific tile.\n- Clear all the components of all the tiles.\n\nSee the [API documentation](https://github.com/agsilvio/gamestorm/blob/master/docs/api.md) for all the methods available concerning tiles.\n\nThe following picture contains a diagram of a tile and its components.\n\n![Tile Example](docs/composite.png)\n\n![Tile Exploded View](docs/exploded-labelled.png)\n\nThe essence of gamestorm is manipulating these components to make a small but fun game. Remember, there are already hundred of sample backgrounds, symbols, and cursors included. So you can use these if you don't want to worry about graphical assets just yet.\n\n### Text\n\nYou can draw text ina GameStorm game. It's *very* limited. There is only one font. And each character is drawn to a separate tile. This method was chosen to keep the API as simple as possible. Fortunately, you can draw the text you want, starting at the tile you want, using one simple method.\n\n* Note: Overriding the font is not yet possible, but is coming soon hopefully.\n\n### Drawing / Rendering\n\nDrawing - that is, the actual rendering to the screen - is done deliberately. That means, you manipulate the backgrounds, symbols, and cursors of all the tiles you want, and then you perform the rendering by calling 'draw'. For example, a symbol is not drawn when you set one to a tile. Instead, it will be waiting for you to call 'draw'.\n\n### Input\n\nFor input, GameStorm makes use of the keyboard or a gamepad. There are simple methods, for checking when one of the keys/buttons was pressed. For simplicity, the input is limited to the number of buttons that would appear on a SNES gamepad. That means, the keyboard and gamepad are restricted to the following keys:\n\n Name | Gamepad | Keyboard \n---|---|---\n Up | Up | Up Arrow \n Down | Down | Down Arrow \n Left | Left | Left Arrow \n Right | Right | Right Arrow \n Button 1 | Button 1 | Key 1 \n Button 2 | Button 2 | Key 2 \n Button 3 | Button 3 | Key 3 \n Button 4 | Button 4 | Key 4 \n Button 5 | Button 5 | Key 5 \n Button 6 | Button 6 | Key 6 \n Select | Select | TAB \n Start | Start | ENTER \n Exit | None | ESC \n\n* Note: Remapping the keys or the gamepad buttons is not yet possible, but is coming soon hopefully.\n\nIn no time, you can make a game and use a gamepad to control it!\n\n### SoundFX and Music\n\nIn GameStorm, there are two types of sounds: soundfx and music. Music is longer audio that is meant to be played while the game is running. SoundFX are small audio samples that are meant to be played upon certain events. For example, you can play an explosion sound when something in the game is destroyed, or you can play a 'beep' sound when you move the cursor from one tile to another.\n\nGameStorm has a few built-in music tracks and many soundFX so you can put sound in your game right away. You can use your own music and sound if you want to.\n\n### Ready to try?\n\nIf you're ready to see some code, then continue reading.\n\n## Code\n\nLet's start with a simple example; our take on Hello World.\n\n```python\nimport gamestorm\n\nnum_tiles_x = 15\nnum_tiles_y = 7\nscreen_width = 1280\nscreen_height = 720\n\n#these two lines are required\ng = gamestorm.GameStorm()\ng.init(num_tiles_x, num_tiles_y, screen_width, screen_height, title = 'Hello World')\n\n#set up some stuff to draw soon!\ng.set_all_tiles_background(25)\n\ng.set_tile_symbol(6,4,196)\ng.set_tile_symbol(7,4,196)\ng.set_tile_symbol(8,4,196)\ng.set_tile_cursor(7,4,1)\n\ng.draw_text(2,1, 'Hello World!')\n\n#perform the draw\ng.draw()\n\n#check for the exit event to quit\nwhile True:\n events = g.get_events()\n if g.is_exit_button_pressed(events):\n g.quit()\n break\n```\n\nThat small script will render what's in the following image.\n\n![Hello World](docs/example.png)\n\nJust as we promised; simple! We will not demonstrate the use of sounds here, but we assure you the API is very straight forward, and you will know how to play sounds just by perusing the [API documentation](https://github.com/agsilvio/gamestorm/blob/master/docs/api.md).\n\n\n# Conclusion\n\nWe hope you enjoy GameStorm. We hope that it helps to inspire students, programmers, makers and more. Enjoy!\n\n# FOR DEVELOPMENT OF THE GAMESTORM LIBRARY\n\nIf you want to help out with this project - first of all, thank you - here are helpful hints.\n\nInstall it by making a Virtualenv environment (python3) and then \n\n`pip install .`\n\nRun the tests by running\n\n`nose2 tests`\n\nRun the sample program above as a start. It's the file called `sample-program.py`\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/agsilvio/gamestorm-library", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "gamestorm", "package_url": "https://pypi.org/project/gamestorm/", "platform": "", "project_url": "https://pypi.org/project/gamestorm/", "project_urls": { "Homepage": "https://github.com/agsilvio/gamestorm-library" }, "release_url": "https://pypi.org/project/gamestorm/1.0.0/", "requires_dist": [ "pygame", "unittest2", "nose2" ], "requires_python": "", "summary": "A minimal, batteries included, 2D game engine using grid-based graphics.", "version": "1.0.0" }, "last_serial": 5585183, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "d23f68dcce695c025e950f70e82d5818", "sha256": "3e2e6a46d92578bee3426c197fceb086cb64a278c66529a29f85a5f3ad042de3" }, "downloads": -1, "filename": "gamestorm-0.0.1.tar.gz", "has_sig": false, "md5_digest": "d23f68dcce695c025e950f70e82d5818", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6320327, "upload_time": "2019-01-22T21:16:59", "url": "https://files.pythonhosted.org/packages/0f/8d/752fe394eaaa38d75ccc47af8557ae12e6ed4b8fdcc6b25280bfc88c2843/gamestorm-0.0.1.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "e74b9e4ab541b0670944bfec3a7c22ec", "sha256": "cbc711fc8b5eff9522350978097fd8fa4dcb24b30ccd0a37d326a91cc14f05c1" }, "downloads": -1, "filename": "gamestorm-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e74b9e4ab541b0670944bfec3a7c22ec", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6877606, "upload_time": "2019-07-25T19:17:27", "url": "https://files.pythonhosted.org/packages/7f/62/37ac09b42602065496270609a81629b4264e6ff12afe5528eb5b2158d731/gamestorm-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1574ee5a9375c05cc4e46f655a62429b", "sha256": "4184c4b6eed1917d978c578d68d3403cb7677f90e776a521ca370dc4e7c26331" }, "downloads": -1, "filename": "gamestorm-1.0.0.tar.gz", "has_sig": false, "md5_digest": "1574ee5a9375c05cc4e46f655a62429b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6310425, "upload_time": "2019-07-25T19:17:32", "url": "https://files.pythonhosted.org/packages/d0/cd/73f7eeb2325a844bda89805b0fd220c9adea0764b855fe1182f667b00d4d/gamestorm-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e74b9e4ab541b0670944bfec3a7c22ec", "sha256": "cbc711fc8b5eff9522350978097fd8fa4dcb24b30ccd0a37d326a91cc14f05c1" }, "downloads": -1, "filename": "gamestorm-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e74b9e4ab541b0670944bfec3a7c22ec", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6877606, "upload_time": "2019-07-25T19:17:27", "url": "https://files.pythonhosted.org/packages/7f/62/37ac09b42602065496270609a81629b4264e6ff12afe5528eb5b2158d731/gamestorm-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1574ee5a9375c05cc4e46f655a62429b", "sha256": "4184c4b6eed1917d978c578d68d3403cb7677f90e776a521ca370dc4e7c26331" }, "downloads": -1, "filename": "gamestorm-1.0.0.tar.gz", "has_sig": false, "md5_digest": "1574ee5a9375c05cc4e46f655a62429b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6310425, "upload_time": "2019-07-25T19:17:32", "url": "https://files.pythonhosted.org/packages/d0/cd/73f7eeb2325a844bda89805b0fd220c9adea0764b855fe1182f667b00d4d/gamestorm-1.0.0.tar.gz" } ] }