Program for management type game?

dingo4life

Member
Oct 20, 2016
307
350
So I'm slowly approaching a time where I'll have a bunch of free time and got to thinking how much it bothered me that stuff like Hentai High School or other management type games never really got finished or seems to be stuck in dev hell at least.

Now I'm not trying to steal anyone's thunder, but games like that did sorta inspire (and lack of completion frustrate) me to eventually try my own hands at it. So here I am.

It will probably be a bit lighter on the RPG elements, at least to start with, but a basic simulation for a school where your a principal making rules and such, which program would be good for that?

I also don't intend to start off with this immediately, maybe make 1-3 smaller games first to get my bearings. Neither do I have a set time frame, it's my "dicking around" project.

Everyone constantly praising twine I did consider it, but it didn't seem quite right for this project. Then again I might have missed something regarding when you get deeper into it.

Thanks in advance and have a nice day.
 

HiEv

Member
Sep 1, 2017
384
785
It will probably be a bit lighter on the RPG elements, at least to start with, but a basic simulation for a school where your a principal making rules and such, which program would be good for that?
This all depends on how you plan on making it. Visual novel style? Probably Ren'py. Want to use real-time rendered 3D models? Probably Unity. Mostly text with occasional images? Probably Twine. More of a classic RPG style? Probably RPG Maker.

Take a look at the " " thread for more details on the different engines.
 

dingo4life

Member
Oct 20, 2016
307
350
Well the final product will probably be something along the lines of setting up a schedule for students, dealing with the occasional parent teacher meeting or just employee management. Then of course rules and policies of the school and investments. I do intend to probably involve some stats and maybe a simple storyline of sorts. Just spitballing but I figured you would get to pick from like 3 "classes" or backgrounds at the start (like a former local politician for example) if I do incorporate more RPG-like elements.

The thing that worries me about twine is the management aspect. I mean to keep your reputation up as the principal (not to mention the state funding) you need to make sure your students do well. This would probably be shown with an overall student stat or something.

I want to empathize I'm just brainstorming a bit here, since I don't even know what program to use yet :p

Anyhow I looked over the thread you suggested, it did help a bit and from that and what your saying I might lean a bit towards twine. I was just a bit worried that the whole stats and management thing would be hard to implement in twine.
 

HiEv

Member
Sep 1, 2017
384
785
Anyhow I looked over the thread you suggested, it did help a bit and from that and what your saying I might lean a bit towards twine. I was just a bit worried that the whole stats and management thing would be hard to implement in twine.
You can write pretty advanced code in JavaScript and use that in Twine, so it shouldn't be any worse than most other languages. Furthermore, Twine keeps track of variables for you, so if you hit the back button it will automatically restore the values back to what they were at that point.

So, yeah, Twine should be able to handle that.
 

CeLezte

Member
Sep 10, 2017
234
147
In case you want menus, similar to HHS+, you could do it in Twine too, without any issues, but it will require you to work with a lot of HTML and CSS.

What HiEv said about running "heavy backend" code in a Twine game is true, but then you have to modify a couple of things, such as disabling history tracking and the like to keep a steady performance.

I also think that you don't necessarily need Twine for a HHS+ clone, unless you want to work with a lot of text in which Twine can help a lot.

I also think that using pure JS/HTML/CSS with Node could get you far and it could relieve you from many burdons that Twine would force upon you, such as the story formats and the way passages work, not to mention the Twine editor.
 

HiEv

Member
Sep 1, 2017
384
785
In case you want menus, similar to HHS+, you could do it in Twine too, without any issues, but it will require you to work with a lot of HTML and CSS.
Here I agree. If you want to do anything fancier than basic text and images, you're going to have to learn some HTML and CSS. Fortunately there are tons of resources for this on the web.

What HiEv said about running "heavy backend" code in a Twine game is true, but then you have to modify a couple of things, such as disabling history tracking and the like to keep a steady performance.
This I disagree with. I'm working on a game in Twine myself with "heavy backend" code and haven't had any performance problems. You just have to be a bit smart about what data you keep in story variables instead of temporary variables.

Also, by default Twine/Sugarcube keeps 100 steps of history, so if you start having problems you can just change "Config.history.maxStates" to 50 or something to reduce the size of the history (though Twine should handle that automatically).

I also think that using pure JS/HTML/CSS with Node could get you far and it could relieve you from many burdons that Twine would force upon you, such as the story formats and the way passages work, not to mention the Twine editor.
This depends on your knowledge of JavaScript/HTML/CSS. The point of Twine is to make it so you don't waste time reinventing the wheel. I don't really see most of what you describe there as burdens, though I admit the editor isn't great. I generally do almost everything outside of the Twine editor, and then copy-and-paste stuff in.

That said, YMMV. Whatever you do decide, have fun! :)
 

CeLezte

Member
Sep 10, 2017
234
147
This I disagree with. I'm working on a game in Twine myself with "heavy backend" code and haven't had any performance problems. You just have to be a bit smart about what data you keep in story variables instead of temporary variables.

