Code Your First Game: Arcade Classic in JavaScript on Canvas (Udemy)

Code Your First Game: Arcade Classic in JavaScript on Canvas (Udemy)

Program a complete game today. No special software or install required. All you need is a text editor and a web browser. At the end of this short course you'll have programmed your first game. You'll learn gameplay development fundamentals by really doing it – writing and running real code on your own machine.

Class Deals by MOOC List - Click here and see Udemy's Active Discounts, Deals, and Promo Codes.

What you'll learn

  • Display, position, and move filled shapes for retro and prototype gameplay
  • Move a ball around your game space such that it bounces off boundaries
  • Handle real-time mouse input
  • Detect and respond to simple collisions
  • Program very basic artificial intelligence
  • Keep and display score during play
  • Understand the subtle, key difference between a classic game in this style which is fun to play versus one that isn't
  • Define and code a win condition and end state for your game

Each step of the course has the source code attached exactly as it should look at that time (click "View Resources" then "Downloadable Resources"), for you to compare to or pick up from, so you can't get stuck!
Begin Your Game Programming Journey the Proven Way
"Make the simplest game possible." "Program a ball and paddle project." "Practice by first remaking something from the 1970's." All beginning developers hear this advice from more experienced peers... because it works!
By following this approach you will:

  • Learn design from a fun classic that people know and enjoy.
  • Start your practice today – now! – without waiting for an idea.
  • Finish your game in hours or in a weekend, not over months.
  • Understand every line of code used in the entire program.
  • Avoid distraction from searching for or creating detailed art.
  • Master fundamentals needed to make your own games better.
  • You can program this game with a normal text editor, and run it in the web browser you already have. No special software is needed.

Though you'll be coding in JavaScript for HTML5 canvas in this course, the focus is on common game programming concepts. You can later apply these same patterns to get quick results in other programming languages such as C#, Java, ActionScript 3, C++, or Python.
I'm a private game development trainer, and for clients new to gameplay programming this is exactly the material that I cover to get them started quickly. Within hours you will have finished programming your first project. This is the fastest way to get results. The momentum gained from doing this provides a solid foundation to give more advanced concepts meaning and context as you continue on in your journey of learning game development.

Who this course is for:

  • This is for anyone who wants a quick but thorough introduction to simple game programming in a way that doesn't require any special software, download, or installation
  • If you've had at least a little exposure to generic programming concepts like variables, functions, and if-statements you'll have an advantage, however in case you've never heard those terms they're explained briefly as they come up
  • Although this a uses JavaScript and HTML5, it is not intended for someone who is focused on learning HTML5/JS for web page design

Requirements

  • Very early on students will need to show file extensions in their operating system (explained briefly in the video)
  • If a plain text editor is available that has programming features like line numbers and auto-indent (ex. Notepad++ on PC, TextWrangler on Mac) that may be handy but is not necessary, as a generic text editor like Notepad or TextEdit will work fine for a program of this size
Go to Class
MOOC List is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Related Courses

GPT Vision: Seeing the World through Generative AI (Coursera) Coursera
Vanderbilt University

GPT Vision: Seeing the World through Generative AI (Coursera)

Imagine a world where your photos don't just capture memories, but also become intelligent assistants, helping you navigate and manage daily tasks. Welcome to "GPT Vision: Seeing the World Through Generative AI", a course designed to revolutionize how you interact with the world around you through the lens of Generative AI and photos.

Oct 5th 2026
2 Weeks
Leveraging AI for Enhanced Content Creation (Coursera) Coursera
Coursera Instructor Network

Leveraging AI for Enhanced Content Creation (Coursera)

This course provides a foundation to assess, and apply, a series of Generative Artificial Intelligence (AI) tools, such as ChatGPT, Bing Chat, Google Bard, Midjourney, Runway, and Eleven Labs. This learning opportunity offers a hands-on experience through ideating, creating, and finalizing a mock advertising campaign using the combined strengths of these AI tools.

Oct 5th 2026
1 Week
Deep Learning Prerequisites: The Numpy Stack in Python V2 (Udemy) Udemy
Lazy Programmer Inc.

Deep Learning Prerequisites: The Numpy Stack in Python V2 (Udemy)

