How to Make an Adult Game
Hi everyone ?
I’m a long time adult game developer, (I love my job) In this tutorial we will learn how to make an adult game from 0, I accepted a challenge to create a Tutorial so that anyone without the need for programming knowledge can develop it, and take what has been learned as a basis to develop future games, We will learn from the Download of the chosen Engine, until the publication of the game, You can find out more about me through my Patreon
At first we will use the Unity engine, as it is free and easy to access for beginners, This engine will allow you to publish games for platforms from PC to mobile devices and consoles! note that for the development of a complex game it takes a lot of time and dedication, As I intend to make a quick and practical tutorial, we will use simpler systems and a more summarized game, but with an ability to be expanded!
Get started!
(Engine Download & Install)
Step 1 – Let’s download the engine, you can find the latest version of the engine at the link: https://unity.com/download and click on the Download option:

Next, you will be able to choose your operating system:

Step 2 – To do the installation is no secret! just click on I Agree, Install,and finish, Once the installation of the Unity HUB is complete, if you start the installation of the Editor, which is where we will be working, the following window will appear when the installation is complete, just click on Install Unity Editor:

Step 3 – We will also need a code editor, I will use Visual Studio as an example in the images, but you can use any of your preference (even a notepad), Just check the Microsoft Visual Studios Community option as soon as you install your Unity Editor:

Finally, once you’ve installed Unity and its code editor, don’t forget to create an account in the top left corner of the Unity Hub! (You can use a google account for login)
Creating our first project!
(Creating a 2D Project)
Step 1 – Finally we will create our first project, Let’s start with a game in 2 dimensions, For this initial tutorial, I opted for the 2D option because it is faster and more practical to develop the assets and systems, but note that you can use the same steps to develop your 3D game as well!
On the Projects tab, click the blue button (New Project)

Then in the next window, choose the 2D option, and Rename the project according to your liking, For this tutorial, I’ll call the game Pervert Nights, and click Create project!

Step 2 – As soon as you click to create a new project, this process may take a while (depending on your computer) but in the end you will see this interface:

The first thing we need to do when opening our project, is to organize the Assets, so we will create 4 folders, Objects, Characters, Scripts and Animations, At first they will be the folders that we will use for our project, but you can create more folders according to your project to add for example Sounds or Particles
To create folders you need to right-click on the Assets area
, and then go to Create
and then Folder
:

Step 3 – Let’s now learn how to add objects and backgrounds to our game, At the end of this file, I will make available to everyone the download of the assets
that we will use in this tutorial, but remember, you can use your own drawings or assets as you prefer!
There are several ways to add the assets to our project, one of them is by clicking and dragging the assets to the desired folder, The second way is by copying the assets and pasting them into the desired folder, do it like a common file on your computer!

And that’s it! We already have assets available to get you started!,
Developing our first scenario!
(Setting up a background with only Objects and images)
To set up our first scenario, we could use a Unity technique to create Tiles, but since the goal of this tutorial is to do it in an easier and faster way, we will use objects!
Step 1 – In our Unity project, inside the Objects folder where we put our first Assets, Click and drag the image (Background) to the stage as I will do in the GIF below, and then duplicate the image using the shortcut Ctrl + D and drag to the side, creating a starting background for our game!

You can use the Move Tool to adjust the position you want of an object, better aligning the 2 objects that make up the Background!, To use it just click on the object you want to move and use the green arrow for up and down, and red for left and right!:
Ready! Once you’ve added the 2 Objects that make up our first Background, and aligned them correctly, we can now add a floor for the character!
Step 2 – Let’s now add a floor to our game, we will use the same process for this, First we will make the base, drag to the scenario the image called (Base) then put it in position and use the Rect Tool to increase the size, see the example below:

Now let’s place our floor, do the same process for the image (Ground1) Duplicate it using the (ctrl + D) and adjust its position always next to it until it fills all the space, at the end you can click on the Game tab
to see the result! Here’s an example:

