Others C++ engine for visual novels?

Rysion

Newbie
Jan 20, 2018
77
189
(Not really asking for help, more like, just want some opinions and recommendations/indications. Sorry if this aint the right section.)

Basically, I wanna try and make a nsfw game. Most likely a sandbox visual novel. Now im really well aware renpy is just THE OBVIOUS choice for most people.
Easy to use and learn, builds run on pc, mobile, etc. It does what you need done.
Theres also rpgmaker, but holy god of hell im not touching that. im not against people using it, but man does it feel outdated and personally i wouldnt use it.

But here's the thing, I'm a programmer, a game engine programmer (currently working on a game engine that uses vulkan as its primary graphics api, mostly working on the renderer).
My programming language of choice, especially considering my line of work, is obviously c++. Its not that python is a problem for me, i just like c++ man. its what im used to.
And so, although using renpy wouldnt be a problem for me, im afraid ill just be bored with it (i also hate indentation based languages. god its annoying). Sure i could go unreal engine or even unity (or even godot), but i dont wanna use a chainsaw to cut a branch. it would work of course, but to me thats overkill for a slide show simulator (especially unreal engine).

So i was wondering, are there lightweight visual novels engine out there made with c++ that allows c++ scripting?
If so, i'd probably just go with that. id be more comfortable and have more fun with it. Bonus if it supports multiple platforms.

If not, right now im kinda tempted to make one. I have some older 2d game engines i made in the past i could use as a base and transform it into more of a visual novel engine. Making the core of it is actually very easy, like i said, its a slide show simulator. (obviously, "blank" scenes would be possible. with most likely a component entity system that already has basic components made for you like, animators, colliders, etc. if you want to make more than a visual novel, like a small rpg like rpg maker or a small sandbox or whatever, but ya know, with a capable engine behind it thats not outdated) I'd also probably make an editor for it. Where you could create the dialogs, scenes and stuff for your game and have a preview of what the build is gonna look like without having to constantly compile each time you make an edit, cause ya know, c++. If im happy with what ive achieved ill probably make it free and open source for people to use. Anyway im getting sidetracked. (please note even though "easy/simple" to make, atleast for me, its not something thats done in a few weeks.)

So yeah, you guys know of any good c++ visual novels engine out there? And would any of you be interested in one if not? which would also allow for more freedom than just a pure visual novel.
 

felldude

Member
Aug 26, 2017
457
1,407
Source code for is available, I don't think anyone uses it anymore though.
 

Satori6

Member
Game Developer
Aug 29, 2023
348
642
which would also allow for more freedom than just a pure visual novel.
RenPy and Twine offer as much freedom as you want.
Most people don't take advantage of it, because it requires way more work than simply using them as "slide show simulators", but the option is there; RenPy can take pure Python, and Twine can take JS.

Having alternatives is always a good thing, and I'm sure there's people who would appreciate the C++ implementation that you're suggesting. I just wanted to point out that there's already novel-focused engines that allow you to implement other mechanics at will.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,136
14,818
And so, although using renpy wouldnt be a problem for me, im afraid ill just be bored with it (i also hate indentation based languages. god its annoying).
Bored ? Python is one of the languages that offer the more versatility and, coupled to Ren'Py's languages, it's a paradise. Cherry on the cake, the learning curve is relatively soft, especially for someone with practical experience in C/C++.
As for indentation based languages, I guess that Pythoners say the exact same for braces and semicolon based languages. The only downside with indentation based languages is the impossibility to put debug code at a lower level for a fastest identification. This while you quickly get good habits that reflect later when you switch back to a less structured language.


So i was wondering, are there lightweight visual novels engine out there made with c++ that allows c++ scripting?
Made with C++, probably many. But that allow C++ scripting, I highly doubt. Mostly because it would make no sense due to the limited coding needs for a VN. The language is way too strict and rigid for the code expected and, between EcmaScript-based languages and LUA, with Python to a lesser extend, there's no need for it in such context.


If not, right now im kinda tempted to make one.
A front end for Unity or Gobot, I would understand, but a VN engine using C++ as scripting language... Just make a VN library, it would lead to the exact same result, without the need to devel a whole IDE for it to worth the name of "game engine".


[...] I'd also probably make an editor for it. Where you could create the dialogs, scenes and stuff for your game and have a preview of what the build is gonna look like without having to constantly compile each time you make an edit, cause ya know, c++.
So, hmm... You will interpret C++ code in the editor, and compile it for the final game ? Or are you saying that in fact there will be no coding, just the application of some filters/effects to a given image ? Because it's the only ways for what you say to make sense.
In the first case, then relying on C++ is ridiculous, a dedicated language like LUA would be more fitting, and don't need to build an interpreter. In the second case, it would be even more limited than Visual Novel Maker.


And would any of you be interested in one if not? which would also allow for more freedom than just a pure visual novel.
As you presented it, it wouldn't really offer more freedom than Ren'Py, while being more demanding and heavier to operate. So personally I would pass.
 

Rysion

Newbie
Jan 20, 2018
77
189
RenPy and Twine offer as much freedom as you want.
Most people don't take advantage of it, because it requires way more work than simply using them as "slide show simulators", but the option is there; RenPy can take pure Python, and Twine can take JS.
yeah im totally aware of that, you could totally make a sandbox or jrpg in renpy if you wanted or whatever. I was mostly wondering if there are other similar engines to renpy that are c++ based and allows c++ scripting. something that already offers basic visual novels mechanics with text for dialogs and stuff.


Its just that c++ is a preference of mine and i dont really like python.

But thanks for your reply :)
 

Rysion

