Others Easiest engine to pick up with no prior experience (excluding RPGM)

Lou111

Active Member
Jun 2, 2018
543
686
I'm reaching out to my fam because I've just spent 2 weeks learning C# and I wanted some feedback because I'm worried that I can accomplish the same goal using a simpler method. I'm not looking for the "easy way out" per se, I don't have a lot of free time at the moment and I've got more ideas and concepts rolling in my head than I have months left to live. (True statement but it's intended to be humorous).

My primary concern is quality of life. I want to give the player many options in the simplest possible way. I want the player to be able to choose between up to 16 different options in a single instance without hassle on screen or via (very) convenient sub-menus. I need the appearance to induce/aid a feeling of freedom as appose to feeling overwhelmed by choices. I need to be able to run up to 6- 8 audio files simultaneously. I've got quite a few ideas that don't rely heavily on visuals so I'm flexible there. The closest thing I can think of is Lilith's Throne when I imagine my games in their simplest form (format specifically, I'm not trying to rival LT with my first game).

For my first game I wanted to make a sandbox, choice-based, text game with heavy mechanics tucked away under the surface. Comparable to just about any of those dating sims where you move around the map making choices except with none of the restrictions on progression. Mechanically... think Monstergirl Dreams (outside of combat) and with twice as many factors/options that effect choices like they would in Newlife or Divinity. It's pretty difficult to compare my concepts because if someone creates one too similar to mine I just scratch it off my list.

That said, learning Unity is going to take a while and honestly it feels like overkill. I'm confident that it will pay off in the long run but I'm reaching out here for feedback for a more practical alternative if one exists. The only thing I'm sure of is that C++ is more difficult than C#. Other than that I have no clue about how long other languages take to learn.

Thanks team.
 

mickydoo

Fudged it again.
Game Developer
Jan 5, 2018
2,446
3,557
Renpy, uses python, easy to learn the basics. What you envision though, while possible, is pretty advanced stuff.
 
  • Heart
Reactions: Lou111

Lou111

Active Member
Jun 2, 2018
543
686
Renpy, uses python, easy to learn the basics. What you envision though, while possible, is pretty advanced stuff.
Thank you! I probably won't be able to implement all the mechanics I envision on my first go but I also wanted to be sure to invest my time with an engine that could potentially handle it in the future instead of hitting a road block. My first concept was chosen specifically for it's flexibility so I will be sure to build a game around what I know rather than beat myself trying to know how to make a build.

All of the responses so far have been RenPy or at least mentioned it. I'm not sure if I should declare my questioned answered so soon but I'm already working with the development kit for RenPy and watching videos on it. Everything so far looks far more practical than the C# I was learning (for what I wanted to do anyway).

Thanks again my friend :geek:
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,975
16,229
My primary concern is quality of life. I want to give the player many options in the simplest possible way. I want the player to be able to choose between up to 16 different options in a single instance without hassle on screen or via (very) convenient sub-menus.
Have you played many games where having "up to 16 different options" felt like a good "quality of life". If you play MMORPG, look at the other players, especially the average ones. You'll see that most of the time they turn with 3/4 options, really exceptionally using the others ; this despite the fact that they can choose what options to put in the shortcut bar and in what order.
I'm not saying that "up to 16" is too much, having the choice is always interesting, just that the more options you give, the less the average player will feel at ease with the game. And in the adult gaming scene, "average players" is the only kind of players you have. There's hardcore gamers among the scene, but what they expect from an adult game, in addition of the lewd of course, is entertainment, not challenge. Therefore even them play more casually.

The more options you'll put, especially if the options feel significant, the more the player will feel lost, not really sure about what to choose, about what is the best option for him. Therefore, you'll have to accompany the players way more than if your game was offering just the minimum options.


I need the appearance to induce/aid a feeling of freedom as appose to feeling overwhelmed by choices.
It's not a question of appearance. In the, let's say 40 years, since "modern video games" exists, game studios tried everything they thought about in order to give more options to the players. Yet, none achieved to found the right answer. Worse, the more the time pass, the less they give us options ; responding to the majority that feel totally lost if there's more than the basic.


I need to be able to run up to 6- 8 audio files simultaneously.
Why ?
Firstly not all players want to have sound in their game (especially in adult games). What mean that each important sound have to be also depicted textually/visual in order for those "soundless" players to understand what is happening. As for the ambiance sounds, a music and two fx are the most you effectively need.
What lead to the second point, why taking care to not overwhelm them with choices, if it's to overwhelm them with sounds ? Up to 6/8 audio track simultaneously ? Even if one is the music and another is voicing, it still let 4/6 ambiance sounds, what it too much information to process.


I've got quite a few ideas that don't rely heavily on visuals so I'm flexible there. The closest thing I can think of is Lilith's Throne when I imagine my games in their simplest form [...]
I'm confused here. You have ideas that don't rely too much on visuals, while using as reference for what your game would looks like, a text based game. Since the simple fact to change a border color is a visual indicator, is it the reason why you want up to 6/8 audio channel playing at once ?


For my first game I wanted [...] think Monstergirl Dreams (outside of combat) and with twice as many factors/options that effect choices like they would in Newlife or Divinity. It's pretty difficult to compare my concepts because if someone creates one too similar to mine I just scratch it off my list.
The key words here are the third and fourth ones. It's your first game. You have near to no idea about how much works it imply to develop a game, near to no idea about your own capability to do so, yet you want to start with something bigger than any other games. And in top of that, you want to make it totally different to any other games.

I have nothing against the idea. Going bigger than the others, following different way, yeah, it's always interesting and would be refreshing. But before painting La Joconde, Da Vinci did like anyone else, he started with some doodle. This simply because even geniuses don't master their art from birth. It's by practicing that they achieve to express their talent, that their genius is revealed. And you should do the same, starting with a basic game, both in order to learn the basics, and in order to grow your support base.


That said, learning Unity is going to take a while and honestly it feels like overkill.
Not necessarily, if a game engine can do the most, it can also do the less. And the more your needs are basics, the higher are the chance that there's already a template for them.


The only thing I'm sure of is that C++ is more difficult than C#. Other than that I have no clue about how long other languages take to learn.
Well, it totally depend of your knowledge and own experience in regard of coding.
With near to 40 years past coding, among which around 25 doing it professionally, and having used clearly more than 10 different languages in my life, if it's not one of those weird languages, and as long as I have the doc on my side, I can learn a new one in the fly after having read a presentation of its syntax. But obviously it's way more difficult for someone with less knowledge and experiences, or even someone who've decades of experiences but only used one language all this time.
What is difficult is to learn the logic behind the language and to remember the syntax of the basic instructions ; so, obviously, the more you've experiences with different logic and syntax, the more you'll have references that will help you. The rest will come with practice.

This said, Python is a pseudo algorithmic language, that focus on the optimization of the writing and the understanding of the code, so it's a language really easy to learn. And Ren'py languages being derived from Python, they also aren't really difficult to learn. Proof being that most of the Ren'py devs had few, when not no, experience in coding before they started to make their game.
So, like the engine can do all you want (with still a doubt regarding the audio part, playing up to 8 simultaneously can potentially be a challenge on old computers and mobile devices), I'll go with Mickydoo on this one, Ren'py is probably the best choice here.
 

Lou111

Active Member
Jun 2, 2018
543
686
Firstly, thank you for taking the time to write this message. I'm really happy about the fact that you brought up those points. I have a really hard time typing my thoughts and I feel like with your response I can word it much better.
Have you played many games where having "up to 16 different options" felt like a good "quality of life". If you play MMORPG, look at the other players, especially the average ones. You'll see that most of the time they turn with 3/4 options, really exceptionally using the others ; this despite the fact that they can choose what options to put in the shortcut bar and in what order.
I am 100% in agreement. I spend a great deal of time creating games in my head and no small portion of that time is spent on how to give more freedom with choices without overwhelming players. When I said "up to 16 different options" I wasn't implying that I wanted to create a game where there's 16 commands on screen at all times, I wanted to rule out engines like RPGM where there is no good way to present many choices in a convenient way. I find it hard to think of an instance I would present such a thing but IF I did, I'd like to know that I'm using an engine that "could" present up to 16 choices in the best way possible. I meant what I said, quality of life is my first priority and if I feel that I have an option or choice that doesn't Add Value to the game, it's gone. I couldn't agree with you more about what you said, my word choice is at fault if anything.



Why ?
Firstly not all players want to have sound in their game (especially in adult games). What mean that each important sound have to be also depicted textually/visual in order for those "soundless" players to understand what is happening. As for the ambiance sounds, a music and two fx are the most you effectively need.
What lead to the second point, why taking care to not overwhelm them with choices, if it's to overwhelm them with sounds ? Up to 6/8 audio track simultaneously ? Even if one is the music and another is voicing, it still let 4/6 ambiance sounds, what it too much information to process.
I appreciate small details and variation. An example would be MC is standing in a hallway with a door on either side and the player can hear: low background music, rain, muffled moaning girl A 90% left, muffled grunt man A 90% left, muffled slamming bed frame 90% left, muffled girl ecstasy 90% right, muffled male hum 90% right, muffled bed squeak (70BPM) 90% right. 8 sounds.

I don't like the idea of using the same voice and sound for every situation or character in a game and am willing to spend months coding and mixing sounds to bring a healthy variety of sounds to my audience. I don't see myself ever creating a compiled audio file, my preference is to mix and match for the desired effect whenever possible. For my first game I will probably not use 6 to 8 sounds at once. I may never use that many, however, my point in bringing it up in my initial inquiry was to make sure that the option was available if necessary.


I'm confused here. You have ideas that don't rely too much on visuals, while using as reference for what your game would looks like, a text based game. Since the simple fact to change a border color is a visual indicator, is it the reason why you want up to 6/8 audio channel playing at once ?
Poor wording on my part. By visuals I meant things like art and 3d models. I think the better way to say it is that I have a few ideas for games that don't depend on erotic visuals.

The key words here are the third and fourth ones. It's your first game. You have near to no idea about how much works it imply to develop a game, near to no idea about your own capability to do so, yet you want to start with something bigger than any other games. And in top of that, you want to make it totally different to any other games.

I have nothing against the idea. Going bigger than the others, following different way, yeah, it's always interesting and would be refreshing. But before painting La Joconde, Da Vinci did like anyone else, he started with some doodle. This simply because even geniuses don't master their art from birth. It's by practicing that they achieve to express their talent, that their genius is revealed. And you should do the same, starting with a basic game, both in order to learn the basics, and in order to grow your support base.
I mentioned this earlier to mickydoo:
"...I probably won't be able to implement all the mechanics I envision on my first go but I also wanted to be sure to invest my time with an engine that could potentially handle it in the future instead of hitting a road block. My first concept was chosen specifically for it's flexibility so I will be sure to build a game around what I know rather than beat myself trying to know how to make a build."

Earlier today while I was cleaning the kitchen I was mulling over this very topic in my head and decided that even this solution is not enough. I've been on the scene since the beginning of time. People don't finish games. Developers bite off more than they can chew every damn time. The majority of creators defeat themselves before they even get started, and those that do put their hands out for money and coast along like they never intended to finish in the first place. I chose a game concept that could operate with more mechanics than any eroge game ever created or still be playable with minimal mechanics and low resources.

But that still wasn't enough. I decided today that I need to pull out something Raw. Bare bones. I'm thinking of a game right now that could just barely be called a game. Even then I feel like I'm getting ahead of myself cause as of right now I can't even write a single line of code in python. In truth, what I need to be doing is learning how to code right now. I barely have a clue about what I'm talking about. I think the biggest mistake in my initial post is separating "what I want the engine's potential capability to be" and "what I am aiming to do right now". I am already backing down from my first game. I'm trying to be too clever here with the "flexible" concept, I wanted something moldable that can improve more and more based on how much I learn. In other words: it's the kind of game that never gets finished.

Well, it totally depend of your knowledge and own experience in regard of coding.
With near to 40 years past coding, among which around 25 doing it professionally, and having used clearly more than 10 different languages in my life, if it's not one of those weird languages, and as long as I have the doc on my side, I can learn a new one in the fly after having read a presentation of its syntax. But obviously it's way more difficult for someone with less knowledge and experiences, or even someone who've decades of experiences but only used one language all this time.
What is difficult is to learn the logic behind the language and to remember the syntax of the basic instructions ; so, obviously, the more you've experiences with different logic and syntax, the more you'll have references that will help you. The rest will come with practice.

This said, Python is a pseudo algorithmic language, that focus on the optimization of the writing and the understanding of the code, so it's a language really easy to learn. And Ren'py languages being derived from Python, they also aren't really difficult to learn. Proof being that most of the Ren'py devs had few, when not no, experience in coding before they started to make their game.
So, like the engine can do all you want (with still a doubt regarding the audio part, playing up to 8 simultaneously can potentially be a challenge on old computers and mobile devices), I'll go with Mickydoo on this one, Ren'py is probably the best choice here.
My gratitude for your response can't be understated here. Thank you. Someone with your experience taking the time to clear things up for someone who barely knows anything; you have my thanks and respect. I have a difficult time explaining myself with writing (took me about 40 minutes to type this response) and I hope this clears things up. I'm off to learn some coding now and hopefully I can revisit this thread shaking my head at my ignorance (shout out to future me o/).

Thanks again my friend for your time.
 
Last edited:

lim000n

New Member
Jan 15, 2021
7
3
Thats depends on genre i`d say
If you want something like I`d recommend RenPy (which is, from what i understand, suits you), if you want RPG i`d recommend RPGM
Unity is an overkill for relatively simple games and for most Adult themed games. But if you want to create some unusual game mechanics, than it is worth to consider unity. Especially taking into account that in game development having a vision of Unity functionality is is always a good thing.
 
  • Like
Reactions: Lou111

Lou111

Active Member
Jun 2, 2018
543
686
Thats depends on genre i`d say
If you want something like I`d recommend RenPy (which is, from what i understand, suits you), if you want RPG i`d recommend RPGM
Unity is an overkill for relatively simple games and for most Adult themed games. But if you want to create some unusual game mechanics, than it is worth to consider unity. Especially taking into account that in game development having a vision of Unity functionality is is always a good thing.
I'm mostly done with my first guide in RenPy. I can't believe how easy it is to make a VN using it. Unfortunately, however, I'm not interested in making a VN. There's a feeling creeping up in my stomach that has me worried that it isn't going to be able to handle complex mechanics which is my primary strength. But that is getting ahead myself again. My favorite game under development, Monstergirl Dreams by Threshold, has some examples of which direction I want to go to a small degree. I like how RenPy feels right now and am committed to seeing it to the finish. Thanks to everyone who has responded to me I feel confident that this is the right choice. I fully intend on returning to lessons with C# but I need to put something on the board soon for real life reasons and I outright refuse to make some ver.001 bullshit and post in on patreon, my integrity will never allow it.
 

mickydoo

Fudged it again.
Game Developer
Jan 5, 2018
2,446
3,557
There's a feeling creeping up in my stomach that has me worried that it isn't going to be able to handle complex mechanics which is my primary strength.
If you are not running around shooting ppl renpy will usually suffice, what complex mechanics are you after?
 
  • Like
Reactions: TDoddery

Lou111

Active Member
Jun 2, 2018
543
686
If you are not running around shooting ppl renpy will usually suffice, what complex mechanics are you after?
Hahaha I jumped right on this post and was ready list everything until I realized I don't know how to identify them by their technical terms. I'm far too green to answer this question but I'll give it a go anyway:

-HUDs, menus, and flags that update in real time
-Keymapping that allows all commands to be entered with a mouse
-The ability to utilize local images and display them in a unified manner despite their pre-configuration
-Hide-able submenus (?) I'm thinking you press a button then you can press one of the button that pops up and it gives you a list of commands without breaking the current process.

That's what came to mind at first. I'm sure I could spend a few minutes thinking about my concepts and list more of my concerns here but I'm afraid the longer I go on the more stupid I'll sound because I'm too fresh.
 

mickydoo

Fudged it again.
Game Developer
Jan 5, 2018
2,446
3,557
Hahaha I jumped right on this post and was ready list everything until I realized I don't know how to identify them by their technical terms. I'm far too green to answer this question but I'll give it a go anyway:

-HUDs, menus, and flags that update in real time
-Keymapping that allows all commands to be entered with a mouse
-The ability to utilize local images and display them in a unified manner despite their pre-configuration
-Hide-able submenus (?) I'm thinking you press a button then you can press one of the button that pops up and it gives you a list of commands without breaking the current process.

That's what came to mind at first. I'm sure I could spend a few minutes thinking about my concepts and list more of my concerns here but I'm afraid the longer I go on the more stupid I'll sound because I'm too fresh.
HUDS - can be be made with imagebuttons

Keymapping - without understanding what you mean but renpy uses variables, you can give anything a true or false variable, or set it to a number and change it on the fly, either manually or call a label and get renpy to do it

Images - can be resized in renpy

Submenus - Nested menus, look at this


Go through Thiundies channel, he has a lot on there, there are others but he is pretty good.
 

Lou111

Active Member
Jun 2, 2018
543
686
HUDS - can be be made with imagebuttons

Keymapping - without understanding what you mean but renpy uses variables, you can give anything a true or false variable, or set it to a number and change it on the fly, either manually or call a label and get renpy to do it

Images - can be resized in renpy

Submenus - Nested menus, look at this


Go through Thiundies channel, he has a lot on there, there are others but he is pretty good.
Thank you mickydoo! I'm going to follow up by watching these videos when I finish this guide. :p
 
  • Like
Reactions: mickydoo

Lou111

Active Member
Jun 2, 2018
543
686
So I've accumulated just over 20 hours of lessons so it may be too soon to be poking around for answers but I can't resist anymore. I've covered image basics across three different tutorials and I still haven't found the information I'm looking for. I feel that the only way to get the answer I'm looking for is to reveal exactly what my concept is. Everyone here has been very helpful and I could be (very) wrong but this thread feels less public so...

My "simple" game is a duplication of a TeaseMe game I wrote (and never released publicly) which was a rapid-fire image game that used images from sub folders at random. In order to acomplish this I need Renpy to:

show random images from a specified subfolder,
You don't have permission to view the spoiler content. Log in or register now.

resize any image to fit the game screen,
You don't have permission to view the spoiler content. Log in or register now.

and have the option to tag a randomly shown image.
You don't have permission to view the spoiler content. Log in or register now.

With this post I can hopefully stop distracting myself from progressing with my lessons. I honestly feel that the first two examples should've been covered to some degree in my lessons but in their defense a rapid fire image application is probably something that Renpy wasn't originally intended for... shame on them.

Thanks everyone and anyone who reads this. :giggle:
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,975
16,229
anne O'nymous answered a similar question on this thread, however, this deals with showing a random image from a pre-defined set while I need to be able to pull from potentially thousands of images with random names (and possibly extensions).
Don't remember the code I gave at this time (and it's past 2AM, so I'll not take a look ; it's like Mogwai, past midnight your code become a monster :D ), but if what prevent you to use it is the lack of a list of image, it can be solved with the help of .

