GithubHelp home page GithubHelp logo

gdquest / godot-practice-framework Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 0.0 1.33 MB

A framework to create interactive coding practices in the Godot engine.

License: MIT License

GDScript 74.82% Makefile 0.06% GAP 25.12%
education godot godot-4 godot-engine

godot-practice-framework's Introduction

Godot practice framework

A toolkit for creating interactive practices in the Godot engine.

Editing project configuration at build time

You can edit the project settings (the project.godot file) at build time by creating a script named diff.gd in the res://practice_solutions/ folder.

This is useful for removing or adding input actions, changing the project's main scene, or changing the project settings in the workbook and solution projects.

The project settings are used as the reference for the solution project, and the diff.gd script is applied when generating the workbook project.

For example, this code snippet removes all input actions from the workbook, except for the ui_* actions included by default by Godot.

static func edit_project_configuration() -> void:
    const INPUT_KEY := "input/%s"
    for action in InputMap.get_actions():
        if action.begins_with("ui"):
            continue
        ProjectSettings.set_setting(INPUT_KEY % action, null)
    ProjectSettings.save()

Troubleshooting

Instantiated scenes in the workbook project practices point to solution scenes

In some cases, the instantiated scenes in the workbook project practices may appear to point to the solution scenes instead of the files in the res://practices/ folder.

This can be due to a cache problem in the Godot editor. To fix this, you can try the following:

  1. Close the Godot editor.
  2. Delete the .godot/ folder in the project directory.
  3. Open the Godot editor and reload the project.

You can also open the .tscn files of generated practices in a text editor and ensure that the paths to the scenes are correct.

godot-practice-framework's People

Contributors

nathanlovato avatar razcore-rad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

godot-practice-framework's Issues

Upon resetting a practice, GDScript files do not owe to reload on Mac OS

After resetting a practice, some students using Mac OS reported that script files don't get immediately reloaded. After tabbing to another window and coming back, they get a pop-up from Godot offering them to reload or resave the files. The issue doesn't seem to happen anymore with tscn files.

We should see if we can do something extra to force reload scripts, and if not, add mention of problem in user guides.

Reset doesn't always automatically reload the scene

Resetting a practice does not always reload the current scene and all the files automatically when the student is working on the practice scene files.

If possible, when a user resets a practice, we should force a reload of the open scenes and whatever needs a force reload. If that's not possible, the pop-up menu's last message should invite students to reload the scene using the scene menu.

Simplify view options and improve split view when running practices

We don't have the UX set yet for how practice views may end up, but until then, we can make relatively small changes to improve users' experience with practices.

This task has 4 steps:

  1. Remove the stacked / ghost view.
  2. Make the split view the default (it'll be the only view).
  3. The panel should not cover the user practice in split view, but rather reduce the available space for both views when it is open (so as not to hide the practice).
  4. Add an overlay and label on the right view to clearly indicate that the view on the right is the reference.

After the changes above the panel and split views should look something like this.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.