Newbie
Jan 20, 2018
77
189
Bored ? Python is one of the languages that offer the more versatility and, coupled to Ren'Py's languages, it's a paradise. Cherry on the cake, the learning curve is relatively soft, especially for someone with practical experience in C/C++.
As for indentation based languages, I guess that Pythoners say the exact same for braces and semicolon based languages. The only downside with indentation based languages is the impossibility to put debug code at a lower level for a fastest identification. This while you quickly get good habits that reflect later when you switch back to a less structured language.




Made with C++, probably many. But that allow C++ scripting, I highly doubt. Mostly because it would make no sense due to the limited coding needs for a VN. The language is way too strict and rigid for the code expected and, between EcmaScript-based languages and LUA, with Python to a lesser extend, there's no need for it in such context.




A front end for Unity or Gobot, I would understand, but a VN engine using C++ as scripting language... Just make a VN library, it would lead to the exact same result, without the need to devel a whole IDE for it to worth the name of "game engine".




So, hmm... You will interpret C++ code in the editor, and compile it for the final game ? Or are you saying that in fact there will be no coding, just the application of some filters/effects to a given image ? Because it's the only ways for what you say to make sense.
In the first case, then relying on C++ is ridiculous, a dedicated language like LUA would be more fitting, and don't need to build an interpreter. In the second case, it would be even more limited than Visual Novel Maker.




As you presented it, it wouldn't really offer more freedom than Ren'Py, while being more demanding and heavier to operate. So personally I would pass.
You make a lot of good points, most of which im already aware of and agree with. But im not trying to argue here, you love python? Cool! I dont, thats all. So i was looking for good alternatives to renpy, and my language of choice is c++. I completely understand why they DONT use c++, but I, for me, i would like it.

Then i mentioned if one doesnt exist, id be tempted to make one (mostly for myself but if people wanted it i wouldnt mind sharing it, code and all). I think i expressed myself poorly towards how and what id do. My bad on that one. I wasnt talking about making a very complicated engine and editor like unreal, of course not. I think even myself when i wrote my original post i didnt clearly know what i was looking for. The points you brought up definitely helped me with that.

Here's how i imagine it:

It would be an engine written in c++, most likely using SDL2, with an editor. The editor itself wouldnt be running the engine,
it would just be a tool to create the assets for the game, scene editor, dialogs, etc. There would already be template scenes for you to start a visual novel, but you could create a blank scene with your own objects without a problem. Think of Tiled, the map editor. The goal would be, for a pure visual novel game, you'd need about 0 c++ scripting. just the editor itself would be fine. you create those files, then you compile them with the engine (which would just be a static library), voila. you have a game. You'd just need a point of entry to start the engine and yeah. Just creating a new main file, linking the lib, start the engine in there and you're good to go.

But if you wanted to make something more than a pure visual novel game, implement more sandbox elements, like some jrpg elements, or a card battle minigame inside, or whatever. Well you'd need to do some c++ scripting. and the engine would come with an entity component system with some default components to help you make other mechanics, or even another genre hell why not. You wouldnt write the code itself in the editor and have some kind of hot reload system to run the game inside the editor, not what i aim here. You would probably run and edit code inside an IDE like microsoft visual studio for debugging purposes for example. Where you need to create a new project, and now you can create custom components with their own behaviors and stuff. Anyway, im rambling.

C++ written engine mostly for visual novels but allows freedom to do more and extend/create new mechanics. Would come with an editor (engine doesnt run in editor) to create the asset files that would then be loaded by the engine, which would most likely be a static library. No need to code at all if its a pure visual novel is what you're making (slideshow with choices and text, music, etc).

I know this is DEFINITELY not for everyone, it just feels unnecessary for most people and i get that. Its mainly for me, and if other people are interested in it, id be more than happy to give it to people for free and make it open source.

ok but why though, why would i trouble myself with that. Like i said, if there was already an alternative somewhere else for what im looking for, then id take it (maybe there still is idk?). And like i said, im a game engine programmer, its what i do. so why not.

Hopefully this makes a bit more sense, thanks for your thoughtful reply :)
 

Rysion

Newbie
Jan 20, 2018
77
189
As you presented it, it wouldn't really offer more freedom than Ren'Py, while being more demanding and heavier to operate. So personally I would pass.
one other thing, i dont see how it would be more demanding than renpy? heavier maybe, but more demanding? What do you mean by that. I'm pretty sure if i make an engine in c++ using sdl2, it would be much faster than renpy and less ressource demanding. renpy is written in python, you cant compare a compiled language's speed (c++) to an interpreted one (python). Unless IM REALLY bad and i cant program for shit, but considering im a game engine programmer im sure ill be fine (really dont wanna seem like im boasting here, but ya know what i mean).
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,559
2,175
So yeah, you guys know of any good c++ visual novels engine out there?

Personally, sorry, no.
More than just "good c++", I can't say I've come across a single one.

And would any of you be interested in one if not? which would also allow for more freedom than just a pure visual novel.

Maybe.
I'm one of those fans of RenPy... because it meets the needs of an inexperienced developer. It's quick to get up and running, with very few programming statements needed to code a whole game. The default UI is also "familiar" to a lot of players - so the look and feel are comfortable for literally 100's of thousands of potential customers.

If your game dev experience means you can bring a new product to people which offers something better - go for it.

Just keep in mind there's a reason why even RPGM is still a viable engine - and it's not because it is superior in any way to other engines. It is is however a path of least resistance for some players.

There's also the support issue too. RenPy, Unity, etc already have good documentation and more importantly for the would-be developers here on F95 - lots of YouTube videos.