Python:
init python:
    # Where the image path+name will be saved.
    imageList = []

    # Browse all the available files
    for f in renpy.list_files():
        # Limit to those in the right directory ; "[...]/game/images/dropHere" 
        # for the example, but it can be whatever directory or sub directory 
        # inside the "[...]/game" one.
        if not f.startswith("images/dropHere"): continue
        # Get the extention.
        n, e = os.path.splitext(os.path.basename(f))
        # Limit to the four files format handled by Ren'py
        if not e.lower() in [ ".jpg", ".jpeg", ".png", ".webp" ]: continue
        # Well, it's an image, that Ren'py can deal with, and in the 
        # right directory, add it to the list.
        imageList.append( f )
And now you have the list you need, inside imageList.



resize any image to fit the game screen,
Of course the aforementioned images must be resized in the game. I need to be able to determine the size of any loaded image on the y-axis while keeping the original aspect ratio. [...]

Not necessarily. Initially there's the displayable that can be used to resize an image :
Code:
image whatever = Frame( "images/whatever.jpg", size=( config.screen_width, config.screen_height ) )
Code:
label whatever:
    show expression Frame( "images/whatever.jpg", size=( config.screen_width, config.screen_height ) )
Code:
screen whatever:
    add Frame( "images/whatever.jpg", size=( config.screen_width, config.screen_height ) )
