Skip to content

The low-code platform for learning game development.

License

Notifications You must be signed in to change notification settings

Developer-Mike/sprout

Repository files navigation

Logo
Sprout

The low-code platform for learning game development.

Time Spent MPL-2.0 license

Important

For Sprout to work properly, you must use Chrome.

🌱 SproutScript

Sprout uses the custom SproutScript language.

  • Variable Definition: var x = 0
  • Function Declaration: fun foo = () { }
  • While-Loop: while (condition) { }
  • For-Loop: for (i in range(10)) { }
  • On-Statement (Gets executed every frame if condition is met): on (condition) { }

Check out the "Pong" project for a sample project.

🚀 Running the project

  1. Clone the repository
git clone https://github.com/Developer-Mike/sprout.git
  1. Install the dependencies
npm i
  1. Run the application
npm run dev

✨ Roadmap

  • Create the project
  • Decide the style and design of the project
  • Implement the basic UI using Next.js and SCSS
  • Design the basic structure of the project data
  • Make it work with fixed data and JavaScript
  • Add support for sprites
  • Implement game objects pane
    • Add game object settings
    • Don't allow adding objects with the same id
    • Allow reordering of the objects
    • Confirm deletion of objects
  • Add keyboard shortcuts
  • Make the code editor work with JavaScript
  • Load and save the project data
    • Detect unsaved project and prevent closing the tab if the data is not saved
    • Automatically save the project data
      • Add save history
      • Make the history less detailed
    • Add loading progress bar
  • Add projects overview (list of projects)
  • Sprites Tab
    • Add the ability to reorder sprites
    • Add the ability to change the active sprite
    • Add the ability to delete sprites
  • Add sprites library dialog
    • Add the ability to upload sprites
    • Add the ability to delete sprites
    • Add the ability to rename sprites
    • Add the ability to assign sprites to game objects
    • Add sprite information
  • Only add LabeledNumberInput change to history after the user stops dragging
  • Add undo/redo to the navbar
  • Always save project before rerouting
  • Create the programming language for Sprout
    • Remove the usage of large strings and eval in the SproutEngine
    • Create programming language concepts
      • Variables
      • Functions
      • Loops (for, while)
      • Conditions (if, else)
      • Comments
    • Create Lexer (Code -> Tokens)
    • Create Parser (Tokens -> AST)
      • Add support for mutable variables
      • Add support for if, while, for and on statements
      • Add support for await expressions
      • Add support for lists
      • Add support for index access (and square brackets access in general)
      • Fix return statements inside for loops not working
      • Fix return statements nested inside if statements not working
        • Change if expressions to statements? -> Added both types!
      • [!] Fix return statements inside e.g. if expressions checking next line for return value
      • Add support for && and || operators
      • [!] (If time allows) Add support for lambdas
      • [!] (If time allows) Add support for objects
      • (If time allows) Add support for +=, -=, *=, /= operators
      • (If time allows) Add support for unary operators (!bool, -var, +var, ++, --)
    • Create AST compiler function (AST -> JavaScript)
    • Create error handling (Compilation & Runtime)
    • Show errors in the code editor
    • Fix the syntax highlighting and linting (Only basic syntax highlighting)
    • (If time allows) Add autocomplete for some objects (e.g. game_objects, sprites)
    • Fix execution of the code
    • Add implemented functions to the language
      • range
      • Expose math functions
  • Add implemented functions to the engine
    • move, rotate (Handle delta_time)
    • rotate_to
    • collides_with, collides_with_box, collides_with_mouse
    • sleep
    • [!] (If time allows) Add physics engine
    • [!] (If time allows) Add support for camera
      • [!] stage.camera
        • [!] x, y (properties)
        • [!] move (handle delta_time)
    • [!] (If time allows) Add support for drawing (new entry in the runtime data)
      • [!] draw_text
      • [!] draw_line
      • [!] draw_rectangle
      • [!] draw_circle
    • (If time allows) Add support cloning and destroying game objects while the game is running
      • clone
      • destroy
      • is_clone (property)
  • Add console view
    • Throw error if the user wants to start the game with syntax errors
    • Catch runtime errors and show them in the console
    • [!] (If time allows) Add advanced explanations to error messages
  • Miscellaneous
    • Add a clean way to handle debug information
    • Rework game object scaling (width and factor for height) -> Fix different scaling for different sprites
      • Add width and height info to the sprites in the sprites library
    • Solve all TODOs
    • Remove all DEBUGs
    • Fix canvas can be right-clicked
    • Disable the ability to select game objects through the canvas if th game is running
    • When editing a float and deleting the last digit before the decimal point, the dot gets deleted unintentionally
    • When editing e.g. 800 and deleting the 8, the 0 gets deleted unintentionally
    • Limit max height of game object preview in code editor
    • Reset linked scaling when changing the sprite
    • [!] (Out of scope) Allow simple calculations in the LabeledNumberInput
  • Create some example games
    • [!] Add the ability to add information text to the documentation sidebar
  • Add warning if not using Chrome
  • Bugfixes
    • Add absolute identifiers to project paths -> Fix project with same filename not visible in the projects overview
    • Fix rotation of game objects causing other game objects to move
    • Fix deletion of all game objects causing null value of selected object key
  • (If time allows) Add the ability to duplicate game objects
  • [!] (If time allows) Add the ability to add plugins (keep in mind: security risk)
  • [!] (Out of scope) Add the ability to export and import game objects individually
  • [!] (Out of scope) Add export of the games to standalone websites
  • [!] (Out of scope) Add the ability to add sounds and music
  • [!] (Out of scope) Create tool for simple image editing of sprites
  • [!] (Out of scope) Add tooltips
    • [!] Unsaved changes
    • [!] Game object properties
    • [!] Add game object button
    • [!] Vertical tab buttons

About

The low-code platform for learning game development.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published