Ren'Py "Basic Functions" Coding Template or Example?

Mar 16, 2023
18
4
Are you by any chance open to the idea of bringing on a programmer? I've been trying to get into development for the past two months but I'm on the opposite side of things - have most of the code completed but I'm struggling to tackle the art/writing side of things.

I've already completed one VN (all 3D art and code by me) that's about 30 minutes in length, but I never bothered publishing it. Hoping to break into the adult gaming space in the next 10 - 12 months with my first release.

Working on a project like yours would be a nice stepping stone for me, especially if you have all the story, art and sound design completed. It would give me some practice coding - all you need to do is tell me what your vision is and I'll bring it to life with code.

I'm not interested in getting paid, I just want some experience working with another developer and helping build a completed game. As a test run, you could always give me 40 - 50 stills with the corresponding script, and I could show you what I'm capable of creating. Worst case is, if you aren't a fan of my work, then you could just decide to tackle all the coding yourself.

I'm very kink friendly and at the very least I'm open to talk about possibly working together. Let me know if you're interested and we could talk more on Discord/reddit/etc.!
 
Last edited:

Mikethe3DGuy

Member
Game Developer
Mar 14, 2019
232
447
Are you by any chance open to the idea of bringing on a programmer? I've been trying to get into development for the past two months but I'm on the opposite side of things - have most of the code completed but I'm struggling to tackle the art/writing side of things.

I've already completed one VN (all 3D art and code by me) that's about 30 minutes in length, but I never bothered publishing it. Hoping to break into the adult gaming space in the next 10 - 12 months with my first release.

Working on a project like yours would be a nice stepping stone for me, especially if you have all the story, art and sound design completed. It would give me some practice coding - all you need to do is tell me what your vision is and I'll bring it to life with code.

I'm not interested in getting paid, I just want some experience working with another developer and helping build a completed game. As a test run, you could always give me 40 - 50 stills with the corresponding script, and I could show you what I'm capable of creating. Worst case is, if you aren't a fan of my work, then you could just decide to tackle all the coding yourself.

I'm very kink friendly and at the very least I'm open to talk about possibly working together. Let me know if you're interested and we could talk more on Discord/reddit/etc.!
Yeah that's a very interesting proposition to be honest! So far I've done absolutely everything myself, and always intended to be a one-man-show, but I'm intrigued, at least partially because this has taken SO long to get to this point, I've been worried about a possibly steep learning curve for Ren'Py coding slowing me down more. And then would you be interested in getting some help from me on writing and other areas for your game(s)?

I just finished picking out all music, which is the last step before I intended to start coding. I was about to post a question about including music in animations because I discovered something fantastic as I was just messing about with an animation I hadn't actually intended providing music for - I had the 9 second animation (MC masturbating to the image of the main female character he'd just met) playing in a loop, with just SFX, and at the same time played some latin tunes that obviously were not looping with the animation, and it turned the animation into such a funny scene to me that I could easily imagine a player just letting it loop over and over for a while. I was going to ask if you could simultaneously have a short animation looping while music played, either not looping at all, or just looping separately (since it's a different length than the video). I imagine yes, but don't know for sure.

I'm not a Discord "power user" by any stretch, but I'm Mikethe3DGuy#5658
 
Last edited:

TessaXYZ

Active Member
Game Developer
Mar 24, 2020
686
1,497
Yeah that's a very interesting proposition to be honest! So far I've done absolutely everything myself, and always intended to be a one-man-show, but I'm intrigued, at least partially because this has taken SO long to get to this point, I've been worried about a possibly steep learning curve for Ren'Py coding slowing me down more. And then would you be interested in getting some help from me on writing and other areas for your game(s)?

I just finished picking out all music, which is the last step before I intended to start coding. I was about to post a question about including music in animations because I discovered something fantastic as I was just messing about with an animation I hadn't actually intended providing music for - I had the 9 second animation (MC masturbating to the image of the main female character he'd just met) playing in a loop, with just SFX, and at the same time played some latin tunes that obviously were not looping with the animation, and it turned the animation into such a funny scene to me that I could easily imagine a player just letting it loop over and over for a while. I was going to ask if you could simultaneously have a short animation looping while music played, either not looping at all, or just looping separately (since it's a different length than the video). I imagine yes, but don't know for sure.

I'm not a Discord "power user" by any stretch, but I'm Mikethe3DGuy#5658
Honestly, the learning curve for Renpy is more of a hillside than a mountainside. Just jump in and learn.

As for your last question about music/sounds v. animations, those are two separate entities. The music loops independently of whatever you do with your animations.
 
  • Like
Reactions: Mikethe3DGuy

Mikethe3DGuy

Member
Game Developer
Mar 14, 2019
232
447
Honestly, the learning curve for Renpy is more of a hillside than a mountainside. Just jump in and learn.

As for your last question about music/sounds v. animations, those are two separate entities. The music loops independently of whatever you do with your animations.
Thanks. I'm not personally worried about the learning curve, but that on top of all the data entry I imagine having to do will add delays to an already-delayed project. If someone who's already past that learning curve is offering to code for free, what do I have to lose?

I appreciate the info regarding looping music!
 
Mar 16, 2023
18
4
Thanks. I'm not personally worried about the learning curve, but that on top of all the data entry I imagine having to do will add delays to an already-delayed project. If someone who's already past that learning curve is offering to code for free, what do I have to lose?

I appreciate the info regarding looping music!
Sound is pretty simple once you learn how to work with it, all you have to do is keep track of all your different audio tracks and make sure the levels are similar, then you can mess around with looping, audio transitions, etc.

Went ahead and added you on discord, I'm peachesinpower#7137. I'm on a bit of a later schedule since I'm a college student full time and do game dev stuff on evenings/nights, but I'm still down to help tackle some of this workload! Would love to know more about the game first though. At the very least, I could try my best to guide you in the right direction and offer some help when needed.
 

Mikethe3DGuy

Member
Game Developer
Mar 14, 2019
232
447
Sound is pretty simple once you learn how to work with it, all you have to do is keep track of all your different audio tracks and make sure the levels are similar, then you can mess around with looping, audio transitions, etc.

Went ahead and added you on discord, I'm peachesinpower#7137. I'm on a bit of a later schedule since I'm a college student full time and do game dev stuff on evenings/nights, but I'm still down to help tackle some of this workload! Would love to know more about the game first though. At the very least, I could try my best to guide you in the right direction and offer some help when needed.
Great! Sent you a friend request on Discord.
 

mickydoo

Fudged it again.
Game Developer
Jan 5, 2018
2,446
3,550
If someone who's already past that learning curve is offering to code for free, what do I have to lose?
Learning ;)

My coding skills have come 100% from where I started, I now code like a 4th grader as opposed to a 3rd grader. When I started out python was just a snake, something Hulk Hogan referred to as his arms and something I told girls that has one eye, spits and lives in my pants. BUT I have learned everything I know, by myself, chugging away, the end result apart for a sense of achievement, I know exactly how my code works, if it breaks, I can fix it.
 

Mikethe3DGuy

Member
Game Developer
Mar 14, 2019
232
447
And this is by far the most important point.
Well, I don't expect to be "hands-off" with the code, but I have a responsibility to fans at this point to get it moving expeditiously toward release. I will absolutely study and play with the code to make sure I understand it, and I imagine that a lot of the final tweaks will come from me. I have gone through all the Ren'Py tutorials and am not completely ignorant of coding. It's just been a good year since I've had my hands in it.
 

TessaXYZ

Active Member
Game Developer
Mar 24, 2020
686
1,497
Well, I don't expect to be "hands-off" with the code, but I have a responsibility to fans at this point to get it moving expeditiously toward release. I will absolutely study and play with the code to make sure I understand it, and I imagine that a lot of the final tweaks will come from me. I have gone through all the Ren'Py tutorials and am not completely ignorant of coding. It's just been a good year since I've had my hands in it.
I mean, seriously if you have two brain cells to rub together you can be proficient in Renpy within a couple weeks. Being self-sufficient is a boon, and in the long run it is the better investment to deliver content to your base. What are you going to do two releases from now when the person coding for free disappears or demands payment?
 
  • Like