But it have a major problem, it will put the image to the given size, even if the image is smaller, or if the width/height ratio do not correspond.

Therefore you need a to effectively resize an image, but only if it's bigger than the screen, and while keeping the width/height ratio :
Code:
init python:
    class Resize( renpy.Displayable ):
        def __init__( self, img, width=config.screen_width, height=config.screen_height, **kwargs ):

            self.img      = img
            self.width   = float( width )
            self.height  = float( height )

            super( Resize, self).__init__( **kwargs )

        def render(self, width, height, st, at):

            name = renpy.substitutions.substitute( self.img, translate=False )[0]
            if not renpy.loadable( name ):
                raise ValueError( "Image '{}' can NOT be fund".format( name ) )
            img  = renpy.easy.displayable( name )

            src = renpy.display.im.cache.get( img )

            wBase, hBase = src.get_size()
            rW = self.width  / wBase if wBase > self.width  else 1.0
            rH = self.height / hBase if hBase > self.height else 1.0
            f = min( rW, rH )
            rWidth  = int( wBase * f )
            rHeight = int( hBase * f )

            if rWidth != self.width or rHeight != self.height:
                src = renpy.display.scale.real_bilinear( src, ( rWidth, rHeight ) )

            r = renpy.Render( rWidth, rHeight )
            r.blit( src, ( 0, 0 ) )

            return r