Ready! We now have a floor for our scenario, That way we will have more objects in the game, which will make the performance of the game not the best possible, But as it is a 2D game where we will have few elements, this will not be so relevant!
Note that in the Hierarchy menu
we can see all the objects we create in the game, It will be important in the future to organize everything!
Creating colliders!
(Adding Collision to an Object)
Colliders are very necessary for our project, as they are the ones that will prevent the player from crossing to unwanted places, such as the floor or walls!
At first we are going to add a collider at the base of our floor, to do this is very simple, just select our base, and then go to the inspector
tab and click on the Add Component
button, then we will search for collider and select the option Box Collider 2D
ready!
Here’s an example:

There are several other types of colliders and several different shapes, it is a very important tool that we will need to use throughout this tutorial, they are also used to create detection areas, where for example the game will detect when our character is close to a door
Creating our character!
(Adding the character to the game with scripts)
Step 1- Well, now that we’re more or less familiar with Unity’s interface, we’ve learned how to import files and put them on stage, let’s now go to a more advanced step!
Remember the folders I asked you to create? Don’t forget to import the Assets that I’m going to leave in this tutorial to the specific folders, go to the Characters folder
, we’ll find our character there, Then we’re going to organize the zoom of the folder to see a list with the names that we’re going to need, And we’re going to drag our character to the stage, drag the Player Idle file
to the stage.
Do as example:

Step 2- Note that the character is behind the stage, this happens because we haven’t defined a layer order for him, so it’s time to start organizing our project!
First set the character layer order to 2, to do this click on the character asset in the Hierarchy
tab and then in the Inspector tab, in the Orden in Layer
option set 2 this will make the character in visibility priority in the game
Here’s an example:

To better organize our project (it’s very important to learn this so that your project isn’t so hard to find assets and be modified) Let’s organize with empty files!
Empty files work as folders for example, let’s start by creating an empty file called Ground
and then we’ll drag all the content that is part of the floor into it, do the same with the background!
Finally, let’s rename the Player Idle asset in the Hierarchy menu
to Player only!
Here’s an example:

You can arrange it however you like, but look at the example how we eliminated visual clutter from the
Hierarchy menu!
Step 3- Let’s now work on our character itself, notice that he is too big and in my case he is misaligned with the ground, let’s use the tools we already know before to move him and reduce his size until he is more or less like this (Yes floating… you’ll know later):

Great! Now we need our character to have 2 bridges as well! The first one is a collisor, we need it not to go through everything like a ghost, so we’re going to use the Capsule Collider 2D
, we’re going to add it in the same way as we did with the floor, you can edit the collision freely using the Edit Collider tool
if you prefer.
The second component that we will need is the RigidBody, with which we will have a physics in the character! It is an indispensable component if we want our character to have gravity, to which we add the Rigidbody 2D component
Remember how we put our character “floating” on the stage? We need this to test our gravity, then hit the play button and watch the magic happen!
Here’s an example:

We also need to lock the rotation of the character so that he doesn’t “stagger” around, exit the play mode and in the Rigidbody 2D
menu you just created, go to Constraints
and check the option Freeze Rotation Z
is not mandatory for all projects, but this will avoid several bugs in this one!
Step 4 – Now in step 4 we will start working with Scripts!!
Scripts are programming commands that we will use to perform some actions in the game, but don’t worry! You won’t need to be a master of programming to create the game of this tutorial, we will add simple commands and all of them will be available both in the Download and throughout the tutorial, just follow!
To create a script, we will first go to the Scripts
folder and create a script by right-clicking on the empty part of the folder, going to Create
and C# Script
and putting the name of Player.
Now let’s add the Script to the Character, Click on the script you just created and drag it to the Asset Player in the Hierarchy menu, now we can open our script by double clicking on it and finally start programming!
Do as example:

At the beginning of the tutorial we installed Visual Studio as an editor for scripts, but you can use whichever editor you prefer, or even a notepad to open a script!
Step 5 – From that point on, we’ll just create the lines of character code, so just look at the screenshots of the script and try to edit your script so that it looks exactly as it is in the example! Be very careful with semicolons, any divergence will create mistakes!
(In this tutorial I will not explain what each code does, I will only point out some more important ones, otherwise this tutorial will be extremely long, also note that you need to do this part with full attention and patience!)
Let’s start by defining the speed of our character, in the script, under the first “{” add the following line of code:
public float Speed = 5;
Note that 5 is the player’s speed, you can add a higher number if you want a faster movement, or a lower one if you want a slower one!
It looks like this:

Next we will add a new function to control the movement of the player with the directional arrows or the A and D, Before the last “}” add:
void Move()
{
Vector3 movement = new
Vector3(Input.GetAxis("Horizontal"), 0f, 0f);
transform.position += movement * Time.deltaTime * Speed;
}
It looks like this:

Now let’s call the method we just created in the “void Update()” Just add between the two “{ }”:
Move();
It looks like this:

Now let’s save our script (Ctrl + S) and let’s play our game to test! Try to use the arrow keys to move the player around
Here’s an example now:

Step 6 – Now that we have the movement of the character, let’s create the jump!
To do this, just as we created our move function (void Move) let’s also create the jump function (void Jump) in the last “}” of the script once again, add the following script line:
void Jump()
{
if(Input.GetButtonDown("Jump"))
{
rig. AddForce(new Vector2(0f, JumpForce), ForceMode2D.Impulse);
}
}
Next, let’s add 2 more variables at the beginning of the script after the Speed variable we added earlier:
public float JumpForce = 8;
private Rigidbody2D rig;
The number 8 of this JumpForce variable can be changed to the jump size you prefer as well!
Now let’s link the rig variable to the Character’s RigidBody, for this in the void Start() after the first “{” add:
rig = GetComponent();
And finally, let’s call our new Jump function in the void Update()
just below our Move()
line; add:
Jump();
Ready! The script for the jump is finished!
(Make sure the Script is exactly like the one I’ll show you in the following image)
Here’s what the final script looks like:

(Make sure the punctuation is correct and that the script doesn’t have any error signs)
Then save the Script (Ctrl + S) and test the game using the spacebar to jump!
Here’s an example:

Finally, in the RigidBody 2D
of the Player
in the Inspector
tab, change the Gravity Scale
to 2
(This will increase the gravity making the jump more realistic)

Now we need to limit the player to only 1 jump per turn, so let’s work with collision identification!
In the Hierarchy
tab Select the Ground
, then go to the Inspector tab
and click on the Default Layer
and go to Add Layer...
then add the name Ground
in User Layer 6
.
Redo the same steps, Go to the Hierarchy
tab Select the Ground,
then go to the Inspector tab
and click on the Layer Default
and now select Ground
, and confirm Yes, Change Children
for the msg that will appear!
Here’s an example:

Now let’s go to the script, let’s add 2 functions for this condition, before the last “}” of the script add:
private void OnCollisionEnter2D(Collision2D collision)
{
if(collision.gameObject.layer == LayerMask.NameToLayer("Ground"))
{
isJumping = false;
}
}
private void OnCollisionExit2D(Collision2D collision)
{
if (collision.gameObject.layer == LayerMask.NameToLayer("Ground"))
{
isJumping = true;
}
}
Example:

Now add the variable that will check if the player is jumping, Under the rig variable, add:
public bool isJumping;
Example:

And finally, in our void Jump() function replace the line:
if (Input.GetButtonDown("Jump"))
By:
if (Input.GetButtonDown("Jump") && !isJumping)
That will check if the player is jumping or not, then save the script and test the game!
The Script should look exactly like this:

Creating animations!
(Animating the character)
Step 1- Finally we have reached an indispensable part of the project, let’s now learn how to work with animations and how to control them.
To start, we will need 2 new tabs in our Unity, the Animation
and Animator
tab, to add them to your interface you must go to the Windows
menu at the top of the screen, then to Animation
, and once again to Animation
, do the same process to activate Animator as well, don’t forget to organize the windows as you wish!
Here’s an example:

These are the interfaces we’re going to use to create and control our animations!
Let’s now create our first animation which will be the animation of the stationary character, for that we click on the player's asset in the
Hierarchy menu
, then we click on the Create
button that is in our new Animation window,
Unity will ask you to define the place where the animation will be created, let’s create them in our Animations folder
that we created at the beginning of the tutorial, Set the name of our new animation to Player_Idle.
Now we need to do something really important, we’re going to put our new Animation
window, in a place away from our Project
window, you’ll see why
Here’s the step-by-step guide:

We need to do this because we’re going to need to drag content from the Project
tab to the Animation tab!
Now we have created our first animation file, we just need to add the content, go to the Animations
folder in the Project tab
, and search for the frames of the animation (Player Idle anim) there will be 10 images that make up the animation, after that click and drag them into the Animation window
(you can hold the Shift button to select all at once).
Next, we’re going to increase the length of the duration of our animation by clicking and dragging in the corner of the frames until we reach 1:00
, and then we’re going to play our game and see how it turns out!
See the example below:

Ready! We have an Idle animation of our character, you can change the animation speed and frames as much as you want in the Animation
window, this goes for any animation you are going to use in unity using frames!
Now we’re going to create the character’s walking animation, we’re going to use the same steps for this, but we need to create a new animation inside the player
, For that we’re going to go to our Animation
tab, then click on the top left corner in Player_Idle
and go to Create New Clip… let’s call this new animation Player_Walk
and save it to the Animations folder
as well!
Now we’re going to do the same process, drag the animation from the Project
tab into the animation in the Animation tab,
then we’re going to change the size of the animation as well until we hit 1:00
.
See the example below:

Now to finish this step and as a learning exercise, do the same procedure to create the Player_Jump
!
Step 2- Now let’s learn how to control our animations! If you played the game, you noticed that only one animation is running, which was precisely the first one we created, this happens because Unity defines the first one created as the default, and we now need to create conditions for the other animations to be executed, let’s go? Go to the Animator
tab that we recently opened, notice that our 3 animations are there!

Now we need to create the transitions of the animations, and their conditions, for this in the same Animator
tab, go to the top left of the Animator tab
, and click on Parameters
, then click on the “+
” sign and create a variable of type Bool
, put the name of walk
, do the same process and create another variable of type Bool
Called Jump, we’ll use that later!
Now let’s create the transitions, Right click on the Player_Idle animation that is highlighted in orange, and click on the Make Transition option, then click on the animation Player_Walk
, that way notice that we have created a transition between the two animations, now click on the animation Player_Walk
and return to the transition to the Player_Idle
, Do the same with the Player_Jump
too!!
(You can drag the animations however you like to position them better and get a better view of what you’re doing!)
Here’s how to do it:

We need a few more steps to finish the conditions and transitions, now that you’ve arranged the animations in a way that we can see the transitions let’s get to work!
Na transição que vai do Player_Idle
para Player_Walk
, clique na seta e vá em Conditions
na aba Inspector
, e clique no sinal de “+” defina walk
e true
.
Na transição que vai do Player_Walk
para Player_Idle
, clique na seta e vá em Conditions
na aba Inspector
, e clique no sinal de “+” defina walk
e false
.
Na transição que vai do Player_Idle
para Player_Jump
, clique na seta e vá em Conditions
na aba Inspector, e clique no sinal de “+” defina jump
e true
.
Na transição que vai do Player_Jump
para Player_Idle
, clique na seta e vá em Conditions
na aba Inspector
, e clique no sinal de “+” defina jump
e false
.
Na transição que vai do Player_Walk
para Player_Jump
, clique na seta e vá em Conditions
na aba Inspector
, e clique no sinal de “+” defina jump
e true
.
Na transição que vai do Player_Jump
para Player_Walk
, clique na seta e vá em Conditions
na aba Inspector
, e clique no sinal de “+” defina jump
e false
.
Uffa! Now we have all the conditions set! A little tweak now!
Our game won’t need a delay in the animations, so in all the transition arrows that we’ve tweaked now, we’re going to modify some small settings.
Do this for all transitions: go to the Transition Inspector
tab, and uncheck the Has Exit Time
option, then go to Settings
uncheck the Fixed Duration
option and set Transition Duration
to 0
, Done!
Here’s how to do it all:

