1. Overview¶
Learning Objectives
- understand the prerequisites
- understand how the key concepts of game development are interrelated
What is this website about?¶
RBX2030 is designed for programmers who are able to solve simple algorithmic problems with common constructs like loops, conditions, and functions. While introductory courses such as NUS's CS1010 satisfy this requirement, students tend to write only short single-file programs alone before moving on to the next problem and never going back to their old code.
Game development consists of large, complicated codebases maintained by many different developers who may not even communicate but nonetheless have their code used by others. We need to develop skills of writing code in a maintainable and organised way while still maintaining speed and correctness.
Quote
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. Code for readability."
John Woods.
What is this website not about?¶
RBX2030 is not about Lua programming. We will not comprehensively cover Lua syntax and features, except those relevant and useful for game development. In fact, we will avoid and even ban usage of using certain Lua features (such as eval
) for safety purposes even though they may be useful elsewhere.
Similarly, this website is not about software development. Software engineering is a broad discipline on its own and deserves another module. Still, we will go over many concepts such as OOP, Networking, Databases and Security, which may be useful for software develoment. But we will not comprehensively cover any specific topic.
Finally, this RBX2030 does not focus on efficiency. Efficiency is important and is expected in all the code written. However, there are too many different optimization problems in game development to cover within a single website. In striving for maintainability, we may even have to sacrifice some computation efficiency when performance is relatively unimportant.
Quote
"Fancy algorithms are slow when n is small, and n is usually small. Fancy algorithms have big constants. Until you know that n is frequently going to be big, don't get fancy."
Rob Pike.
Why Roblox?¶
Roblox is a game development platform which lets us write code in a relatively simple language (Lua) with relatively simple libraries and tooling (Roblox Standard Library and Studio) to write very real game experiences. It is very beginner friendly and there is not a big learning curve before we are able to produce fun experiences.
While Roblox is definitely not as performant or Unity or Unreal, with good code, we can still write performant code. Most issues with Roblox games stem from bad code rather than the bad engine, and we can still use many tricks to overcome the flaws of few flaws of the engine.
Why Lua?¶
Lua, meaning "moon" in Portuguese, is a lightweight, high-level, interpreted scripting language created in 1993 in Brazil. Lua was initially developed to provide flexibility in applications, particularly for configuration and extension. Its small footprint and portability have made it popular in game development, where it is often embedded as a scripting engine.
While the Roblox Engine is built primarily in C++, the Lua scripting interface allows us to call performant engine code and ultimately create performant game experiences through a relatively simple programming language.