Reactions: anne O'nymous

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,515
15,427
[...] but I have a responsibility to fans at this point to get it moving expeditiously toward release.
As TessaXYZ imply, do not rely exclusively on a third party for this. I stopped a long time ago to count the examples of games started by a team, and then abandoned, or hardly continued by a single person that now have to do everything.
I have nothing against peachesinpower, and I don't imply that he don't know what he's doing, or that he will abandon you. But life is a bitch, he can be forced to stop coding for you, or he can be less capable than he think. I don't know, you don't know, himself don't know. What will happen if he try to do something too big for his knowledge and there's tons of bugs ? What will happen if he's forced to stop ?
How will you be sure that one day a player will not come and point a bug breaking the game for him ? You can't even be sure when it's yourself who write the code, I can't even be sure when it's my own code and I'm one of the most qualified for Ren'Py here.
Then, what will happen to your game if you lost your coder ? You'll not be able to continue it, nor be able to fix ts bugs. Isn't doing both also part of your responsibilities ?

Of course, it doesn't mean that you need to do everything by yourself. But it mean that you should have at least the knowledge to not be put in a position where you'll have to abandon the game, letting it half broken.
 
  • Like
Reactions: Mikethe3DGuy
Mar 16, 2023
18
4
As TessaXYZ imply, do not rely exclusively on a third party for this. I stopped a long time ago to count the examples of games started by a team, and then abandoned, or hardly continued by a single person that now have to do everything.
I have nothing against peachesinpower, and I don't imply that he don't know what he's doing, or that he will abandon you. But life is a bitch, he can be forced to stop coding for you, or he can be less capable than he think. I don't know, you don't know, himself don't know. What will happen if he try to do something too big for his knowledge and there's tons of bugs ? What will happen if he's forced to stop ?
How will you be sure that one day a player will not come and point a bug breaking the game for him ? You can't even be sure when it's yourself who write the code, I can't even be sure when it's my own code and I'm one of the most qualified for Ren'Py here.
Then, what will happen to your game if you lost your coder ? You'll not be able to continue it, nor be able to fix ts bugs. Isn't doing both also part of your responsibilities ?

Of course, it doesn't mean that you need to do everything by yourself. But it mean that you should have at least the knowledge to not be put in a position where you'll have to abandon the game, letting it half broken.
Mike and I have been discussing development on Discord and I've made myself clear that I'm on board for this one project before moving onto a project of my own. He's shared with me his list of stills/animations along with a corresponding script, and I've reviewed it a couple of times to ensure that I'm capable of finishing it in a timely manner.

I've been wanting some hands on experience with helping publish a game, and since our interests/kinks for this project coincided, I'm also happy to be passionate about a project that I'm confident I can help out on. Not only that, I'm excited to help out another fellow developer and hoping that we can each learn from each other's areas of expertise. I'll be leaving plenty of comments explaining my code, as well talking him through my logic/process so he can tackle future projects and updates on his own.

In return, Mike's offered to help with writing for my game when I begin development on it in the coming months.

I also made it clear to him that I would code the first 10 or so minutes of his game for him to evaluate if he'd like me to continue helping him code, or if he'd like to pursue development on his own. Ultimately this is his game, and while I don't want to leave him out to dry, I also want him to be able to bring his vision life as accurately as possible.

Hope that clears up any concerns! I have no doubt Mike is capable of learning Ren'py himself, I'm just happy to offer my help so we can both learn from each other.
 
  • Like
Reactions: Mikethe3DGuy

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,515
15,427
[...] I've made myself clear that I'm on board for this one project before moving onto a project of my own.
It's your intention, and I don't doubt that you are sincere, but that's "as long as everything goes as expected".