If not, right now im kinda tempted to make one. I have some older 2d game engines i made in the past i could use as a base and transform it into more of a visual novel engine.

Again... go for it. Even if you only ever use it yourself - you clearly would be get more enjoyment from coding up something for yourself rather than compromising by using an existing engine.
LUA might be a common scripting language to integrate - though I don't know whether it would be a good fit.

Overall, Unity, Unreal3D, RenPy, RPGM, HTML and others have been the common engines for a long while. There may well have been a C++ based engine in the past, but so many of us (especially here on F95) have only been active doing stuff with visual novels for the last 5 years or so (often less).

With a few notable exceptions, AVN development is about the journey not the money - so do it however you'd most enjoy. If that's creating your own engine... do that.
 
  • Like
Reactions: anne O'nymous

Meehaha

Newbie
Aug 18, 2020
24
80
Believe Unity uses C# and think you can use C++ to write addons been a while since I looked at it. Droid who develops Love Of Magic and is a programmer would be worth asking really friendly community there as well.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,136
14,818
[...] you love python?
No...
I understand Python and know how to use it, what is different. And, no, it's not enough to say that I love it, else it would mean that I also love C, C++, Pascal, including Turbo Pascal and Delphi, JavaScript, QtScript, few BASIC, x86 ASM, and of course Perl, to only name the languages I use(d) the most. But among them there's only one that I love, and it's the one that is the strict opposite of Python.
I just know what learning it added in my codding capabilities, both by its structure and paradigms.


You wouldnt write the code itself in the editor and have some kind of hot reload system to run the game inside the editor, not what i aim here.
Then, unlike what you said, it wouldn't be possible to "have a preview of what the build is gonna look like without having to constantly compile each time you make an edit, cause ya know, c++". At least unless it's purely event based, with the events fully handled by the engine itself. What then would mean that "[implementing] more sandbox elements, like some jrpg elements, or a card battle minigame inside, or whatever" wouldn't be possible as easily as you present it.


No need to code at all if its a pure visual novel is what you're making (slideshow with choices and text, music, etc).
So it's a purely event based approach, with eventually the possibility to add your own events coded in C++.


I know this is DEFINITELY not for everyone, it just feels unnecessary for most people and i get that. Its mainly for me, and if other people are interested in it, id be more than happy to give it to people for free and make it open source.
I'm tempted to say that it's for no one... Anyone who would have the knowledge level needed to use that engine would also be able to come with his own library ; a library that would fit his effective needs, and therefore don't need additional codding.


one other thing, i dont see how it would be more demanding than renpy? heavier maybe, but more demanding?
What do you mean by that. I'm pretty sure if i make an engine in c++ using sdl2, it would be much faster than renpy and less ressource demanding.
Speed is a totally irrelevant factor here. Python and Ren'Py are fast for any effect to be smooth enough, especially with LCD screen that limits the afterglow. As for the rest, it's initially for visual novels... With an average reading speed of 4 words by second, and an average of 15-20 words by sentence, the engine have 4 to 5 seconds to perform everything it have to perform between to dialog lines, what is more than enough even for Ren'Py.
It's also not load issue, the difference would be relatively insignificant. Of course, by definition Ren'Py is more demanding in terms of RAM, but it's a question of MB. At most the game would need 50 MB more, what is, as I said, insignificant.
As for the resource issue, here the advantage goes to Ren'Py. Due to its structure, it's able to anticipate the needs for any static assets, what permit it to load them in cache, up to 30 seconds before they are possibly needed. It's only for videos that a C++ engine would have the advantage ; yet this advantage would be of few microseconds, and only due to the fact that it's a compiled code that ask to the OS to load the file.
The only way for a C++ engine relying purely on C++ code to compensate for its lack of predictability would be to load all the assets at starts, what would make it way heavier than Ren'Py... Or to not offer the possibility to use an asset from the code, what would then fallback on its lack of freedom.

It's on creation side that it would be more demanding and heavier. Not just because C++ is harder to learn, and way less opened to beginners, than the three Ren'Py script languages, but also due to the mandatory compilation time, especially if the editor wouldn't handle the code writing.


Let's say that the dev want to change the background image, with the top half being replaced through a right to left scrolling, while the bottom half is replaced through a left to right scrolling.

With Ren'Py it's something easy and basic. Anyone who took the time to read the doc can come with it even without coding knowledge, and it need 10 seconds to test it while trying to come with the right code:
Python:
transform inOut( duration=1.0, new_widget=None, old_widget=None ):
    delay duration
    contains:
        old_widget
        crop ( 0.0, 0.0, 1.0, 0.5 )
        xpos 0.0
        linear duration xpos -1.0
    contains:
        old_widget
        crop ( 0.0, 0.5, 1.0, 0.5 )
        ypos 0.5
        xpos 0.0
        linear duration xpos 1.0
    contains:
        new_widget
        crop ( 0.0, 0.0, 1.0, 0.5 )
        xpos 1.0
        linear duration xpos 0.0
    contains:
        new_widget
        crop ( 0.0, 0.5, 1.0, 0.5 )
        ypos 0.5
        xpos -1.0
        linear duration xpos 0.0

label whatever:
    scene background1
    [...]
    scene background2 with inOut( 2.0 )