[I wrote it on the fly based on something I already have, so there's perhaps few typo, sorry.]
You use it exactly like the Frame, just the syntax is different :
Code:
image whatever = Resize( "images/whatever.jpg", width=config.screen_width, height=config.screen_height )
Code:
label whatever:
    show expression Resize( "images/whatever.jpg", width=config.screen_width, height=config.screen_height )
Code:
screen whatever:
    add Resize( "images/whatever.jpg", width=config.screen_width, height=config.screen_height )
Note: Here the width=config.screen_width, height=config.screen_height part is optional, since it's already the default value. I included it to show you how you can give the size you want to the images.
Also note: I haven't explicitly tested the "label" and "screen" use, but I really don't see a reason for it to not works since it works with objects like Frame.


An example of this would be where if the player "likes" an image the game would tag the shown random image. Then the the image can be recalled later or reflect that it is liked even when being recalled randomly.
At this time just dealing with Ren'py is still possible, but here it will be more complicated ; I don't just have to remember something, but also to think.

So... Hmm...
You've a list with the image, you'll pick one inside this list and display it.
If you keep the name of the image somewhere, you can use a dictionary to keep track of the "like".
It would looks more or less like this :
Python:
# The dictionary where the liked images are stored.
default likedImages = {}

label whatever:
    # Randomly pick a name
    image = renpy.random.choice( imageList )
    call screen whatever( image )
    [whatever you want]

# The screen showing the image
screen whatever( imgName ):

    # Show the resized image
    add Resize( imgName )

    hbox:
        textbutton "I like":
            xalign 0.2
            action [ If( imgName in likedImages, 
                            # If this image have been liked before, increase the number of like
                            SetDict( likedImages, imgName, likedImages[imgName] + 1 ),
                            # Else, set the like at 1.
                            SetDict( likedImages, imgName, 1 ) ),
                     # Then return to the label.
                     Return() ]
        textbutton "I don't like":
            xalign 0.2
            # Just return to the label.
            action Return()
Then you have to deal with the likedImages dictionary :

- To know if an image have been liked
Code:
label whatever:
    # Randomly pick a name
    image = renpy.random.choice( imageList )
    if imageName in likedImages:
        "Oh, this one you liked it before."
    call screen whatever( image )
    [...]
- To pick an image already liked
Code:
label whatever:
    # Randomly pick a name already liked
    image = renpy.random.choice( likedImages.keys() )
    call screen whatever( image )
    [...]
And so on.

Note: Keep in mind that I write this in the middle of the night, without having thought about it more than that, so it should works, but it's to be seen as a draft more than as a working code.
 

Lou111

Active Member
Jun 2, 2018
543
686
Don't remember the code I gave at this time (and it's past 2AM, so I'll not take a look ; it's like Mogwai, past midnight your code become a monster :D ), but if what prevent you to use it is the lack of a list of image, it can be solved with the help of .

