haroldoop Posted September 23, 2022 Share Posted September 23, 2022 Hello; This is a ChoiceScript clone that generates Sega Genesis ROMs. If can be used for visual novels or simple multimedia presentations. It takes a bunch of scripts and images and, from that, it generates SGDK-compatible .c and .res files. Those are then compiled into a Sega Genesis compatible ROM, which can be run on an emulator or even on real hardware. The syntax of the scripts is somewhat based on ChoiceScript, but it is not exactly the same. Please note that this is an early work and progress, and it is not as stable or user-friendly as it is planned to become. Page on itch.io: https://haroldo-ok.itch.io/choice4genesis Github repo: https://github.com/haroldo-ok/choice4genesis Transpiler for version 0.3.0: https://github.com/haroldo-ok/choice4genesis/releases/download/v0.3.0/choice4genesis.-.v0.3.0.-.transpiler.7z Example ROM for version 0.3.0: https://github.com/haroldo-ok/choice4genesis/releases/download/v0.3.0/choice4genesis.-.v0.3.0.-.small.example.bin Video for version 0.1.0: Example script: * font "damieng.com - Hourglass font.png" * background "Blue Hedgehog.png" * create intVar, 1 * create boolVar, true * temp localInt, 2 * set intVar, 3 * set localInt, intVar + 3 * create playingMusic, false * choice * if playingMusic # Stop the music * stop music, sound OK, music is stopped. * set playingMusic, false * elseif FALSE This should not appear This should not play * music "Actraiser - Fillmore.vgm" * else # Play some music * music "Actraiser - Fillmore.vgm" OK, playing Fillmore, from Actraiser. * set playingMusic, true # Play a voice * sound "ready.wav" OK, playing a digital voice. # Show a smiley * image "Smiley.png", at(30, 3) OK... showing a smiley! # Fourth choice You chose the last one * choice # Yet another choice You chose this. # One more choice You chose that. This is a test. Second line. Third line. Quote Commands implemented so far font Loads a .png file containing the 8x8 font. Note that the image must be paletized, with 16 colors. Future versions of this tool will probably convert the image automagically. background Loads a .png file as a background image. Note that the image must be paletized, with 16 colors. Future versions of this tool will probably convert the image automagically. choice Presents a menu to the user, allowing to choose between multiple options. music Starts playing a .vgm/.xgm music in the background. sound Plays a digitized sound. stop Stops the music and/or sound. image Allows drawing a small image in .png format somewhere in the background. Note that the image must be paletized, with 16 colors. Future versions of this tool will probably convert the image automagically. wait Waits for a few seconds. create Creates a global variable. temp Creates a local variable. temp variables are only visible inside the scene file that created them. set Changes the current value of an existing variable. if/elseif/else Allows a certain block of code to only be executed on a given condition. goto_scene Jumps to a different scene. The scene files are located on the script directory, and have the .choice extension. Planned commands The tool accepts those commands, but, at the moment, they don't do anything. label Will allow to mark a place where the goto command can jump to. goto Will jump to a given label from anywhere on the same scene. scene_list Will configure the default sequence in which the scenes will be played. finish Will jump to the next scene in the game. window Will allow to configure the region of the screen that will be used for the text popups and menus. clear Will allow to clear regions of the screen. video Will play a full screen video. 1 1 Quote Link to comment Share on other sites More sharing options...
haroldoop Posted October 2, 2022 Author Share Posted October 2, 2022 (edited) Version 0.6.0 is now available! Implemented between 0.3.0 and 0.6.0: Added a few improvements on the command line tool: It is now possible to choose which project to compile; The command line tool can now invoke the SGDK compiler to convert the generated .c and .res files into ROMs; The command line tool can now call the emulator after compiling; It is now possible to call a command line menu to compile the projects interactively. Added language features: Now it is possible to use print a numeric variable in the middle of a text line by using ${expression}; window: allows to change the location of the text window; flush: immediately displays the contents of the text buffer on the text window; it may or may not wait for a button press; clear: clears a layer/region of the screen. Distributions: Transpiler for version 0.6.0: https://github.com/haroldo-ok/choice4genesis/releases/download/v0.6.0/choice4genesis.-.v0.6.0.-.transpiler.7z Demo ROM for version 0.6.0: https://github.com/haroldo-ok/choice4genesis/releases/download/v0.6.0/choice4genesis.-.v0.6.0.-.simple.demo.rom.bin Standalone distribution for version 0.6.0: https://github.com/haroldo-ok/choice4genesis/releases/download/v0.6.0/choice4genesis-0.6.0-standalone.7z Example script: * font "damieng.com - Hourglass font.png" * background "Blue Hedgehog.png" * create intVar, 1 * create boolVar, true * temp localInt, 2 * set localInt, intVar + 3 * create playingMusic, false * choice * if playingMusic # Stop the music * stop music, sound OK, music is stopped. * set playingMusic, false * elseif FALSE This should not appear This should not play * music "Actraiser - Fillmore.vgm" * else # Play some music * music "Actraiser - Fillmore.vgm" OK, playing Fillmore, from Actraiser. * set playingMusic, true # Play a voice * sound "ready.wav" OK, playing a digital voice. # Show a smiley * image "Smiley.png", at(30, 3) OK... showing a smiley! # Fourth choice This is a test. Second line. Third line. * choice # Yet another choice You chose this. # One more choice You chose that. # Increment a number * set intVar, intVar + 1 The value is now ${intVar}! # More options... * choice # Test window * window from(1, 1), to(10, 4) Window 1 * flush nowait * window from(29, 1), size(10, 6) Window 2 * flush nowait * window default Returning to the default window * flush * clear background, foreground Clearing everything # Go to another scene * goto_scene test Edited October 2, 2022 by haroldoop 1 1 Quote Link to comment Share on other sites More sharing options...
ColecoGamer Posted October 4, 2022 Share Posted October 4, 2022 (edited) Would it be possible to create a Choose Your Own Adventure-style Visual Novel with this SDK? You know, so the player has some control over the story? This would rock if the SDK had this function. Edit: After reading through the example code, it would appear that what I asked is actually possible with your SDK. Edited October 4, 2022 by ColecoGamer 1 Quote Link to comment Share on other sites More sharing options...
haroldoop Posted October 4, 2022 Author Share Posted October 4, 2022 5 hours ago, ColecoGamer said: Would it be possible to create a Choose Your Own Adventure-style Visual Novel with this SDK? You know, so the player has some control over the story? This would rock if the SDK had this function. Edit: After reading through the example code, it would appear that what I asked is actually possible with your SDK. Yes, Choose Your Own Adventures is one of the primary objectives of the tool. 👍 1 Quote Link to comment Share on other sites More sharing options...
haroldoop Posted October 25, 2022 Author Share Posted October 25, 2022 Version 0.9.0 is now available! Implemented between 0.6.0 and 0.9.0: 0.7.0: Implement `title`, `author` and `while` commands: title and author are used for populating the ROM header; while allows to keep repeating a block of code while a condition is true. 0.8.0: Customize cursor and allow to select image layer: Flags were added to the image command, in order to allow choosing if the image will be drawn in the foreground or in the background l Implemented the cursor command, in order to allow customizing the cursor. 0.9.0: Implement automatic word wrapping for the text boxes. Standalone distribution for 0.9.0: https://github.com/haroldo-ok/choice4genesis/releases/download/v0.9.0/choice4genesis-0.9.0-standalone.7z Transpiler for 0.9.0: https://github.com/haroldo-ok/choice4genesis/releases/download/v0.9.0/choice4genesis.-.v0.9.0.-.transpiler.7z Demo ROM for 0.9.0: https://github.com/haroldo-ok/choice4genesis/releases/download/v0.9.0/choice4genesis.-.v0.9.0.-.simple.demo.rom.bin 1 Quote Link to comment Share on other sites More sharing options...
haroldoop Posted November 30, 2022 Author Share Posted November 30, 2022 (edited) Version 0.12.0 is now available! Implemented between 0.9.0 and 0.12.0: 0.9.1: Fix image and sound related code to check if the referenced file exists; 0.10.0: Allow the use of native `C` functions; 0.11.0: Automatically convert images to 16 colors, if necessary; 0.11.1: Fix background palette bug; 0.11.2: When clearing the foreground, deallocate the tiles used by the `*image` command; 0.12.0: Implement support for ADPCM for both music and sound Standalone distribution: https://github.com/haroldo-ok/choice4genesis/releases/download/v0.12.0/choice4genesis-0.12.0-standalone.7z Transpiler only: https://github.com/haroldo-ok/choice4genesis/releases/download/v0.12.0/choice4genesis.-.v0.12.0.-.transpiler.7z Edited November 30, 2022 by haroldoop 1 Quote Link to comment Share on other sites More sharing options...
haroldoop Posted December 2, 2022 Author Share Posted December 2, 2022 This is Ren Py's "The Question" ported to Sega Genesis through the "choice4genesis" engine. itch.io page: https://haroldo-ok.itch.io/the-question-for-sega-genesis Github repo: https://github.com/haroldo-ok/the-question-c4j The Question - v0.0.4.bin 1 Quote Link to comment Share on other sites More sharing options...
ColecoGamer Posted December 21, 2022 Share Posted December 21, 2022 I found this thread again! Woohoo! 1 Quote Link to comment Share on other sites More sharing options...
haroldoop Posted December 23, 2022 Author Share Posted December 23, 2022 Version 0.13.1 has been released! It adds a built-in code editor. Video showing the editor in action:https://www.youtube.com/watch?v=dK_CyszhHl0 Standalone distribution for version 0.13.1: https://github.com/haroldo-ok/choice4genesis/releases/download/v0.13.1/choice4genesis-0.13.1-standalone.7z Transpiler only: https://github.com/haroldo-ok/choice4genesis/releases/download/v0.13.1/choice4genesis.-.v0.13.1.-.transpiler.7z 1 Quote Link to comment Share on other sites More sharing options...
ColecoGamer Posted December 30, 2022 Share Posted December 30, 2022 Quick question: can you include animation to the story? You know, like a hand-drawn cinema with sound and music? 1 Quote Link to comment Share on other sites More sharing options...
haroldoop Posted December 30, 2022 Author Share Posted December 30, 2022 2 hours ago, ColecoGamer said: Quick question: can you include animation to the story? You know, like a hand-drawn cinema with sound and music? There are planned commands for playing videos and moving sprites around, but they haven't been implemented yet: Implement "video" command: https://github.com/haroldo-ok/choice4genesis/issues/15 Implement sprite support: https://github.com/haroldo-ok/choice4genesis/issues/73 Without those, there are ways to do very limited animation by combining the "background", "image" and "wait" commands, but it would be pretty awkward to do animation in that way. 1 Quote Link to comment Share on other sites More sharing options...
haroldoop Posted February 25 Author Share Posted February 25 Version 0.14.0 is now available! This version reduces the size of the distribution. The full distribution for this version occupies 190MB, while in the previous version, it was 235MB. - Full standalone distribution for 0.14.0: https://github.com/haroldo-ok/choice4genesis/releases/download/v0.14.0/choice4genesis-0.14.0-standalone.7z - Transpiler only: https://github.com/haroldo-ok/choice4genesis/releases/download/v0.14.0/choice4genesis.-.v0.14.0.-.transpiler.7z 1 Quote Link to comment Share on other sites More sharing options...
ColecoGamer Posted August 20 Share Posted August 20 I’ve waited long enough for this SDK to take shape; it now has all the features I’ve been looking for! Quote Link to comment Share on other sites More sharing options...
haroldoop Posted August 20 Author Share Posted August 20 1 hour ago, ColecoGamer said: I’ve waited long enough for this SDK to take shape; it now has all the features I’ve been looking for! Nice! BTW, implementation of the video player that will be used for the "video" command is in progress: 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.