The same effect with C++ would have the same declaration header, and I assume that the library would come with a cropping function.
But it would also need to understand how objects works, in order to manipulate the position and correctly use the cropping function. As well as to compute the loop limit, then to code the position change inside the loop. Bonus point if you want to use a none linear progression for the movement.
And, of course, it would need to be compiled, and the editor to have an effective preview in order to test it without needing to recompile the whole project ; what mean that all elements would be purely event based, and therefore limit the freedom.
The engine would also need to be able to reload the event code in real time, because during the devel time it would change frequently. Therefore it would need to check the project folders, then catch that a code extension have changed, unload its previous version, reload the new version, and be able to correctly dynamically link to it. If it can't do this, then the dev would have to reload the whole editor every single time it change something in the effect. Something that would happen often, because no one can come to the correct one in a single try ; therefore also something that what would make the process even more heavier.

And if, by chance, your engine have all this in form of functions available through the library, then once again it's the freedom that would be impacted, because it wouldn't be possible to pass from that effect to one that would add an alpha(disappearing/appearing) effect while the portions are scrolled. Something ugly, but it's for the demonstration.
With Ren'py, it would be this:
Python:
transform inOutAlpha( duration=1.0, new_widget=None, old_widget=None ):
    delay duration
    contains:
        old_widget
        crop ( 0.0, 0.0, 1.0, 0.5 )
        xpos 0.0
        alpha 1.0
        linear duration xpos -1.0 alpha 0.0
    contains:
        old_widget
        crop ( 0.0, 0.5, 1.0, 0.5 )
        ypos 0.5
        xpos 0.0
        alpha 1.0
        linear duration xpos 1.0 alpha 0.0
    contains:
        new_widget
        crop ( 0.0, 0.0, 1.0, 0.5 )
        xpos 1.0
        alpha 0.0
        linear duration xpos 0.0 alpha 1.0
    contains:
        new_widget
        crop ( 0.0, 0.5, 1.0, 0.5 )
        ypos 0.5
        xpos -1.0
        alpha 0.0
        linear duration xpos 0.0 alpha 1.0
With your engine it would need to code a whole new effect because that variation wouldn't be present in the library.
And even if you thought about the possibility to also have an alpha effect, then it's the zoom effect, rotation effect, tint effect, color effect, or blur effect, and I surely forgot some, that wouldn't be handle. Or they would all be, what would make a fucking huge declaration line if needed from the code side, and then it's the possibility to split the images not in 2 parts, but in 3, 4, 5, or whatever, that wouldn't be present ; or the declaration line would be a fucking mess.

And what if the scrolling is vertical ? What if the wanted effect is a spiral one ? What if... There's so many possibilities, not all beautiful or interesting, but all available, that are offered by Ren'Py's Animation and Transform languages.
All things that, with your engine, would either be event options, and therefore be limited to what you thought about, or would need to be wrote from starts to stop in C++. And then, once again, if someone have the knowledge needed to code those kind of effect in C++, he would just need the basic parts of your library ; but would also already have most of them in his own homemade libraries.

What doesn't mean that you should drop your idea. It's always fun to face a codding challenge. Just that it would be way heavier to operate than Ren'Py, what would drastically limits its possible users.


Unless IM REALLY bad and i cant program for shit, but considering im a game engine programmer im sure ill be fine (really dont wanna seem like im boasting here, but ya know what i mean).
Don't worry, the idea that you can be boasting is probably the last thought that would have crossed my mind...
 

Rysion

Newbie
Jan 20, 2018
77
189
Yet again, thanks a lot for your reply, you seem very knowledgeable and i appreciate it! <3
Keep in mind im merely exploring the idea, im not saying "thats what im making right now".
Im trying to evaluate the feasibility of it and its worth, and youre really helping so thanks!

Then, unlike what you said, it wouldn't be possible to "have a preview of what the build is gonna look like without having to constantly compile each time you make an edit, cause ya know, c++".
Ok thats my bad here for using the word preview, i mostly meant a scene builder. If you're familiar, something like Tiled. But of course, more geared towards visual novels. And since most stuff would just be 2d images, text, buttons, etc., you can have "preview/idea" of how its going to look. Of course, stuff like animation through code, like the example you gave in your reply, well yeah you wouldnt be able to preview it within the editor. So you could move stuff around in the scene with your mouse or by entering coordinates. And when you're happy with your stuff you then generate the asset files/data. Compared to if no editor at all, and you were to create your scenes (where each entities and whatever is placed) in a c++ file (for some reasons), that'd be tedious. You could also create dialogs with branching choices in the editor, and you can attach those dialogs to scenes, so when you load that scene that dialog plays and (waits or not) for player input. You could then also attach events to a line in the dialog (switch background, end scene, custom event, whatever) that gets triggered by advancing the dialog. And a whole lot more of features and conditions to help shape out a visual novel and what not.

I don't think what im describing here is crazy talk. I dont have everything thought of and figured yet of course, i started thinking about this yesterday lol, but yet again i cant say it enough, your replies really do be helping me with it (and everyone else too really)!

So it's a purely event based approach, with eventually the possibility to add your own events coded in C++.
Yeah pretty much, at least the whole visual novel part with the editor. but the engine itself would also offer an entity component system (for those familiar with unity, this is what unity is using) to help create more stuff outside of a visual novel scene. lets say in your visual novel, you have a card battle minigame in it and that could be a scene in itself. And imo, having something like an ECS would help with that. Now of course, that would involve more work outside the editor in c++. But you would be able to place your entities in your scene with the scene builder, and attach them components and stuff. Now yeah, if you were to build a scene like that, having a "gameplay preview" of it outside of where your elements are placed (right now with what im going for) wouldn't be possible.


I'm tempted to say that it's for no one... Anyone who would have the knowledge level needed to use that engine would also be able to come with his own library ; a library that would fit his effective needs, and therefore don't need additional codding.
Good point, but i can still imagine people who could be interested. at the very least in the editor if you can make a decent visual novel easily and efficiently without coding.


Speed is a totally irrelevant factor here. Python and Ren'Py are fast for any effect to be smooth enough, especially with LCD screen that limits the afterglow. As for the rest, it's initially for visual novels... With an average reading speed of 4 words by second, and an average of 15-20 words by sentence, the engine have 4 to 5 seconds to perform everything it have to perform between to dialog lines, what is more than enough even for Ren'Py.
It's also not load issue, the difference would be relatively insignificant. Of course, by definition Ren'Py is more demanding in terms of RAM, but it's a question of MB. At most the game would need 50 MB more, what is, as I said, insignificant.
As for the resource issue, here the advantage goes to Ren'Py. Due to its structure, it's able to anticipate the needs for any static assets, what permit it to load them in cache, up to 30 seconds before they are possibly needed. It's only for videos that a C++ engine would have the advantage ; yet this advantage would be of few microseconds, and only due to the fact that it's a compiled code that ask to the OS to load the file.
The only way for a C++ engine relying purely on C++ code to compensate for its lack of predictability would be to load all the assets at starts, what would make it way heavier than Ren'Py... Or to not offer the possibility to use an asset from the code, what would then fallback on its lack of freedom.

It's on creation side that it would be more demanding and heavier. Not just because C++ is harder to learn, and way less opened to beginners, than the three Ren'Py script languages, but also due to the mandatory compilation time, especially if the editor wouldn't handle the code writing.
This makes sense, thanks for the clarification!

Let's say that the dev want to change the background image, with the top half being replaced through a right to left scrolling, while the bottom half is replaced through a left to right scrolling.

With Ren'Py it's something easy and basic. Anyone who took the time to read the doc can come with it even without coding knowledge, and it need 10 seconds to test it while trying to come with the right code:
Python:
transform inOut( duration=1.0, new_widget=None, old_widget=None ):
delay duration
contains:
old_widget
crop ( 0.0, 0.0, 1.0, 0.5 )
xpos 0.0
linear duration xpos -1.0
contains:
old_widget
crop ( 0.0, 0.5, 1.0, 0.5 )
ypos 0.5
xpos 0.0
linear duration xpos 1.0
contains:
new_widget
crop ( 0.0, 0.0, 1.0, 0.5 )
xpos 1.0
linear duration xpos 0.0
contains:
new_widget
crop ( 0.0, 0.5, 1.0, 0.5 )
ypos 0.5
xpos -1.0
linear duration xpos 0.0

label whatever:
scene background1
[...]
scene background2 with inOut( 2.0 )
The same effect with C++ would have the same declaration header, and I assume that the library would come with a cropping function.
But it would also need to understand how objects works, in order to manipulate the position and correctly use the cropping function. As well as to compute the loop limit, then to code the position change inside the loop. Bonus point if you want to use a none linear progression for the movement.
And, of course, it would need to be compiled, and the editor to have an effective preview in order to test it without needing to recompile the whole project ; what mean that all elements would be purely event based, and therefore limit the freedom.
The engine would also need to be able to reload the event code in real time, because during the devel time it would change frequently. Therefore it would need to check the project folders, then catch that a code extension have changed, unload its previous version, reload the new version, and be able to correctly dynamically link to it. If it can't do this, then the dev would have to reload the whole editor every single time it change something in the effect. Something that would happen often, because no one can come to the correct one in a single try ; therefore also something that what would make the process even more heavier.

And if, by chance, your engine have all this in form of functions available through the library, then once again it's the freedom that would be impacted, because it wouldn't be possible to pass from that effect to one that would add an alpha(disappearing/appearing) effect while the portions are scrolled. Something ugly, but it's for the demonstration.
With Ren'py, it would be this:
Python:
transform inOutAlpha( duration=1.0, new_widget=None, old_widget=None ):
delay duration
contains:
old_widget
crop ( 0.0, 0.0, 1.0, 0.5 )
xpos 0.0
alpha 1.0
linear duration xpos -1.0 alpha 0.0
contains:
old_widget
crop ( 0.0, 0.5, 1.0, 0.5 )
ypos 0.5
xpos 0.0
alpha 1.0
linear duration xpos 1.0 alpha 0.0
contains:
new_widget
crop ( 0.0, 0.0, 1.0, 0.5 )
xpos 1.0
alpha 0.0
linear duration xpos 0.0 alpha 1.0
contains:
new_widget
crop ( 0.0, 0.5, 1.0, 0.5 )
ypos 0.5
xpos -1.0
alpha 0.0
linear duration xpos 0.0 alpha 1.0
With your engine it would need to code a whole new effect because that variation wouldn't be present in the library.
And even if you thought about the possibility to also have an alpha effect, then it's the zoom effect, rotation effect, tint effect, color effect, or blur effect, and I surely forgot some, that wouldn't be handle. Or they would all be, what would make a fucking huge declaration line if needed from the code side, and then it's the possibility to split the images not in 2 parts, but in 3, 4, 5, or whatever, that wouldn't be present ; or the declaration line would be a fucking mess.

And what if the scrolling is vertical ? What if the wanted effect is a spiral one ? What if... There's so many possibilities, not all beautiful or interesting, but all available, that are offered by Ren'Py's Animation and Transform languages.
All things that, with your engine, would either be event options, and therefore be limited to what you thought about, or would need to be wrote from starts to stop in C++. And then, once again, if someone have the knowledge needed to code those kind of effect in C++, he would just need the basic parts of your library ; but would also already have most of them in his own homemade libraries.