Python:
init python:
    # Where the image path+name will be saved.
    imageList = []

    # Browse all the available files
    for f in renpy.list_files():
        # Limit to those in the right directory ; "[...]/game/images/dropHere"
        # for the example, but it can be whatever directory or sub directory
        # inside the "[...]/game" one.
        if not f.startswith("images/dropHere"): continue
        # Get the extention.
        n, e = os.path.splitext(os.path.basename(f))
        # Limit to the four files format handled by Ren'py
        if not e.lower() in [ ".jpg", ".jpeg", ".png", ".webp" ]: continue
        # Well, it's an image, that Ren'py can deal with, and in the
        # right directory, add it to the list.
        imageList.append( f )
And now you have the list you need, inside imageList.






Not necessarily. Initially there's the displayable that can be used to resize an image :
Code:
image whatever = Frame( "images/whatever.jpg", size=( config.screen_width, config.screen_height ) )
Code:
label whatever:
    show expression Frame( "images/whatever.jpg", size=( config.screen_width, config.screen_height ) )
Code:
screen whatever:
    add Frame( "images/whatever.jpg", size=( config.screen_width, config.screen_height ) )
But it have a major problem, it will put the image to the given size, even if the image is smaller, or if the width/height ratio do not correspond.

Therefore you need a to effectively resize an image, but only if it's bigger than the screen, and while keeping the width/height ratio :
Code:
init python:
    class Resize( renpy.Displayable ):
        def __init__( self, img, width=config.screen_width, height=config.screen_height, **kwargs ):

            self.img      = img
            self.width   = float( width )
            self.height  = float( height )

            super( Resize, self).__init__( **kwargs )

        def render(self, width, height, st, at):

            name = renpy.substitutions.substitute( self.img, translate=False )[0]
            if not renpy.loadable( name ):
                raise ValueError( "Image '{}' can NOT be fund".format( name ) )
            img  = renpy.easy.displayable( name )

            src = renpy.display.im.cache.get( img )

            wBase, hBase = src.get_size()
            rW = self.width  / wBase if wBase > self.width  else 1.0
            rH = self.height / hBase if hBase > self.height else 1.0
            f = min( rW, rH )
            rWidth  = int( wBase * f )
            rHeight = int( hBase * f )

            if rWidth != self.width or rHeight != self.height:
                src = renpy.display.scale.real_bilinear( src, ( rWidth, rHeight ) )

            r = renpy.Render( rWidth, rHeight )
            r.blit( src, ( 0, 0 ) )

            return r