Now let’s go to the scripts to make all this happen, open up the Script Player
that we created earlier and let’s add the following variable just below the isJumping
variable that we created:
private animator anim;

Now inside the Void Start()
before the last “}” add:
anim = GetComponent<Animator>();

Now inside the Void Move() before the last “}” add:
if (Input.GetAxis("Horizontal") > 0f)
{
anim. SetBool("walk", true);
transform.eulerAngles = new Vector3(0f, 0f, 0f);
}
if (Input.GetAxis("Horizontal") < 0f)
{
anim. SetBool("walk", true);
transform.eulerAngles = new Vector3(0f, 180f, 0f);
}
if (Input.GetAxis("Horizontal") == 0f)
{
anim. SetBool("walk", false);
}

Now in the Void Jump()
below the line:
rig. AddForce(new Vector2(0f, JumpForce), ForceMode2D.Impulse);
Add:
anim. SetBool("jump", true);

Pro Fim, Na Private Void Oncollisionneer2D, Abixo De:
isJumping = false;
Add:
anim. SetBool("jump", false);

Ready! Now save the script and test your game!
The result should look something like this:

Interaction with NPCs!
(Like interacting with NPCs or objects!)
Step 1- Now that we have all our player animations ready, let’s start the +18 part of the project! To do this we will make our first objective, we will create an interaction of the player with a girl by pressing the key (E
) and we will have a sex scene with her!
To do this the first thing we need to do is add the girl to our scenario, for this go to the Project
tab, and in the Characters folder
choose the image with the name (1
) is our first girl, drag her to the scenario, when you do this you will notice that she is not appearing (she is behind the other objects) let’s again change the order in which she is seen, in the Inspector
tab, go to Orden in Layer
and place (2
), Don’t forget to change the size of it and align it with the ground!
Let’s also add the bed as an object! To do this, go again to the Project
tab, and in the Objects
folder, drag the file (Bed
) to the stage and do the same process as you did with the girl, put the Orden in Layer
on (1
) so that it is behind her.
Here’s how it’s done:

Ready! We have our first girl in the game, but we need to now create the player interaction with her, let’s add a collider to her so that we can define when we’re going to touch her and start our interaction.
In the Hierarchy tab
, click on the girl (1
) and go to the Inspector tab
and Add Component
, look for and add a 2D Box Collider
, Once this is done we have a collision on our girl, in the 2D Box Collider
that you just added, check the Is Trigger option
, this will make sure that our player is not blocked by the girl!
It will look like this:

Step 2- Now let’s make it so that when touching the girl, a warning key (E key) appears and we can also start our interaction (Sex scene).
Go to the Project
tab, and in our Scripts folder
create a new Script
called FirstGirl
, click and drag the newly created Script to our girl in the Hierarchy
tab to add it to her! Let’s now work on the Script that will command everything that will happen in the interaction! Open the FirstGirl Script
, you’ll see this:

Underneath the first ({) Add:
public GameObject iconE;
This will be our variable that will hold the object that will represent our AND key, it will look like this:

Now on top of the last (}) of the Script add:
void OnTriggerEnter2D(Collider2D collision)
{
if (collision.gameObject.layer == LayerMask.NameToLayer("Player"))
{
iconE.SetActive(true);
}
}
void OnTriggerExit2D(Collider2D collision)
{
if (collision.gameObject.layer == LayerMask.NameToLayer("Player"))
{
iconE.SetActive(false);
}
}
These are the two functions that we will use, the first for when there is a collision between the two objects, and the second for when the collision is broken
It will look like this:

Save the Script and let’s go back to Unity!
First let’s set our main Character as Player, let’s add a tag to him so that he is recognized in the game, go to the Hierarchy
tab and click on our Player
, then go to the Inspector tab
and in Layer
click on Default
, then on Add Layer...
Choose an empty field and put the name of Player,
then go back to the Hierarchy
tab and click on the Player again, and in the Inspector tab select the Layer Player!
Here’s an example:

Now let’s add the representation of the E
button on our girl, in the Project
tab, go to the Objects folder
and click and drag the object (E
) to the stage, position the object on top of the girl’s head (don’t forget to change the Orden in Layer
of it to (3), it will look like this:

We don’t need this E
button popping up all the time, so let’s disable it for now, go to the Hierarchy
tab and click on the E
button, then on the Inspector tab,
just uncheck the option next to your name, it will be invisible in the scenario! Here’s what it should look like:

Now let’s go back to the Hierarchy tab
and click on the girl (1
) See that in the Inspector
tab, where our script is (FirstGirl
) the E Icon
is like: None (Game Object)
we need to add the game object (E
) in this region, just go to the Hierarchy tab
, click and drag the (E
) for that region, After testing the game, an indicator (E
) should now appear every time you touch the girl!
Here’s an example:

Step 3- Let’s now create the sexual animation between our player and our girl, for this go to the Project
tab, then go to Animations
and search for the Girl 1 Handjob animation
, this animation will have 21 Frames
, select all and drag it to the scenario, automatically Unity will ask you to save the animation, save it in the Animations folder
with the name FirstGirl_Handjob
, now as we learned earlier, position the animation in the place where the girl is and change the Order in Layer
to 2
this will make her visible!
Then we’re going to make our sex animation invisible, so that it only appears when the player interacts with the girl, Click on our new animation and go to the Inspector
tab, and disable the option next to the name as we did earlier!
Here’s an example:

Once this is done, we just need to create the conditions in the Script so that some things are active and others are disabled, let’s go! Open the FirstGirl
Script, after the iconE
variable, add:
private bool isCollision;
public GameObject player;
public GameObject girl;
public GameObject bed;
public GameObject handjobAnim;

After the first ({) of the void Update()
, add:
if (Input.GetKeyDown("e") && isCollision)
{
player.SetActive(false);
girl.SetActive(false);
bed.SetActive(false);
handjobAnim.SetActive(true);
}

In the void OnTriggerEnter2D
, before iconE.SetActive(true);
Add:
isCollision = true;
In the void OnTriggerExit2D
, before iconE.SetActive(false);
Add:
isCollision = false;
Salve o Script
Now go to the Hierarchy tab, and click on our girl (1
) in the Inspector tab, notice that the First Girl
script is missing add the objects to the variables Player
, Girl
, Bed
and Handjob Anim
Add the Objects according to what you ask,
Here’s an example:

you can already test the game, now when you press the E key while you are next to the girl the sex scene will begin!
But now we have an infinite sexual looping, let’s now create a condition for the animation to end and the player to move again, for this create a Script called FirstGirlEND
, and open it.
Below the first ({
) Add:
public GameObject player;public GameObject handjobAnim;
In void Start()
after the first ({
) Add:
StartCoroutine(endAnimation());
Now before the last (}
) Add:
IEnumerator endAnimation()
{
yield return new WaitForSeconds(10f);
player. SetActive(true);
handjobAnim.SetActive(false);
}
The Script will look like this:

Almost there! Now save your Script and let’s go back to Unity, Click and drag the FirstGirlEND script
into the animation (Girl 1 Handjob0001
) we created in the Hierarchy menu
.
Now we need to add the Objects to the animation (Girl 1 Handjob0001
) as well, do the same process we did before and you’re done! Just try it now!
It should look like this:

Creating a scoring system!
(Working with UI and goals!)
To be continued..
Check out the How to make an adult game part 2 here.
LINKS: