--------- Sections ---------

<Index> - >DevDiary< - <Characters> - <Lore>

ichi rss

--- DevDiary ---

<Back>

- 2023/06/17 -

This week, I continued working on the stage editor.


The fundamental part of a stage editor is the stage editing functionality itself. While stage selection had already been implemented, I still had to add the ability to edit these stages. SD2020 was the opposite, in that it could edit a single stage, but not select among them. The hard work of making the editing screen was therefore replaced with the hard work of porting the stage editor from SD2020.


Editing a stage in SDR.


Most of the stage editing functions have been restored in SDR. It is now possible to replace enemies and splitters, change the background, adjust the timer, and then save it all in a file to then load up and play. However, there is still one major function missing: changing the files themselves.


Clicking on the diskette icon in the top left in SD2020 immediately saved the stage as trial.mbl. Right now in SDR it also saves the stage in whatever stage file was originally opened for editing, but the plan is to give this icon a typical "Save as" function. It would allow the player to either overwrite the original file, keep it intact and save as a separate copy instead, or overwrite some other file. Most of these options require the ability to input a file name.


In one of my previous Godot projects, I handled text input via a specific Godot hack: the game had a high-level text input node that was outside of the screen, would be focused whenever text input was needed, and copied its contents to whatever line of text I actually had on the screen. This, while being a working solution, heavily depended on Godot's built-in nodes, which goes against my desire to use as little of high-level stuff as possible.


I can detect arbitrary key presses, but it seems that I have to build up a large table that assigns characters to event names (e.g. picking up a "BracketLeft" event and turning it into a "[") and then adds them to the text input field. This means that SDR's text input will be based on a white list of characters rather than a black list, and this will definitely annoy players who expect to have mildly exotic characters in their file names. But this is the best I can do without giving up my values.