What doesn't mean that you should drop your idea. It's always fun to face a codding challenge. Just that it would be way heavier to operate than Ren'Py, what would drastically limits its possible users.
Hmmm, you are right 100% on everything here. This is definitely a challenge. The biggest problem here (especially for newcomers) is the "preview" part in the editor without having to close and re-open and re-compile everything and etc anytime you make a change for something like you described without taking away freedom. At that point its either we just dont allow that and you have to make with whats offered in terms or transform/animation events, or the editor would need a very good preview scene and at that point, might just as well make the editor run the engine. But then still, the goal is to NOT close the editor to recompile stuff. So something like a hot reload would be needed. and well, at that point your editor to create files is really starting to turn into an IDE.

Idk. idk what would be the right solution here or a compromise. and maybe there isnt, maybe this is just a bad idea. as i said, its an incomplete idea of mine, but thanks a lot for pointing this out! Although it still is something id like to explore, like you said "What doesn't mean that you should drop your idea. It's always fun to face a codding challenge.".



Guess we'll see :)

Don't worry, the idea that you can be boasting is probably the last thought that would have crossed my mind...
Not sure if im misinterpreting you here, but this seems a bit passive-aggressive. I dont mean to come off as ignorant or insulting to anyone's capabilities, knowledge and experience in this industry, which i clearly lack. theres a reason im asking for opinions.
Hopefully that statement was genuine reassurance haha, otherwise, sorry, didnt mean to seem like a "i dont know what im talking about yet i think i do so piss off and i cant be wrong and my skills are not to be doubted" type of dude, ya know.

I do think i mostly know what im talking about (well, towards certain topics, not EVERYTHING of course) and im confident in my skills, but im well aware i can be wrong on many things.
 

Rysion

Newbie
Jan 20, 2018
77
189
Believe Unity uses C# and think you can use C++ to write addons been a while since I looked at it. Droid who develops Love Of Magic and is a programmer would be worth asking really friendly community there as well.
Will look into it!

I do think if i were to make a nsfw thats not a visual novel, id most likely use unity? Depending of what game it is of course and unless i can imagine making my own engine for it.

Thanks!
 

baka

Engaged Member
Modder
Oct 13, 2016
3,347
6,981
with c++ I would focus on crossplatform. make an engine that can be used in windows, linux and mac, and if possible on phones as well, as theres a high demand from people that enjoy playing it on their phones.
 

Rysion

Newbie
Jan 20, 2018
77
189
Personally, sorry, no.
More than just "good c++", I can't say I've come across a single one.




Maybe.
I'm one of those fans of RenPy... because it meets the needs of an inexperienced developer. It's quick to get up and running, with very few programming statements needed to code a whole game. The default UI is also "familiar" to a lot of players - so the look and feel are comfortable for literally 100's of thousands of potential customers.

If your game dev experience means you can bring a new product to people which offers something better - go for it.

Just keep in mind there's a reason why even RPGM is still a viable engine - and it's not because it is superior in any way to other engines. It is is however a path of least resistance for some players.

There's also the support issue too. RenPy, Unity, etc already have good documentation and more importantly for the would-be developers here on F95 - lots of YouTube videos.




Again... go for it. Even if you only ever use it yourself - you clearly would be get more enjoyment from coding up something for yourself rather than compromising by using an existing engine.
LUA might be a common scripting language to integrate - though I don't know whether it would be a good fit.

Overall, Unity, Unreal3D, RenPy, RPGM, HTML and others have been the common engines for a long while. There may well have been a C++ based engine in the past, but so many of us (especially here on F95) have only been active doing stuff with visual novels for the last 5 years or so (often less).

With a few notable exceptions, AVN development is about the journey not the money - so do it however you'd most enjoy. If that's creating your own engine... do that.
Yeah i had done some google research before hand, but i thought maybe one of you knew of something, but thanks anyway!

Also glad to see some people seem to be saying "maybe". I guess its hard to say since there are none and we dont know what to expect.

I have 2 thoughts right now about this:

1: Theres a reason there is none, multiple reasons even. Theres just no need for that, etc etc.

2: Maybe theres an opportunity there to be taken.
 

lobotomist

Active Member
Sep 4, 2017
777
597
There are visual novel addons for godot and unreal, you could use one and script in c++.
I think the dev for rakugo was even active in this forum.
 

osanaiko

Engaged Member
Modder
Jul 4, 2017
2,125
3,425
with c++ I would focus on crossplatform. make an engine that can be used in windows, linux and mac, and if possible on phones as well, as theres a high demand from people that enjoy playing it on their phones.
99% of the problem for "cross platform" adult games is due to the very significant user input/output expectations of a phone or tablet environment.

Desktop environment has assumptions about mouse / hover that make a different experience when you try to use touchscreen. Screens on phones are 18:9 or 19:9 aspect ratio, not the 16:9 standard for desktop, although black banding or stretching takes care of this mostly.

Text that is easily readable on desktop is unreadably tiny on phones, but if you scale it up then there is no room to show the whole user interface.

The problem is not the lack of a "cross platform" game engine - renpy already does a reasonable job of at least running okay, and joiplay also can help a lot. The actual problem is that most developers do not target phone device when they make their game.

*also "phone as primary device" users are poor pitiable wretches who need to stop being lowly beggars.
 
Last edited:

baka

Engaged Member
Modder
Oct 13, 2016
3,347
6,981
exactly why I would go there. create an engine that can handle phones and maybe even has that as "primary" focus
while desktop is secondary. if u can make such VN-editor/player I think it could even get a demand of your app.

