• To improve security, we will soon start forcing password resets for any account that uses a weak password on the next login. If you have a weak password or a defunct email, please update it now to prevent future disruption.

HTML Dream Life [Development Thread]

Cumlauder

Newbie
Nov 3, 2019
66
24
For example, I use this option in my game :)

View attachment 2977719

Although this is still a prototype of a future game, there is still a lot of work to be done, well, for me it’s been a lot of progress over the year of developing the game. :ROFLMAO:

To do all this in 5 days is really progress for me. :LOL:
This is really nice! Is this only with CSS? I would like to achieve something like this, but as of now I am working on the start of the story a bit more, then I'll work on the UI.
 

Feyschek

Well-Known Member
Game Developer
Jun 12, 2021
1,154
639
This is really nice! Is this only with CSS? I would like to achieve something like this, but as of now I am working on the start of the story a bit more, then I'll work on the UI.
Yes, this works with CSS.

Everything is ahead of you as long as you have the mindset to do something, everything will work out ;)
 

Feyschek

Well-Known Member
Game Developer
Jun 12, 2021
1,154
639
By the way, here’s another piece of advice that has really become useful to me lately. Try using widget.

Example.

unknown_2023.10.04-12.08.png

Now for more details.

We create a separate pass and give it a widget tag as shown in the screenshot. Next we will use this code.

<<widget 'newday'>>\

<</widget>>

How to use this code using my code as an example.

<<widget 'newday'>>\
<<nobr>>
<<set $Health -= 25>><<if $Health lt 0>><<set $Health to 0>><</if>>
<<set $Satiety -= 25>><<if $Satiety lt 0>><<set $Satiety to 0>><</if>>
<<set $Hygiene -= 25>><<if $Hygiene lt 0>><<set $Hygiene to 0>><</if>>
<</nobr>>\
<</widget>>

Next I do something like this.

<<button 'Go to bed' `either('Home')`>><<newday>><</button>>

Now the player, every time we use the sleep button, my widget will be triggered and all the variables will be subtracted.
Now the main thing about this method is that you don’t have to write the code for variables for their actions in each pass, just put this code <<newday>> and everything will work.

You may have noticed that on my screen there are many widgets located in one passage. That's right, these are separate widgets that I use in different situations in the game.

This is the advantage of this system: I don’t have to write code every time, I just need to take the widget and install it at the right time.

I hope this helps you ;)
 

Cumlauder

Newbie
Nov 3, 2019
66
24
By the way, here’s another piece of advice that has really become useful to me lately. Try using widget.

Example.

View attachment 2979107

Now for more details.

We create a separate pass and give it a widget tag as shown in the screenshot. Next we will use this code.

<<widget 'newday'>>\

<</widget>>

How to use this code using my code as an example.

<<widget 'newday'>>\
<<nobr>>
<<set $Health -= 25>><<if $Health lt 0>><<set $Health to 0>><</if>>
<<set $Satiety -= 25>><<if $Satiety lt 0>><<set $Satiety to 0>><</if>>
<<set $Hygiene -= 25>><<if $Hygiene lt 0>><<set $Hygiene to 0>><</if>>
<</nobr>>\
<</widget>>

Next I do something like this.

<<button 'Go to bed' `either('Home')`>><<newday>><</button>>

Now the player, every time we use the sleep button, my widget will be triggered and all the variables will be subtracted.
Now the main thing about this method is that you don’t have to write the code for variables for their actions in each pass, just put this code <<newday>> and everything will work.

You may have noticed that on my screen there are many widgets located in one passage. That's right, these are separate widgets that I use in different situations in the game.

This is the advantage of this system: I don’t have to write code every time, I just need to take the widget and install it at the right time.

I hope this helps you ;)
Thanks for the info and explanation. I am already working with some widgets, and indeed this makes a lot of things way easier.
 

Feyschek

Well-Known Member
Game Developer
Jun 12, 2021
1,154
639
Thanks, I will try, I have some experience in CSS so I should be able to pull something off.
Then there definitely won’t be any problems :)

Thanks for the info and explanation. I am already working with some widgets, and indeed this makes a lot of things way easier.
It became a second wind for me when I started using widgets :) I would like the engine to be able to show code markup and generally look awesome :)
 

Cumlauder

Newbie
Nov 3, 2019
66
24
It became a second wind for me when I started using widgets :) I would like the engine to be able to show code markup and generally look awesome :)
It really speeds developing up if you use widgets. If Twine would be able to show code markup, that would be so nice and much more readable.
 

Alcahest

Engaged Member
Donor
Game Developer
Jul 28, 2017
3,156
4,052
By the way, here’s another piece of advice that has really become useful to me lately. Try using widget.

Example.

View attachment 2979107

Now for more details.

We create a separate pass and give it a widget tag as shown in the screenshot. Next we will use this code.

<<widget 'newday'>>\

<</widget>>

How to use this code using my code as an example.

<<widget 'newday'>>\
<<nobr>>
<<set $Health -= 25>><<if $Health lt 0>><<set $Health to 0>><</if>>
<<set $Satiety -= 25>><<if $Satiety lt 0>><<set $Satiety to 0>><</if>>
<<set $Hygiene -= 25>><<if $Hygiene lt 0>><<set $Hygiene to 0>><</if>>
<</nobr>>\
<</widget>>

