choice4genesis - a ChoiceScript clone for the Sega Genesis
A downloadable tool
Github repo: https://github.com/haroldo-ok/choice4genesis
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.
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
Full documentation of the commands
Available at: https://github.com/haroldo-ok/choice4genesis/blob/main/README.md
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.
window
Allows to configure the region of the screen that will be used for the text popups and menus.
flush
Immediately shows the contents of the current text buffer on the text window; if passed the flag nowait
, does not wait for a button press.
clear
Allows to clear regions of the screen.
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.
video
Will play a full screen video.
Status | In development |
Category | Tool |
Rating | Rated 4.0 out of 5 stars (1 total ratings) |
Author | haroldo-ok |
Genre | Visual Novel |
Tags | 16-bit, choicescript, Game engine, Homebrew, Mega Drive, multimedia, Retro, Sega Genesis, sgdk |
Download
Development log
- Version 0.14.4 is now available!Nov 27, 2023
- Version 0.14.3 is now available!Nov 09, 2023
- Version 0.14.2 is now available!May 24, 2023
- Version 0.14.1 is now available!Mar 06, 2023
- Version 0.14.0 is now available!Feb 25, 2023
- Version 0.13.2 is now available!Jan 09, 2023
- Version 0.13.1 is now available!Dec 23, 2022
- Implementation of the code editor is in progressDec 19, 2022
Comments
Log in with itch.io to leave a comment.
What a fun tool this is, thanks haroldo.
It was cool to make a sega game with it.
Thanks! I'm glad that the tool is useful. :)
How about to make Function/Global Function in the game?
Like in some Visual Novel engine we can look scene in other scene: show_scene
Or maybe like standart functions
* show_scene - like a standart scene but we don't need to go to here
Just for example:
or like random event to meet some NPC on the street
Hello!
There is an open issue over that: https://github.com/haroldo-ok/choice4genesis/issues/49
It should be implemented someday.
I have some more ideas:
1) Is it possible to change player name and write this name in any text message?
2) Is it possible to save scene name in string and go to special scene like:
* goto_scene MySavedName_Variable
* goto_scene "test"+Integer_Variable
* goto_scene "test"+String_Variable
PS Just for example I wanna to make Battle Scene (goto_scene BattleScene) in random scenes and return to current scene after battle
Hello!
1) Currently, that's not implemented, but it's a good idea: https://github.com/haroldo-ok/choice4genesis/issues/109
2) Implementing computed labels won't be feasible because it is a static language, but a closely related solution would be to implement support for functions: https://github.com/haroldo-ok/choice4genesis/issues/49 When implemented, you would be able to call a function that does something and after the function finishes, it would resume execution from the point where it was called.
Yay! Amazing! Thank You so much! *__*
PS I think, with timer and check key buttons scripts I can made with this engine not only a novel but a simple QTE fighting with RPG elements)
Looks cool! Sega Genesis is my favorite console.
PS It's sad there's no Bitsy or Mosi features:
1) Is it possible to change text border? A black border not so cool.
2) Is it possible to hide text border when I don't want to use it?
3) Is it possible to check gamepad buttons and move some sprites by buttons?
4) Is it possible to make game loop? To make a sandbox visual novel?
Just for example:
Hello! Thanks for your interest; about your questions:
1) Is it possible to change text border? A black border not so cool.
Currently, no, but it should be implemented in the future, as per those two open issues:
2) Is it possible to hide text border when I don't want to use it?
That's already possible with the "font" command: any pixels of the loaded font that happen to use color index 0 will be treated as fully transparent pixels.
3) Is it possible to check gamepad buttons and move some sprites by buttons?
Not currently; it should implement support for sprites in the future, but having the sprites being fully controllable is a bit out of scope for this humble VN engine. Of course, if I ever implement a full RPG engine in the future, it would probably have this feature. As for similar retro engines with this capability:
4) Is it possible to make game loop? To make a sandbox visual novel?
Yes, you can already do that by using the "goto_scene" command to jump to a different scene; you can use to freely go back and forth between different scenes.
Wow! Thank You so much for all answers!
>>Of course, if I ever implement a full RPG engine in the future, it would probably have this feature.
Sounds amazing! *_*
>>Not currently; it should implement support for sprites in the future, but having the sprites being fully controllable is a bit out of scope for this humble VN engine
Okay! How about check buttons for quick choices?
Just for example:
A - attack
B - block
C - run
Up,Down,Left,Right - skills
Okay, that one sounds more doable; opened issue #106:
https://github.com/haroldo-ok/choice4genesis/issues/106
Wow! Thanks! :3
Mega Drive/Genesis is so hot right now on the indie & home brew scene. Very cool of you to be creating such a tool.
Thank you! 👍
Will this work or is it possible to make this work for Game Gear games?
Regardless of the answer, it's nice to see a VM creation tool for the Genesis. Will try this soon. :)
Thanks for the review! For now, it won't work for GG games, but it should be possible to adapt it, since it is mostly generating C code. Maybe in the future..
Until then, one possible alternative would be to use twee2sam, since the Game Gear can run Master System games.
Thanks for the response!
Yeah, I haven't actually worked out how to use twee2sam. Then again, a lot of basic coding eludes me since I overthink a lot of simple stuff. My biggest hurdle is trying to figure out where to put certain coding lines.
For example: where do I put the code for making a character move and where do I out the coding for how to interact? Does it matter? If so, how much?
Stuff like that.
Speaking of twee2sam, I hope you'll revive that project in the near future. The latest Twine update allows for exporting to Twee code now with one click apparently. Yay.
Cool! I'll keep that in mind.
Wow! Just what I've been dreaming of. Can't wait to test it out.
Thanks! I hope it proves useful. 😀