Im actually doing a VN-editor/player right now as a secondary-project. the editor will be "realtime", like the maple.x.editor (build-in) but it will only be available in windows. Im waiting for TwinBasic to add crossplatform and I will use that as programming environment and will at that point expand the editor to work on multiple platforms.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,136
14,818
Keep in mind im merely exploring the idea, im not saying "thats what im making right now".
Im trying to evaluate the feasibility of it and its worth, and youre really helping so thanks!
And that's precisely the reason why I'm saying all this. Not to discourage you, but to force you to think deeper than the surface.
Thinking "I'll make a game engine that will looks like this" is easy, but once you start, there's so many elements that appear, but that were forgot by your thoughts, or that were thought too superficially. So, I'm talking about them, for you to have a better idea.


Ok thats my bad here for using the word preview, i mostly meant a scene builder. If you're familiar, something like Tiled. But of course, more geared towards visual novels. And since most stuff would just be 2d images, text, buttons, etc., you can have "preview/idea" of how its going to look.
But isn't this a part of what limits the freedom offered to the creator ?
In order to offer a preview of the scene, you need to know what will be on that scene. This imply that those elements will be defined through hard coded values. They can eventually be chained and so not limited in number, but they'll still be limited in capability.
Take an average Ren'Py scene relying on sprites by example:
Python:
label whatever:
    #  Display the scene background
    scene living room
    MC "Finally at home, I can't wait to drop the news."
    #  Show one of the character, in casual clothes and neutral mood, 
    # place her at the right of the screen
    show mother casual neutral at right
    MOM "Hello baby, how was your day ?"
    MC "Good, I've been promoted today."
    #  The mother is now happy
    show mother casual happy
    #  The usual "shake the sprite to express joy"
    with shake
    MOM "Wow, it's marvelous, I'm so proud of you."
    MC "Thanks mom."
    #  The sister enter, wearing casual clothes and wondering what happened, 
    # place her at the left of the screen
    show sister casual wondering at left
    SIS "Why such commotion ? What happened ?"
    #  Move the mother sprite to the middle of the screen, she come closer to her daughter.
    show mother casual happy at slideToMidle
    MOM "Your brother have been promoted."
    #  The player was previously offered the possibility to prank the sister. If he did, she's angry.
    if sisAngry == True:
        #  Seeing her mother praise her brother, while she said nothing about the prank, trigger
        # sister's jealousy.
        $ sisJealous = True
        #  The sister is not delighted by the news
        show sister casual angry
        SIS "That idiot, promoted ?"
        MOM "Come on girl, you should be happy, he's your brother..."
        SIS "He's an idiot who did [whatever the prank was]. I'm out !"
        #  Remove the sister from the scene
        hide sister
        MOM "You know what, baby ? Let's go celebrate this. Restaurant tonight !"
    #  The player decided to not prank the sister.
    else:
        #  The sister have no reason to be jealous.
        $ sisJealous = False
        #  The sister is surprised by the news.
        show sister casual surprised
        SIS "Wow !!!!"
        MOM "I know, he really deserve this. Tonight, restaurant to celebrate this."
        SIS "I can't go to a restaurant dressed like this, I need to change."
        #  Remove the sister from the scene
        hide sister
    MOM "Really, baby, I need to say it again, I'm so proud of you."  
    MC "It's nothing mom."
    MOM "No, no. Don't sell yourself short, it's not everyone who's promoted after only two months at work."
    [and so on]
How do you intend to express this with your engine ?

The number of dialog lines between two changes in the scene isn't constant. There's a temporary variation in the scene depending on a condition, and a flag value change. And of course, the same can be done without sprites, but by changing the whole image.

I don't say that it's not doable, but relying on a script language will always offer more freedom than relying on objects that would describe all atoms of the scene. Because it's probably how it should be with your engine, at least as you visualize it actually, something like:
Code:
class Image
    # Name of the asset to show
    IMAGE asset
    # Coordinate where to place the asset
    INTEGER x, y
    # Effects to apply when displaying the image.    
    ARRAY effects  

class NextAtom
    # Condition for this atom to apply
    ???? condition
    # SceneAtom object to use if the condition is fulfilled
    POINTER nextAtom

class SceneAtom
    # List of image objects present in the scene at that instant
    ARRAY visual    
    # Dialog line to display at that instant
    STRING dialog        
    # List of possible next atoms
    ARRAY nextAtom
    # list of variable changes - Right now, I have no idea how to express it.
    ARRAY changes
Whatever haven't be thought beforehand will not be permit, because there's no entries in the SceneAtom object for it. This while with Ren'Py, anything can be added, whatever it is, precisely because it's fully described by the script.
Of course, your engine can possibly rely on C++ code to add what haven't been thought beforehand. But then, how your engine will know what image are used ?

Plus, one of the possible difference in the Ren'Py script can be the use of dynamical images. Instead of something like show mother casual neutral it could be show expression "mother_{}_neutral.png".format( motherClothes() ).
Then, the shown sprite will use a set of clothes that will depend on the corruption level of the mother.
Just this basic change, that is easy to implement with Ren'Py, need that you rethink totally the way you deal with the images. "SceneAtom.visual" becoming then a list of condition->Images. Something that make the development heavier.
And of course, with Ren'Py it suffice to change the code for "motherClothes" to add or remove a clothes set, and the change will automatically apply to the whole game. This while, with your engine, all the SceneAtom objects would have to be updated to achieve the same result. Once again, there's ways to avoid having to change everything, by defining a "ClothesSet" class by example, but it need to be thought beforehand.