Also, by default Twine/Sugarcube keeps 100 steps of history, so if you start having problems you can just change "Config.history.maxStates" to 50 or something to reduce the size of the history (though Twine should handle that automatically).
(Twine/SugarCube doesn't handle history config settings automatically. Even if it did, on what base of information would it scale? The number of global variables, setup constants, lines of JS and CSS, number of words used in the story, the depth of for/while loops/if and switch branches, produced HTML file size?)

For a big RPG like Projects, it is advised by TheMadExile to reduce Config.history.maxStates to 1. This has fixed many performance problems that I had in my game.

I have around 6,000 lines of JS code along with Twine story and CSS code in my project. Many of the "moving parts" that are responsible for the gameplay rely on PassageDone callbacks.
Using the default 100 setting the loading of one passage took around 250ms on my i7 6700K @4Ghz and 32GB RAMs @2667MHz. While the game is not optimized for performance yet, I believe there shouldn't be a 250ms gap between my passages, it is unacceptable.

Chrome's built in performance analyzer showed event calls handled by SugarCube and Twine to be the most expensive ones when it came to overhead.
After reducing the history state to 1, the performance had gone up by 10-12 times, reducing the 250ms to around 18-22ms when traversing between passages.

I don't really see most of what you describe there as burdens, though I admit the editor isn't great. I generally do almost everything outside of the Twine editor, and then copy-and-paste stuff in.
Well you should read ThaumX's blog (the developer of Accidental Woman) on SugarCube and performance.

I personally ran into multiple interesting things that stalled me for weeks. I have to admit that most of these problems could have been avoided, had I put more time into mastering web development in general. One particular case was the serialization of objects that use actual constructors. If you don't override toJSON() in a certain way and construct your object properly, you'll face runtime errors when saving and loading your game. Another case was a more recent one where I wasn't aware that HTML IDs and Classes are assigned to the page (part of a passage) later than the code that is defined in the passage.

But to go back to Twine and SugarCube. One problem in particular wasn't like that: such as the handling of history variables between passages that break multiple references to the same instance of object costing me a couple of hours of debugging and reading SugarCube's source code on Bitbucket and then asking around on Discord.

Anyways, what I'm trying to say is, if you want to create something very complex and do heavy coding, the framework could really get in your way. At that point, it might be better to just roll with your own framework.
 

HiEv

Member
Sep 1, 2017
384
785
(Twine/SugarCube doesn't handle history config settings automatically.
You're right. I misinterpreted one line of the documentation.

Even if it did, on what base of information would it scale? The number of global variables, setup constants, lines of JS and CSS, number of words used in the story, the depth of for/while loops/if and switch branches, produced HTML file size?)
The amount of memory the history takes up. All of the rest is irrelevant.

For a big RPG like Projects, it is advised by TheMadExile to reduce Config.history.maxStates to 1. This has fixed many performance problems that I had in my game.
That's because RPG-like projects generally don't need a back button. If you're not using the back button, then of course you should set the maxStates to 1.

I have around 6,000 lines of JS code along with Twine story and CSS code in my project. Many of the "moving parts" that are responsible for the gameplay rely on PassageDone callbacks.
I just hit over 7,000 lines of JS code in the Twine project I'm working on, and some use a modified version of the "passageend" event (I tweaked it a bit to make sure that Engine.isIdle() is true before working with passage elements). Because of that I don't need the PassageDone passage.

Using the default 100 setting the loading of one passage took around 250ms on my i7 6700K @4Ghz and 32GB RAMs @2667MHz. While the game is not optimized for performance yet, I believe there shouldn't be a 250ms gap between my passages, it is unacceptable.
How are you timing that? Because by default there's a 400ms transition between passages.

Chrome's built in performance analyzer showed event calls handled by SugarCube and Twine to be the most expensive ones when it came to overhead.
After reducing the history state to 1, the performance had gone up by 10-12 times, reducing the 250ms to around 18-22ms when traversing between passages.
I'm not arguing that using the history doesn't affect the performance.

Also, how many kilobytes of variables are you storing in your history? Seems like it would have to be a lot to make that much of a difference. I try to minimize the usage of story variables so I don't bloat up the history.

Well you should read ThaumX's blog (the developer of Accidental Woman) on SugarCube and performance.
I actually hang out at the TFGamesSite forum a lot, where TheMadExile frequents. And I know ThaumX from there too.

But to go back to Twine and SugarCube. One problem in particular wasn't like that: such as the handling of history variables between passages that break multiple references to the same instance of object costing me a couple of hours of debugging and reading SugarCube's source code on Bitbucket and then asking around on Discord.
Yeah, all objects are cloned between passages, so you can't use multiple references like that. I read and answer questions at , so I've seen that mentioned several times.

The reason for that is that you need to store the data in the history if you want the back button to work, and there's no fast way to determine which variables are pointing to the same object. If you're complaining about speed now, it would get exponentially worse if it had to find out which variables were pointing to the same objects every passage.

Anyways, what I'm trying to say is, if you want to create something very complex and do heavy coding, the framework could really get in your way. At that point, it might be better to just roll with your own framework.
Like I said, YMMV. I haven't had any problems with it, but I'm aware of how the engine works and I work with it to help keep it from doing more than it needs to.

If it weren't for Twine/SugarCube making things so easy, the game I'm working on would still just be an idea.
 

william2271

Newbie
Aug 16, 2021
92
95
So I'm slowly approaching a time where I'll have a bunch of free time and got to thinking how much it bothered me that stuff like Hentai High School or other management type games never really got finished or seems to be stuck in dev hell at least.

Now I'm not trying to steal anyone's thunder, but games like that did sorta inspire (and lack of completion frustrate) me to eventually try my own hands at it. So here I am.

It will probably be a bit lighter on the RPG elements, at least to start with, but a basic simulation for a school where your a principal making rules and such, which program would be good for that?

I also don't intend to start off with this immediately, maybe make 1-3 smaller games first to get my bearings. Neither do I have a set time frame, it's my "dicking around" project.

Everyone constantly praising twine I did consider it, but it didn't seem quite right for this project. Then again I might have missed something regarding when you get deeper into it.

Thanks in advance and have a nice day.
How it went?