Understanding Roblox and Luau
In this section, we will start by looking at what Roblox is and what makes it unique. Then, once we understand the fundamentals of Roblox, we will learn about the programming language that Roblox uses for its games.
Roblox is a really popular platform for children around the world. This is because they can play almost anything they want. With over 24 million different experiences, as Roblox likes to call their games, you can be almost anything. You can become a pirate, be the king of a castle, escape prison, or stop players from escaping. The possibilities are endless. And the best part is that it is completely free to play. According to Roblox, in September 2021, 47 million unique users played Roblox daily. Once you have created your account in a few clicks, you are ready to join an almost unlimited and constantly increasing supply of experiences.
Creating an account
To make an account on Roblox, visit this link:
https://www.roblox.com/signup
Roblox is unique because other players make all these experiences that you can join. Anyone that creates a Roblox account can create a game. Besides Roblox Player, which allows you to join experiences, there is an additional application called Roblox Studio. With it, you can create your very own experiences.
At the time of writing this book, there are over 9.5 million developers on the platform. These developers can unleash their creativity and make anything they want. Roblox also takes care of all the complex and technical tasks involved in hosting and maintaining games. All you have to focus on is creating the game. Roblox takes care of the rest. The platform ensures that your game shows up for your friends, and makes sure that you and your friends can join the game. They make sure that you can report people who misbehave and bans them from the platform. These systems, among many more, are provided by Roblox. If you make games using other game engines, these systems all have to be made and operated by you. This is pricey and very time-consuming.
However, this is not even the best thing that Roblox has to offer. You are also able to monetize the experiences! Roblox has a virtual currency called Robux. Players can purchase this with real-life money. When they convert their money into Robux, they can use it throughout the entire site to buy different things. This varies from purchasing clothing for your avatar to purchasing in-game perks for any game you like. When someone purchases something in your game, you get 70% of the sale. You can convert this earned Robux currency back to real-life money. This is called the Developer Exchange program. Some developers on the platform make over 1 million USD yearly!
Most of the time, these developers do not work alone. There is usually an entire team of developers that work on a game. These developers have different roles. The most common developers on a team are programmers and builders. However, other developer roles can be added if teams start to grow. In addition, other developer roles exist, such as animators, modelers, UI designers, music composers, and possibly even more. As previously stated, this book is about the programming aspect of Roblox. So, let us learn more about the programming language that is used to code Roblox experiences.
Introducing Luau
Roblox uses a programming language named Luau. Luau is an easy-to-learn yet powerful programming language. Luau is a heavily modified version of the programming language called Lua.
Because Roblox Luau has a relatively low learning curve compared to other programming languages, it is an ideal programming language to start with, especially for younger developers or aspiring developers. Even if you have no interest in creating experiences on Roblox, this is still a great starting point. In general, programming in any language teaches you how to think logically. This is useful even when you are not programming. By the end of this book, you will be able to analyze coding problems, split them into smaller tasks, and overcome them.
If you are hoping to program in other languages in the future, this is an excellent place to start. You might argue that if you know how to program in one programming language, you can program in all of them. This is because programming is basically instructing a computer on what to do. When nothing is specified, the computer does nothing. The only real difference between most programming languages is syntax. The syntax is basically what words you type in your script. Most programming languages use the same words. However, the syntax may differ.
Becoming a master in Roblox game development gives you a head start when programming in other languages. Regardless, before switching to another language, you first have to master Luau. It takes a lot of practice to understand everything in this programming language fully. This will most certainly be very stressful and confusing. Therefore, this book slowly progresses in complexity. A basic understanding of Roblox is highly recommended.
Roblox is a unique platform where people can play millions of experiences for free. The amazing thing about these experiences is that other users on the platform make them. There are a lot of different roles that you can have as a developer on the platform. You can be a modeler, animator, graphics artist, and even a programmer.
In the next section, we make our very first Luau script.