How I made a video game and sold 5k+ copies: Introduction to visual novel game engine, Ren'Py

Apart from my professional role as a data scientist, I have written about how I started a video game studio from scratch and shipped a game as a solo developer (plus dozens of other hats I wore). As of time of writing this post, the game has sold 5k+ copies in 3 months, which is a conservative estimate due to some regions having very lagged reporting.

This blog post is aimed to be a gentle introduction to how a complete newcomer to game development can get started.

Quick introduction to “AAA” vs. “indie” video game studios

Ubisoft, EA, Blizzard-Activision Popular franchises like Assassin’s Creed and FIFA were created by AAA video game studios.

When we think about video games, some titles like Assassin’s Creed or Overwatch may come to mind. The most popular titles are likely what are called “AAA” (triple-A) games, made by large companies with large budgets. These companies include Ubisoft, Electronic Arts (EA), Blizzard-Activision, and so on. When I first started as only a consumer in gaming (many 12 hour binge sessions), this gave off the impression that in order to pursue video game development, one needed to be part of a AAA company, or start a company with millions of dollars in funding.

This generally used to be the case until the rise of online distribution of games. Previously, the manufacturing costs and retail distribution of games in the form of cartridges or disks were a barrier to entry to small developers, which gave large publishers the power to commercially sell games. In recent years, online channels of distribution have grown substantially, at times overtaking physical retail, and reduced this barrier to entry. “Indie” (independent) games, with small teams and small budgets, were thus able to widely sell their games.

How to become a millionaire indie game developer Best-selling indie (independent) video games include Stardew Valley and Baba is You.

Now, many indie games have found success - an example being Stardew Valley, which made millions for its sole developer within a week of launch. The popular game Terraria also started as an indie game, but has grown a massive playerbase. The list goes on.

Knowing of, and having played these popular indie games reduced the intimidation factor for me when I wanted to make games commercially (not only as a hobby, but also make money!)

Quick introduction of the visual novel genre

Persona 5 is a popular game with visual novel elements Popular franchises like Persona, Danganronpa have heavy visual novel elements.

I also had exposure to popular games in the “visual novel” genre. Many of us might recognize the titles “999/ Zero Escape: The Nonary Games” from the Nintendo DS, or Persona, or the Danganronpa series. Most of these are franchises from Japan which became wildly popular in the West.

Ace Attorney Phoenix Wright is another very popular game with visual novel narrative elements. Ace Attorney is another very popular game franchise with visual novel narrative elements. “Objection!!!”

At this point, I hadn’t yet realized that I could learn to make this type of game. The bestselling titles mentioned above fell into the large studio and large budget category - and likely had custom game engines built by a full team of developers. As a solo or hobby developer, this would be extremely time consuming and costly.

(An aside: I know that many have been introduced to the visual novel genre from adult games, apart from the numerous well known games suitable for all ages. It’s the same with any genre of games - there are adult first person shooters, mobile gambling games, and even MOBAs. So I encourage folks with a pre-conception to see the type of a game as a merely neutral medium.)

Entering game development with no clue and no budget with Ren'Py Ren’Py aims to be the best way to make visual novel games.

As I became curious about creating games of my own, I discovered Ren’Py, an open source engine based on Python, and decided to give it a shot. In fact, many popular games in the visual novel genre are also made with this open source engine, including “Doki Doki Literature Club” which boasts millions of downloads and a large modding community.

Game development commonly relies on object oriented programming, common industry standards being Unreal Engine (C++) and Unity (C#). Of course, Python is able to deal with that easily as well. It’s just that Ren’Py is a good fit for these 2D, story driven games, which means that if you want to make a first person shooter, this engine is definitely not suitable. Use one of the others instead.

Capabilities of Ren’Py

Frankly, one can create very high production quality games with Ren’Py. Even though I can throw all sorts of effects and polish under the sun at Ren’Py, I still haven’t exhausted its capabilities.

Doki Doki Literature Club modding with Ren'Py Some visual capabilities of Ren’Py demonstrated by popular game Doki Doki Literature Club.

Previously I mentioned the game Doki Doki Literature Club which has millions of downloads. It makes use of the animation capabilities of Ren’Py to create its memorable horror effects. I would say that Ren’Py is rather flexible in the realm of 2D visual effects.

GUI customization with Ren'Py Visual novel game GUI isn’t limited to the common format of dialogue boxes at the bottom.

In addition, in terms of customizing the GUI and any screen components, the sky is the limit. In game programming, which is heavily OOP, the menus, dialogue boxes are implemented as classes and can be easily used and modified from there. An example of different types of GUI and screens is A Hero and a Garden.

3D camera in Ren'Py video game development There are even advanced plugins like this 3D camera used in Highway Blossoms.

There is also a lively community of plugin development, for example this 3D camera plugin (link to video demo in a big budget game).

Example: Timer class with Python

A Summer with the Shiba Inu Creating a timer feature and dynamic dialogue in A Summer with the Shiba Inu.

In my game, A Summer with the Shiba Inu, I wanted to create a timer that calculates how long it takes the player to make a choice action in the game, as well as display that back. I use this simple example because it makes use of what any Python programmer will recognize… standard library’s random and time. Just import those and you’ll be set to go!

A Summer with the Shiba Inu Python standard library for game features in A Summer with the Shiba Inu.

I also wrote a class to pick from a list of utterances, so the dialogue wasn’t getting repetitive. So each time the game displays back the timer, it will say something different thanks to the instantly recognizable string formatting in Python. All this to say that adding features in games isn’t as intimidating as I had thought, thanks to Ren’Py and just knowing some Python!

How to get started with Ren’Py, step by step

I personally learned directly through making my own game: No “practice” games, purely trial and error, again and again. Knowing what I do now, I would actually have recommended my past self to watch just a few more videos or tutorials so that I could have saved time doing things that already had implementations instead of doing it all myself (out of ignorance of what exists) and wasting some time.

Hence the steps I would recommend are as follows:

  1. Download Ren’Py.
  2. Go through the Ren’Py tutorial which is built into the engine launcher. (This is mandatory. You don’t need any other source of information in your first 3 hours with Ren’Py).
  3. Watch some videos, I recommend the YouTube channel by Empish, a well-known Ren’Py developer. Even with my experience in Ren’Py, I still learn from her videos.
  4. Get started writing a storyline for your game and make an MVP as fast as possible. The rest of the pieces will fall into place. Once day I might write more detailed tutorials on how to manage the art assets, but for now please see my post on the roles I did for my first game.
  5. I also recommend the Visual;Conference videos, which I have spoken at several times. This conference gathers many experienced visual novel developers in the West and they freely share their knowledge.

Reference material

Ren’Py GitHub: github.com/renpy/renpy

Some of the content of this post was also part of my PyCon Canada, PyCon India talks, the slides of which you can find here. Notably, the “how to step by step” is exclusive to this blog, but the talks feature more Python code examples.

I’ve elaborated on the process of building the game studio in this post - Building a game studio from the ground up.

More articles about "dev"

Affiliate disclosure: The content on this site is reader-supported.
As an Amazon Associate, we may earn commissions from qualifying purchases from Amazon.com.