Entry tags:
Interactive Dating Sim
Hi all! For Valentine's day I thought I'd do something a little bit topical and make a Dreamwidth-"friendly" mini dating sim UI. There's a working demonstration of it, as well as copious notes and a generator spreadsheet if you don't want to bother sorting through the code.
Please make sure to read all the notes carefully. Feel free to also use only a single screen if you don't want it to be interactive.
Tested on: Chrome (108, 108 for iOS), Firefox(84), Safari (14.1, 16 for iOS)
NOTES:Demonstration | Code | Spreadsheet
CHARACTERPNG transparent png of the character.
BACKGROUNDURL background
TEXTCOLOR the color of the dialogue (shown in a slightly transparent white)
TEXTOUTLINECOLOR yes there are 4 of these... it's shown in black
BORDERCOLOR color of the thin border around name
NAMEGRADIENT1/2 there are 2 name gradients that create the gradient behind the name box.
DIALOGUEGRADIENT1/2 there are 2 dialogue gradients that create the background behind the dialogue box
WHITEBORDER this is the thick border around the dialogue box
CHARACTERNAME the character's name.
INNERGLOW the color of the glow in the dialogue box
DIALOGUETEXT the content of the dialogue
OPTIONURL the link that the option should follow. Please note that if you are using an internal link (for instance linking to "index") it should have a hashtag like #index
OPTIONTEXT the text that displays as the link to follow
You can find it here. Please make a copy and then fill in the fields. I've already populated it with the code used for the demo above, in the hopes that the syntax makes more sense by example. There's also a usage guide on one of the tabs.
As always, please enjoy!
Please make sure to read all the notes carefully. Feel free to also use only a single screen if you don't want it to be interactive.
Tested on: Chrome (108, 108 for iOS), Firefox(84), Safari (14.1, 16 for iOS)
NOTES:
- Please do not remove the credit footer unless you have code credits somewhere else on your journal!
- If you are not planning on using the spreadsheet, please disable auto-formatting or you might end up with whitespace where it doesn't belong.
- This code is long, please note that the 6 sample screens is something like 9k characters and that dreamwidth entries have a maximum of 65k latin (~33k cyrillic or cn/jp/kr characters) so you will not be able to create a very long story. For that, I suggest an RPG or dating sim engine instead!
DEMO.
(Click the arrow in the dialogue box!)CODE.
CONTAINER.
This is required, otherwise all your screens will display one after another, instead of allowing you to click through on "one" screen.SCREEN WITH NO DIALOGUE (FOR OPTIONS ONLY).
INDEX the screen index for internal linking purposes.CHARACTERPNG transparent png of the character.
BACKGROUNDURL background
SCREEN WITH DIALOGUE (NO ARROW).
See above for description of the first few fields.TEXTCOLOR the color of the dialogue (shown in a slightly transparent white)
TEXTOUTLINECOLOR yes there are 4 of these... it's shown in black
BORDERCOLOR color of the thin border around name
NAMEGRADIENT1/2 there are 2 name gradients that create the gradient behind the name box.
DIALOGUEGRADIENT1/2 there are 2 dialogue gradients that create the background behind the dialogue box
WHITEBORDER this is the thick border around the dialogue box
CHARACTERNAME the character's name.
INNERGLOW the color of the glow in the dialogue box
DIALOGUETEXT the content of the dialogue
SCREEN WITH DIALOGUE (ARROW).
NEXTURL the url to the next screen. Please note that if you are using an internal link (for instance linking to "index") it should have a hashtag like #indexOPTIONS.
See above for explanation of the fields, with the new ones as follows:OPTIONURL the link that the option should follow. Please note that if you are using an internal link (for instance linking to "index") it should have a hashtag like #index
OPTIONTEXT the text that displays as the link to follow
CREDIT FOOTER.
In case you want to use only a single screen and not the container, please add this in at the end of your code to link back to this journal.SPREADSHEET.
Since it is pretty difficult to maintain a map of internal links to make a successful set of screens, I've taken the liberty of making a spreadsheet that you can use to more easily generate code and freely test out linking things and editing the story without fear of borking the code.You can find it here. Please make a copy and then fill in the fields. I've already populated it with the code used for the demo above, in the hopes that the syntax makes more sense by example. There's also a usage guide on one of the tabs.
As always, please enjoy!
PATCH NOTES
BUG REPORT - DATING SIM