logo
How computer code like Python, Lua and C-sharp is used to create online and video games

How computer code like Python, Lua and C-sharp is used to create online and video games

Ever wondered how games like Brookhaven or Among Us hook millions of teens worldwide? Behind the laughter, suspense, and virtual worlds lies a universal language: code. But here's the twist—coding isn't about complexity. It's about breaking big ideas into tiny, clear instructions that even a computer can understand.
Game-making isn't just for tech pros - anyone can jump in, even secondary students like you! Free tools like Unity, Python with Pygame, and Roblox Studio, used in classrooms everywhere, allow players to learn coding by building their own games.
Let's check out how these work, peek at some hot games loved by many around the globe, and see how coding can turn ideas into epic adventures.
Archiving old-school video games can help preserve Hong Kong culture, says founder of local retrogaming group
Coding tells the game what to do
Coding is like telling a computer what to do, and in games, it's how you make stuff happen. Imagine code as a conversation between the creator and the game. Every line is a simple command, like teaching a friend the rules of tag. These instructions define how the game works, like how players move and interact with objects.
For instance, code might say: 'When someone touches this door, move them to the rooftop.' Another example could be: 'If players interact with an object, this teleports them to the last time they interact with it.'
In many popular games, including those made in Roblox Studio, developers use a language called Lua to write these instructions.
Another language used in games is C-sharp – this is used to create the popular game, Among Us, where players hunt for impostors.
In the game, pressing the spacebar on your keyboard triggers an emergency meeting. The game checks: 'Did the player press the spacebar? If yes, start the meeting.' These aren't cryptic formulas; they're straightforward commands. Coding, at its core, is about precision: telling the game what to do, when to do it, and how.
'Among Us' was developed using C-sharp – or C# – coding language. Photo: Shutterstock
Where can I make my own games?
Roblox Studio, Pygame and Unity are platforms where you can create your own games as long as you write precise instructions.
Unity is the platform that Among Us was built on. You can use Unity's tools to help you create games where you make the rules – for example, a thrilling treasure hunt game only ends once a player snags every coin.
Pygame uses the programming language, Python. Imagine making a mini-game where characters face off. Using Pygame, you can draw shapes – like a triangle for a battle arena. Then, upload a character image and resize it to fit your arena. Then, give the computer clear steps: tell the computer to show your character and move it with arrow keys – then you've got a battle going!
Source: PST
Developers start small, like making a character dodge obstacles. Then, they keep adjusting and improving until the game is fun to play.
When a game runs slowly, developers simplify their instructions to reduce strain on the game, or see if other adjustments are needed. For example, when Among Us glitches during a meeting, developers don't panic. Instead, they ask: 'Is the 'start meeting' command happening too soon? Let's add a delay.'
Every bug is a puzzle, and every fix sharpens both the game and the coder's skills.
Games aren't built in a day; they're crafted line by line and are fixed mistake by mistake. So grab Roblox Studio, Python or Unity, break your idea into bite-sized commands, and let the screen come alive. After all, every epic game begins with two words: 'What if …?'
At PST, we make technology education accessible and fun for learners of all ages. Our mission is to ignite a passion for technology, empowering them to confidently navigate the digital landscape.
Orange background

Try Our AI Features

Explore what Daily8 AI can do for you:

Comments

No comments yet...

Related Articles

China's super steel for nuclear fusion, new ‘Darwin Monkey' computer: 7 science highlights
China's super steel for nuclear fusion, new ‘Darwin Monkey' computer: 7 science highlights

South China Morning Post

time4 days ago

  • South China Morning Post

China's super steel for nuclear fusion, new ‘Darwin Monkey' computer: 7 science highlights

We have put together stories from our coverage on science from the past two weeks to help you stay informed. If you would like to see more of our reporting, please consider subscribing Chinese scientists have detailed how they created CHSN01 (China high-strength low-temperature steel No 1), deployed it this year in the construction of world's first fusion nuclear power generation reactor and put China in a leading position in materials science. Chinese scientists say they can create a zone of electromagnetic calm, similar to the eye of a storm at the heart of an intense signal jamming environment. Photo: Shutterstock Chinese scientists have developed an advanced electronic warfare technique that can create a zone of electromagnetic calm, similar to the eye of a storm at the heart of an intense signal jamming environment. This groundbreaking innovation could allow Chinese military forces to disable enemy communications and navigation systems while protecting their own troops and allied networks from collateral disruption. Chinese engineers have unveiled the world's first brain-like computer made up of more than 2 billion artificial neurons. The neuron count of the 'Darwin Monkey' approaches that of a macaque and could be used to advance human brain-inspired artificial intelligence (AI), according to its developers at Zhejiang University.

How fortune-telling in ancient China decided vital affairs of state, from wars to farming
How fortune-telling in ancient China decided vital affairs of state, from wars to farming

South China Morning Post

time12-07-2025

  • South China Morning Post

How fortune-telling in ancient China decided vital affairs of state, from wars to farming

Fortune-telling bars with Chinese characteristics are one of the latest fads in China. Instead of using tarot cards or crystal balls, establishments in Beijing use the traditional Chinese method of qiuqian (kau cim in Cantonese) to tell fortunes. Seekers either pull one of many numbered bamboo sticks out of a cylinder, or gently shake the cylinder until a single stick gets dislodged and falls to the table or floor. The number on the stick corresponds to a chit, on which a cryptic message is written. The psychic then interprets the message and tells their client things they desperately want to hear, or vague twaddle that could apply to anyone. Numbered bamboo sticks in cylinders like these are used in qiuqian, a traditional method of fortune-telling that is popular in China. Photo: Shutterstock

OpenAI says ChatGPT taking on Google by offering AI searches for products
OpenAI says ChatGPT taking on Google by offering AI searches for products

South China Morning Post

time29-04-2025

  • South China Morning Post

OpenAI says ChatGPT taking on Google by offering AI searches for products

OpenAI has announced that ChatGPT is now helping users find products online, enhancing its challenge to Google amid regulatory pressure on the search giant's market dominance. Advertisement The new shopping capability further blurs the line between AI chatbots and search engines, signalling OpenAI's ambition to compete with Google in a market the latter has controlled for decades. 'Search has become one of our most popular and fastest growing features, with over a billion web searches just in the past week,' the San Francisco-based company said in a post on X. The update allows shoppers to find and compare items through natural conversation, then connect directly to merchants for purchases. Google, under pressure from a US antitrust court case, is facing competition from ChatGPT, which handled a billion searches in a week. Photo: Shutterstock 'Instead of scrolling through pages of results, you can simply start a conversation,' OpenAI's post said, adding that users could also ask follow-up questions or compare products.

DOWNLOAD THE APP

Get Started Now: Download the App

Ready to dive into a world of global content with local flavor? Download Daily8 app today from your preferred app store and start exploring.
app-storeplay-store