Take Lexi by example. An interesting game, full of promise. Chatterbox, the lead dev, fought a serious illness, and achieved to win... until Covid caught him at his weakest, few weeks after a transplant, and killed him. Or Seraphim Academy, here again a promising great game. Lead dev illness had a peak, the rest of the team went crazy when left on their own, and the game have been abandoned. Family, Friends and Strangers, Rich had to learn how to write a story and do 3D CGs when the writer and artist jumped out of the boat. And those are just three examples involving team issues.
There's also all the solo dev cases. Ethan's Legacy, abandoned due to the mental breakdown of the dev. Love and Submission, abandoned when shit hit dev's life. Or that one I don't remember the name, made by a student that had the chance to go study oversea with a scholarship, and had to stop the project. There's also that wife who goes rampage when she found that her husband was a fucking liar and cheater. That guy kicked out of the house by his girlfriend when she discovered he was working on an adult game on her back. Or that guy from Porto Rico who worked on a Big Brother clone and lost everything, who know perhaps even his life, years ago when a hurricane hit the town he lived in.

I wish you only the best, but shit happen and then all good intention suddenly become meaningless.
Talking about the best, perhaps will you have a baby, encounter the wife of your life, or perhaps will you be hired for the job you dreamed all your life. All this will left you with less free time and more important priorities in life.

I don't say that you'll not fulfill your promise, just that you can be forced to drop it for a reason or another. And if it happen, Mikethe3dguy will have to deal with it, facing a code that he'll possibly not be able to continue nor to fix.
Or he can do both, having you as coder and learn how to effectively and efficiently use Ren'Py. Then, if the worse happen, he will be able to continue the game. And if nothing happen, he will sill have more knowledge what is never wasted time.
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,586
2,232
As daunting as it may seem at times, RenPy is easy to get going with.

Kinetic Novel:
  • label start: (start the game)
  • return (end the game)
  • scene {picture} with fade (show an image, with quick fade to black)
  • scene {picture} with dissolve (show an image, without quick fade to black)
  • define {character_id} = Character("{character name}") (create a character who can speak during game)
  • {character_id} "{dialogue}" (use predefined character to speak some dialogue)
  • "{non-character dialogue}" (display some dialogue or text, but without a character saying it)
  • pause {seconds} (Wait a bit before continuing)

That's pretty much all you need for a basic story.

