-
Notifications
You must be signed in to change notification settings - Fork 0
erasmushaggblom/budgetgame
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This repository contains source code and instructions for deploying an online budget game. In the game, participants act as the responsible official for the chosen number of schools. The game contains a great deal of customisability depending on the needs of the user. At present, the game will be played for 1 practice round and 2 main rounds for 2 schools. This can be adjusted up to 10 rounds and 7 schools. Note that visual edits may be required when adjusting the number of schools. The game is meant to be deployed online using Pygbag and to store data online using API requests. The game includes the RequestHandler object for API calls. For full functionality, custom URLs and identity checks are required for API calls. The game is also intended to read and pass URL arguments that provide integration with survey and participant recruitment software (e.g. Prolific and Qualtrics) by matching instances of game and survey responses. Custom URLS are also required here for full functionality. The information that can be passed is extensively customizable depending on the usage case. The game includes extensive data storage functionality for research purposes. The data is stored as a JSON string, which can be parsed in a wide variety of ways to obtain the desired information from the gameplay data. The game includes all the required visual assets. Additional assets (e.g. fonts, images) can be added if desired. The game is currently ready to be deployed. If data storage and redirection is desired, the following deployment workflow should be followed: 1. Make any adjustments to the code you want. Pay particular attention to identity checks and URLs for redirection and data storage. Elements requiring individual adjustment for full functionality can be found by searching for strings starting with "YOUR_". To enable redirects, the object self.check_identity should be set to TRUE. 2. Adjust visual resources if so desired 3. Run the pygbag WebAssembly conversion. Due to a known issue with sound in Safari, it is recommended that the option ume_block 0 is used. If the command is run in the console in the same location as the source code folder (not in the folder itself) and no file names have been changed, the following command can be used: --ume_block 0 budget_game_public_code This will host a local server at http://localhost:8000 and generate a new 'build' folder, which can be deployed online. To deploy the program online, simply convert the entire folder (including the build folder, source code and dependencies) into a .zip folder and upload it to the server where you are hosting your program. Additional information on pygbag deployment can be found through the links below: https://pypi.org/project/pygbag/ https://jackwhitworth.com/blog/how-to-run-pygame-in-the-browser/ It is recommended that prior to deploying any part of the game, the requisite dependencies are installed, as detailed below: Python: The software utilises python3, available at: https://www.python.org/downloads/ The software has been tested in a Windows 11 environment, but should run without issue on other systems. Pygame: The experiment makes use of pygame, a simple game design package, available at: https://www.pygame.org/news Pygame needs to be installed using pip, as detailed in the following website: https://www.pygame.org/wiki/GettingStarted Pygbag: The game can be deployed online using pygbag, more information available at: https://pypi.org/project/pygbag/ https://jackwhitworth.com/blog/how-to-run-pygame-in-the-browser/
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published