[I wrote it on the fly based on something I already have, so there's perhaps few typo, sorry.]
You use it exactly like the Frame, just the syntax is different :
Code:
image whatever = Resize( "images/whatever.jpg", width=config.screen_width, height=config.screen_height )
Code:
label whatever:
    show expression Resize( "images/whatever.jpg", width=config.screen_width, height=config.screen_height )
Code:
screen whatever:
    add Resize( "images/whatever.jpg", width=config.screen_width, height=config.screen_height )
Note: Here the width=config.screen_width, height=config.screen_height part is optional, since it's already the default value. I included it to show you how you can give the size you want to the images.
Also note: I haven't explicitly tested the "label" and "screen" use, but I really don't see a reason for it to not works since it works with objects like Frame.




At this time just dealing with Ren'py is still possible, but here it will be more complicated ; I don't just have to remember something, but also to think.

So... Hmm...
You've a list with the image, you'll pick one inside this list and display it.
If you keep the name of the image somewhere, you can use a dictionary to keep track of the "like".
It would looks more or less like this :
Python:
# The dictionary where the liked images are stored.
default likedImages = {}

label whatever:
    # Randomly pick a name
    image = renpy.random.choice( imageList )
    call screen whatever( image )
    [whatever you want]

# The screen showing the image
screen whatever( imgName ):

    # Show the resized image
    add Resize( imgName )

    hbox:
        textbutton "I like":
            xalign 0.2
            action [ If( imgName in likedImages,
                            # If this image have been liked before, increase the number of like
                            SetDict( likedImages, imgName, likedImages[imgName] + 1 ),
                            # Else, set the like at 1.
                            SetDict( likedImages, imgName, 1 ) ),
                     # Then return to the label.
                     Return() ]
        textbutton "I don't like":
            xalign 0.2
            # Just return to the label.
            action Return()
Then you have to deal with the likedImages dictionary :

- To know if an image have been liked
Code:
label whatever:
    # Randomly pick a name
    image = renpy.random.choice( imageList )
    if imageName in likedImages:
        "Oh, this one you liked it before."
    call screen whatever( image )
    [...]
- To pick an image already liked
Code:
label whatever:
    # Randomly pick a name already liked
    image = renpy.random.choice( likedImages.keys() )
    call screen whatever( image )
    [...]
And so on.

Note: Keep in mind that I write this in the middle of the night, without having thought about it more than that, so it should works, but it's to be seen as a draft more than as a working code.
Oh my Jesus!
I will take this in a slowly ingrain this into my mind. Thank you very much once again for your time. Hope you get some rest soon!

thank you thank you :love:

Edit: Every time I read this message I get more excited. So many things make more sense now! I know the concept is pretty plain but that's what I'm going for. From what I just saw you could probably write the whole damn thing in a single day :LOL: Stoked! (With luck I'll have it done in five months)
 
Last edited:

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,975
16,229
[...] From what I just saw you could probably write the whole damn thing in a single day :LOL: Stoked! (With luck I'll have it done in five months)
Could it really be in a single day, or in "near to 40 years" + a single day ?
Writing code and learning a new coding language aren't this different ; the more you did it, the easier it will be to do it once again. I haven't wrote a "keep track of the liked images" for a Ren'py game before this message, but I have wrote so many variations around "present many things and keep the preferred ones", that I don't have to really think about it, just to find what would be the best way to do it with Ren'py/Python.
As proof, it's been, wow near to 2 years I think, that I'm working on my own game, and look around, it's nowhere to be found, and will not be before yet many months (more realistically years). And it's not just a question of free time. It's also because even me can sometimes need five months to do something ; it just need to be something I rarely had the occasion to do.

You said that you accumulated 20 hours of lessons, this in a single week. It's already 20 hours of experience, perhaps still more theoretical than practical, but it's more than what you had last week. It's this, that you have to look, not the time that you would perhaps need to do this or that. Simply because this time will never be wasted.
Above on this thread I said that I mostly can learn a new codding language on the fly after one day and with the doc. But if my experience help me to not really struggle, and so make me able to write complicated code faster than you, it also imply that I'll need to refer to the doc for way more time than you. It's easier to remember something when you past one hours trying to understand it, than when you just need to take a quick look at the syntax for this given language.
 
  • Like
Reactions: Lou111

Lou111

Active Member
Jun 2, 2018
543
686
Could it really be in a single day, or in "near to 40 years" + a single day ?
Writing code and learning a new coding language aren't this different ; the more you did it, the easier it will be to do it once again. I haven't wrote a "keep track of the liked images" for a Ren'py game before this message, but I have wrote so many variations around "present many things and keep the preferred ones", that I don't have to really think about it, just to find what would be the best way to do it with Ren'py/Python.
As proof, it's been, wow near to 2 years I think, that I'm working on my own game, and look around, it's nowhere to be found, and will not be before yet many months (more realistically years). And it's not just a question of free time. It's also because even me can sometimes need five months to do something ; it just need to be something I rarely had the occasion to do.

You said that you accumulated 20 hours of lessons, this in a single week. It's already 20 hours of experience, perhaps still more theoretical than practical, but it's more than what you had last week. It's this, that you have to look, not the time that you would perhaps need to do this or that. Simply because this time will never be wasted.
Above on this thread I said that I mostly can learn a new codding language on the fly after one day and with the doc. But if my experience help me to not really struggle, and so make me able to write complicated code faster than you, it also imply that I'll need to refer to the doc for way more time than you. It's easier to remember something when you past one hours trying to understand it, than when you just need to take a quick look at the syntax for this given language.
I feel that a "Thank you" isn't enough here so I have resolved to incorporate my gratitude into my lessons and hopefully find some way to reflect my feelings through my efforts. And thank you :giggle:
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,975
16,229
I feel that a "Thank you" isn't enough here so I have resolved to incorporate my gratitude into my lessons and hopefully find some way to reflect my feelings through my efforts. And thank you :giggle:
You're welcome
 

Lou111

Active Member
Jun 2, 2018
543
686
For those who may have the same question as me and have no coding experience:

Learn Python First!

I fear that this is probably obvious to most but jumping right into guides for RenPy generally assume you are familiar with python. I don't regret the amount of time I spent trying to just learn RenPy right off the bat, in fact, if you try to develop with RenPy first you'll develop an appreciation for python knowledge and embody the practicality of the lessons. Python lessons are like candy for me now :p

Anyway, as I said, It's a dumb post but if this helps 1 person in the future it's worth it. Or perhaps someone has some further input or links that counter my statement (other than just "knowing more python can never hurt").

Back to work.