TurboWarp / scratch-vm

Scratch VM with a JIT compiler and more features
https://turbowarp.org/
Mozilla Public License 2.0
75 stars 72 forks source link

Use a INI-like format for the Advanced Settings configuration comment #114

Closed aspizu closed 1 year ago

aspizu commented 1 year ago

The comment should look like this:

[Turbowarp Configuration]
frame_rate       = 60
interpolation    = true
high_quality_pen = true
warp_timer       = true
infinite_clones  = false
sprite_fencing   = false
misc_limits      = true
stage_width      = 720
stage_height     = 360
disable_compiler = true

Why?

The JSON configuration comment looks ugly. Some people might prefer to configure Advanced Settings by editing the comment.

Another reason for this change ( The actual reason why I want this change )

To configure Advanced Settings in a GoboScript project, a comment like this needs to be added.

(*{"framerate":60,"hq":true} // _twconfig_*)

With this change, that comment will look like

(*
[Turbowarp Configuration]
frame_rate = 60
high_quality_pen = true
*)
GarboMuffin commented 1 year ago

it is not supposed to be edited by hand

GarboMuffin commented 1 year ago

The current format is something we need to support forever. Adding a second format with marginal benefit is a hard idea to sell

jessiejs commented 1 year ago

You could theoretically use YAML, which looks cleaner and is backwards compatible with JSON.