Visual Novel (everything for a Kinetic Novel... plus...):
  • menu: (Give the player a choice)
  • jump {labelname} (move to a different branch within the code)
  • label {labelname} (define somewhere that can be jumped to)
  • default {variablename} = {value} (create a variable that can be used to make decisions)
  • if {variablename} {comparisonoperator} {value}: (check a variable's value and do something [usually jump] if it's true)
    • (where "comparisonoperator" is usually "==", "!=", ">", "<", ">=" or "<=")
    • (equals to, not equals to, greater than, less than, greater than or equal to [or] less than or equal to.
  • $ {variablename} = {newvalue} (Set a variable to a new value)
  • $ {variablename} += 1 (Add 1 to a variable)
  • $ {variablename} -= 1 (Subtract 1 from a variable)
  • $ {variablename} = renpy.input() (Have the player enter a value to be stored in a variable - usually the character's name)
  • define [character_id] = Character("[variablename]") (Use a variable for a character's name instead)
That's pretty much all you need for a basic branching story.
You need to understand the possible variables types. But even that is optional if you only ever use strings (text within quotes).

Beyond that, it's mainly about prettying your game up. Making decisions based on clickable pictures (imagebutton: instead of menu:). Or adding music and/or sound effects (if in doubt... don't). But if you keep your game about the story rather than the visuals, you don't NEED all the other potential topics that could bog you down.

Then, it's just about time management and how you deal with stress. Your first release will be slow (don't tell anyone you're working on a game). But by your second release, things should be mostly settled down to the point where you know what you're doing.

I'm probably missing some commonly used RenPy commands. But they may not be commands you NEED to write a story based game. But you get the idea... about half a dozen commands to get you started and about another half a dozen to do a slightly more complex gaming... that's it. The rest is personal preference, graphics and story telling. But they're NOT RenPy. RenPy is just repeating the same dozen or so commands over and over again.

General advice... Use lowercase for everything coding related (variable names, filenames, etc). If you really must break things up for easier reading, use snake_case (each_lowercase_word_separated_by_an_underscore). RenPy converts specific things to lowercase. If you only ever use lowercase - you'll never need to learn what those specific things are.
 
Last edited:
  • Like
Reactions: BlenderGuy
Mar 16, 2023
18
4
I don't say that you'll not fulfill your promise, just that you can be forced to drop it for a reason or another. And if it happen, Mikethe3dguy will have to deal with it, facing a code that he'll possibly not be able to continue nor to fix.
Or he can do both, having you as coder and learn how to effectively and efficiently use Ren'Py. Then, if the worse happen, he will be able to continue the game. And if nothing happen, he will sill have more knowledge what is never wasted time.
I totally get your concerns and I agree how often teams of developers often fail due to unforeseen issues that arise. It's always sad to see a project die, especially when it's because of health complications. While life can't always be predicted, I do think it's possible to structure development in such a way that the project isn't guaranteed to fail if other developers drop out.

In Mike's case, I feel like his project will be a guaranted completion since we'll be pair programming on this. Even though I'll take the reins, I'll be explaining my code each step of way, making sure I also comment my code and explain the logic in a separate document so that Mike can always refer to it and expand (or continue) my work in the future. In return, he's helping me by offering advice on story building and developing natural dialogue for my game.

I see it as a trade off - we're each capable of doing both jobs, but we're choosing to prioritize our time on what we're both best at. Ideally we'll both reach a point where we're effectively and efficiently self-sufficient like TessaXYZ mentioned, but until then it doesn't hurt to help each other learn along the way!
 

Mikethe3DGuy

Member
Game Developer
Mar 14, 2019
232
447
As TessaXYZ imply, do not rely exclusively on a third party for this. I stopped a long time ago to count the examples of games started by a team, and then abandoned, or hardly continued by a single person that now have to do everything.
I have nothing against peachesinpower, and I don't imply that he don't know what he's doing, or that he will abandon you. But life is a bitch, he can be forced to stop coding for you, or he can be less capable than he think. I don't know, you don't know, himself don't know. What will happen if he try to do something too big for his knowledge and there's tons of bugs ? What will happen if he's forced to stop ?
How will you be sure that one day a player will not come and point a bug breaking the game for him ? You can't even be sure when it's yourself who write the code, I can't even be sure when it's my own code and I'm one of the most qualified for Ren'Py here.
Then, what will happen to your game if you lost your coder ? You'll not be able to continue it, nor be able to fix ts bugs. Isn't doing both also part of your responsibilities ?

Of course, it doesn't mean that you need to do everything by yourself. But it mean that you should have at least the knowledge to not be put in a position where you'll have to abandon the game, letting it half broken.
I appreciate the caution, but as I mentioned I don't intend to rely solely on anyone for any part of this. It just makes sense for both of us right now. I was entirely prepared to do all the coding myself, and my guess is that after this first release I'll more than likely do quite a bit of coding. Quite possibly even for this release, since I'm an incessant tweaker, and will almost certainly see some things I'd like to change, and will just figure it out and get it done. If I "lose my coder" I'll just code it myself. If he turns out to not be as good as I thought, he'll still almost certainly be better than I would be at the beginning, and it's not like we're talking about a terribly long time horizon. Peachesinpower will code a scene or two for me before we go any further. I'll preview it and see how it runs, and we'll both decide whether to push forward from there.
 

coffeeaddicted

Well-Known Member
Apr 13, 2021
1,765
1,437
It's not strictly needed, it just makes changing song much smoother listening experience for the player when a song isn't cut abruptly. Typically you don't want a lot of silence between songs. Players will also advance between screens and very different paces.

Then again, your game, you decide.
music music music, this is such a great topic in itself.
I think it works best if its some form of romance story. There a lot of great tunes out there for that.
For something more sinister it is not that easy.
To find the sound that nails the vibe of the game.

I don't know a lot because i am lazy but i tested it so that when dialog is almost at the end, i would let it fade out till the player would hit the key for the next slide. But then again, who knows if he/she will hit the key. I am not sure if there is a detection command that will trigger the fade effect instead of timing.
Also, i forgotten now because i don't have it anymore, but you can level the volume by default so your ears don't get blown away when playing the game. This is important because i have tinnitus so my ears are sensitive.
There are some that just use the default which can be really loud.