Next I do something like this.

<<button 'Go to bed' `either('Home')`>><<newday>><</button>>

Now the player, every time we use the sleep button, my widget will be triggered and all the variables will be subtracted.
Now the main thing about this method is that you don’t have to write the code for variables for their actions in each pass, just put this code <<newday>> and everything will work.

You may have noticed that on my screen there are many widgets located in one passage. That's right, these are separate widgets that I use in different situations in the game.

This is the advantage of this system: I don’t have to write code every time, I just need to take the widget and install it at the right time.

I hope this helps you ;)
No need to add <<nobr>> and <</nobr>> inside every widget. Just put them at the beginning and end of the passage.
 

Feyschek

Well-Known Member
Game Developer
Jun 12, 2021
1,154
639
It really speeds developing up if you use widgets. If Twine would be able to show code markup, that would be so nice and much more readable.
It seems there is a plugin for the engine that, in theory, can solve this problem. Although I read that Harlow has such a function in contrast to the sugarcube.

No need to add <<nobr>> and <</nobr>> inside every widget. Just put them at the beginning and end of the passage.
I agree they are superfluous here, well, all the codes in my engine are a conveyor product :)
I use widgets in addition to working with variables and also with buttons, and to eliminate unnecessary problems I left <<nobr>> and <</nobr>> everywhere.

They still don’t do much harm to the code ;)
 

Alcahest

Engaged Member
Donor
Game Developer
Jul 28, 2017
3,156
4,052
It seems there is a plugin for the engine that, in theory, can solve this problem. Although I read that Harlow has such a function in contrast to the sugarcube.


I agree they are superfluous here, well, all the codes in my engine are a conveyor product :)
I use widgets in addition to working with variables and also with buttons, and to eliminate unnecessary problems I left <<nobr>> and <</nobr>> everywhere.

They still don’t do much harm to the code ;)
Yeah, widgets are great. And just to clarify, I meant to put the <<nobr>> and <</nobr>> inside the widget passage, so only needing to do it once. Like this:
v6.png

This also shows how it looks with the SugarCube2 add-on in VSCode. If you switch to Tweego (as I have), you can use any editor you want instead of using Twine's.
 

Feyschek

Well-Known Member
Game Developer
Jun 12, 2021
1,154
639
Yeah, widgets are great. And just to clarify, I meant to put the <<nobr>> and <</nobr>> inside the widget passage, so only needing to do it once. Like this:
View attachment 2979981

This also shows how it looks with the SugarCube2 add-on in VSCode. If you switch to Tweego (as I have), you can use any editor you want instead of using Twine's.
By the way, also a logical option. I'll have to find the time to rewrite all the widgets.

I've heard about Tweego, but I'm too lazy to jump between programs and then copy the code.

That's why I, like the laziest ass on the planet, wrote all the necessary codes for the engine, use Ctrl + C and Ctrl + v and shove them into the necessary passes. :LOL:


Alcahest
By the way, I want to thank you for such a wonderful game like this https://f95zone.to/threads/paradise-found-v1-0-04-alcahest.37176/
 

Alcahest

Engaged Member
Donor
Game Developer
Jul 28, 2017
3,156
4,052
I've heard about Tweego, but I'm too lazy to jump between programs and then copy the code.

That's why I, like the laziest ass on the planet, wrote all the necessary codes for the engine, use Ctrl + C and Ctrl + v and shove them into the necessary passes. :LOL:
No need to copy anything if you use Tweego. Run a .bat file with this code:tweego -w src -o index.html (this assumes your tweego files are in folder src). Then you just code in VSCode (or any editor of your choice), and when you save a file, the html is automatically upated.

By the way, I want to thank you for such a wonderful game like this https://f95zone.to/threads/paradise-found-v1-0-04-alcahest.37176/
(y)
 

Feyschek

Well-Known Member
Game Developer
Jun 12, 2021
1,154
639
No need to copy anything if you use Tweego. Run a .bat file with this code:tweego -w src -o index.html Then you just code in VSCode, and when you save the file, the html is automatically upated.
Today I will try your method, because after 1 year of working with the engine, I finally realized that I was missing code markup.
Because when you start learning, this thing is clearly not the first problem that bothers you.
 

Alcahest

Engaged Member
Donor
Game Developer
Jul 28, 2017
3,156
4,052
Today I will try your method, because after 1 year of working with the engine, I finally realized that I was missing code markup.
Because when you start learning, this thing is clearly not the first problem that bothers you.
Yes, I loved Twine in the beginning, easy and fast to code in. But as the project grows, the disadvantages become more obvious.
 

Feyschek

Well-Known Member
Game Developer
Jun 12, 2021
1,154
639
Yes, I loved Twine in the beginning, easy and fast to code in. But as the project grows, the disadvantages become more obvious.
So I use the module and pipeline method.

I first write the code for all my functions in the game and then launch the production of the game. Then, like in a car factory, I simply add functions and options to the code as the game grows. The main code base is the same and therefore I don’t need to change it, I just add new features to it and that’s it ;)

I really went towards this idea from the very first game I started making. Because such a thing will allow me to make other games later ;)