The dynamism that make Ren'Py easy to use would be what make your engine hard to use. At least as you visualize it.
Or else you rely on C++ code to do this, what is perfectly possible and would then make your engine as easy to use than Ren'Py. But in such case you've to forget about the scene preview, because you'll never know what elements are present in the scene.
And in the end your engine would still be heavier to use, because needing a recompilation in order to have the preview. It's also what happen with Ren'Py, but the "compilation" time is way shorter, and the console make it possible to quickly jump to the scene you want to test.
This too is something you've to think beforehand: How to branch to a given point of the game, in order to only test that particular part ?


You could also create dialogs with branching choices in the editor, and you can attach those dialogs to scenes, so when you load that scene that dialog plays and (waits or not) for player input. You could then also attach events to a line in the dialog (switch background, end scene, custom event, whatever) that gets triggered by advancing the dialog. And a whole lot more of features and conditions to help shape out a visual novel and what not.
Here's what is possible with Ren'Py ; background switch, conditioned sprite, conditioned dialog lines, and conditioned branching as outcome:
Python:
# Generic "enter a gril bedroom" entry point.
label girlRoom( girl ):
    #  Use the right girl bedroom as background for the scene.
    scene expression "{}/bedroom.png".format( girl.name )
    #  Greet the girl.
    MC "Hello [girl.name]"
    #  If the girl isn't in her bedroom
    if not girl.location == "bedroom":
        MC "Well, I looks like a fool talking to an empty room."
        #  Go to the label handling her room when empty - because there's clickables
        jump expression "{}_bedroom_empty".format( girl.name )
    #  Show the girl doing what she's actually doing, wearing clothes that match her corruption level.
    show expression "{}/{}_{}.png".format( girl.name, girl.action, clothingSet( girl ) )
    if girl.mood == "angry":
        girl.sayer "Go away !"
        MC thinking "I should probably leave before she become angrier."
        #  Return to the right hallway.
        return
    else:
        if today - girl.lastVisit > 10:
            $ girl.anger += 1
            $ girl.updateMood()  # Can be implicit if /anger/ is a property.
            girl.sayer "Oh, so you remember that I exist ?"
        elif today - girl.lastVisit > 5:
            girl.sayer "Long time not seen, I thought that you forgot about me."
        elif today - girl.lastVisit == 0:
            girl.sayer "Hello again, to what do I owe the pleasure this time ?"
        else:
            girl.sayer "Hello [mc.name]."
        #  Go to the label that serve as hub to switch between the available scene 
        # for that girl in her bedroom, and handle the default scene if there's no particular
        # event right now.
        jump expression "{}_bedroom_hub".format( girl.name )
Not as simple as it looks, right ?
Perfectly doable with C++ code, but not as easily as it seem.


I don't think what im describing here is crazy talk.
Still thinking that way ?

And I insist on the fact that I don't try to discourage you ; at most I temperate a bit your enthusiasm.
While not interesting for me, such game engine can still be interesting for others. But you must understand that, when I said that it would be either more limited or more heavier than Ren'Py, it wasn't just a way of saying.


I dont have everything thought of and figured yet of course, i started thinking about this yesterday lol, [...]
I think that for now you should forget about the notion of "game engine", and focus on a VN library. Then you would be able to focus on what you expect from a VN engine, and develop the code for it. Later, once you've that code and the logic behind its use, it would be easier to come with an editor-like to make it easier to use.

And you should also accept, to some extend, that users would be limited in what they can do with it.
The last example I gave for Ren'Py code is perfect for a VN with free roaming... But I'm not even sure that there's more than on game that do it that way. What I mean is that even with an engine like Ren'Py, that do marvels when it come to dynamism and context handling, what could considerably speed up the development time, people limits themselves. So, the fact that they would use an engine that have limited capabilities wouldn't be much a problem for half of them.
Plus, like you would have started by the library, the editor-like and compilation process should be naturally ready to handle any extension. What would then overcome most of the limits for anyone who can code the said extensions.
It would still be heavier than Ren'Py, but this too never stopped people. There's VN made with Unity, so...


Hmmm, you are right 100% on everything here. This is definitely a challenge. The biggest problem here (especially for newcomers) is the "preview" part in the editor without having to close and re-open and re-compile everything and etc anytime you make a change for something like you described without taking away freedom. At that point its either we just dont allow that and you have to make with whats offered in terms or transform/animation events, or the editor would need a very good preview scene and at that point, might just as well make the editor run the engine.
Or you forgot about "preview" the way you visualize it. After all, the only engine that offer a preview is RPG Maker, yet only because maps are easy to handle.
What if needed for an effect is just an image, two if it's a transition like with my example. You can perfectly offer two default images, and test the effects with them. Add the option for the user to select the two images when the effect must happen in a particular context, and it would be a good enough preview. Either the effect works and look good, or it don't and it's not by placing it in the whole context of the scene that it would change.

What would matters the most is what I talked about above, a way to branch to a particular part of the game, in order to test it. And here all depend on how you make the editor. And from my point of view, the need to rely on an external IDE for the code is an error. You should also edit the code (not necessarily a whole IDE), this would permit to offer a fully optimized (in time) compilation.
That way, each effect or extension could be a snippet, and could have its own library (linked to the base library). What mean that you don't have to recompile all the effects/extension, just the one that have been changed. The others being unchanged, their library don't need to be recompiled.
As for the game part itself, it would follow the same principle. There's the main common part, that have its library, and every scene would be an independent library. That way you can add a "context block" in top of a scene, and for testing you just have to compile the main part (if it changed), the context block and the tested scene. Not only the compilation time would be way shorter, but the game would only contain the scene to test.
Then, when it's time to build the game, you assemble all the code parts in order to have a single library.