Welcome! This is Deep Learning, Machine Learning, and Data Science Prerequisites: The Numpy Stack in Python (V2). The reason I made this course is because there is a huge gap for many students between machine learning "theory" and writing actual code. As I've always said: "If you can't implement it, then you don't understand it". Without basic knowledge of data manipulation, vectors, and matrices, students are not able to put their great ideas into working form, on a computer.

Self Paced
Self-Paced
New Technologies for Business Leaders (Coursera) Coursera
Rutgers University

New Technologies for Business Leaders (Coursera)

This introductory course is developed for high-level business people (and those on their way) who want a broad understanding of new Information Technologies and understand their potential for business functions (e.g. marketing, supply change management, finance). This is not a course for people looking for guidance on how to become a deep technical expert or implement these technologies.

Sep 28th 2026
5-12 Weeks
Business Implications of AI: Full course (Coursera) Coursera
EIT Digital

Business Implications of AI: Full course (Coursera)

In this course you will learn what Artificial Intelligence is, from a leaders point of view. How shall we, as leaders, understand it from a corporate strategy point of view? What is it and how can it be used? What are the crucial strategic decisions we have to make, and how to make them? What consequences can we expect if we decide on doing AI-projects and what kind of competences do we need? Where shall we start, and what could be a good second as well as third step? What implications for the organization can we expect? These are the questions answered in this course.

Oct 5th 2026
4 Weeks
Build LLM Apps with LangChain.js (Coursera) Coursera
DeepLearning.AI

Build LLM Apps with LangChain.js (Coursera)

JavaScript is the world’s most popular programming language, and now developers can program in JavaScript to build powerful LLM apps. This course will show webdevs how to expand their toolkits with LangChain.js, a popular JavaScript framework for building with LLMs, and will cover useful concepts for creating powerful, context-aware applications.

Oct 5th 2026
1 Week
Introduction to Generative AI Studio (Coursera) Coursera
Google Cloud

Introduction to Generative AI Studio (Coursera)

This course introduces Generative AI Studio, a product on Vertex AI, that helps you prototype and customize generative AI models so you can use their capabilities in your applications. In this course, you learn what Generative AI Studio is, its features and options, and how to use it by walking through demos of the product. In the end, you will have a quiz to test your knowledge.

Sep 28th 2026
1 Week
Math for AI beginner part 1 Linear Algebra (Coursera) Coursera
Korea Advanced Institute of Science and Technology - KAIST

Math for AI beginner part 1 Linear Algebra (Coursera)

'Learn concept of AI such as machine learning, deep-learning, support vector machine which is related to linear algebra. Learn how to use linear algebra for AI algorithm. After completing this course, you are able to understand AI algorithm and basics of linear algebra for AI applications.

Sep 28th 2026
5-12 Weeks
Build AI Apps with ChatGPT, Dall-E, and GPT-4 (Coursera) Coursera
Scrimba

Build AI Apps with ChatGPT, Dall-E, and GPT-4 (Coursera)

By the end of this course, you'll know how to use the OpenAI API to add mind-blowing AI features to your apps. You will learn how to use the Dall-E, GPT-4, and ChatGPT APIs, and get the expertise to fine-tune a model with your own data. In the first project, MoviePitch, you will get a primer on the OpenAI API and harness the power of artificial intelligence to generate ideas and images.

Oct 5th 2026
3 Weeks
Frontiers in Dentistry (Coursera) Coursera
University of Pennsylvania

Frontiers in Dentistry (Coursera)

In this course, Frontiers in Dentistry, you will be able to explore some of the latest advances in the field of dental medicine. The innovations in therapeutic techniques as well as our understanding of the biomedical sciences have been made possible by our research enterprise which integrates the latest emerging technology along with interdisciplinary collaborations.

Sep 28th 2026
5-12 Weeks
Legal Tech and the Digital Transformation of Law (Coursera) Coursera
Universidad Austral

Legal Tech and the Digital Transformation of Law (Coursera)

The digital revolution changed the way we communicate and trade. Now, it is coming into the world of law. This program will give you a broad overview of the main trends that are affecting the legal industry: the birth of the legal tech market and the application of technology in law; the role of artificial intelligence in the automation of the work of lawyers; blockchain technology and its impact on the way we sign and execute contracts; initiatives to ensure access to justice through virtual courts and robot judges.

Oct 5th 2026
5-12 Weeks