Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Level Editor #50

Draft
wants to merge 18 commits into
base: menu_screens
Choose a base branch
from
Draft

Level Editor #50

wants to merge 18 commits into from

Conversation

CollinWoo
Copy link

Overview

This Pull Request is the first step towards implementing a level editor to create env.json files using a GUI interface, simplifying the workflow for creating new environments.

Changes Made

  • Created an env.json file that encapsulates all objects currently available in the game, to make sure the level editor can replicate all current functionality
  • imported the pygame-gui library to simplify the workflow for creating layouts/components for GUI elements
  • Added a new option to the main menu that takes the player to the level editor
  • Fully implemented the sidebar for the level editor, which serializes the list of all in-game objects from robotouille_config.json, places them in appropriate categories, and renders images of the objects that can be clicked on to select them. Users can jump between categories by clicking on the tabs at the top, and select an object to place in the grid by selecting its corresponding button.
  • Implemented the skeleton of a draggable + zoomable grid, where the objects from the sidebar will be placed to create a level.

Test Coverage

Testing was performed by running the game using python main.py and playtesting the level editor to make sure everything behaves as intended. This included selecting different ingredients from the sidebar and placing them on the grid, verifying objects are registered as being placed in the correct grid coordinate, zooming in and out of the grid, and dragging the grid around the screen.

Next Steps

  • Implement serialization from objects placed on the grid to a finalized env.json
  • Render placed objects accurately on the grid

Related PRs or Issues

This branch is branched off of menu-screens and is therefore related to #47 , since both PRs heavily deal with adding new GUI elements.

Screenshots

Level Editor image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant