What is ASCII, ANSI and Unicode

Let's understand character encodings! These are the foundation for how computers represent text and symbols.

  1. ASCII: 7 bits → 128 characters
    • English letters, digits, punctuation, control codes
  2. ANSI: 8 bits → 256 characters
    • Keeps ASCII the same, adds accented letters, symbols, box-drawing
  3. Unicode: covers all scripts and symbols worldwide
    • Defines over 1.1 million possible characters (code points)
    • Common encoding is UTF-8:
      • ASCII stays 1 byte (unchanged)
      • Other characters take 2-4 bytes

Key insight: With Unicode you can freely mix text, symbols, and emojis in one program.

What are ANSI ESCAPE Codes

Let's discover ANSI escape codes! These special character sequences give us powerful control over the terminal.

  1. ANSI escape codes are special sequences that control the terminal (not just print text)
  2. Think of them as a mini "protocol" sent inside text:
    • Change colors
    • Move the cursor
    • Clear the screen
    • And much more!
  3. We'll explore this concept of text plus control information throughout the tutorial

Key insight: ANSI codes let us create dynamic, interactive terminal applications.

What is the Snake Game

Let's explore the classic Snake game! This simple yet addictive game will be our programming project.

  1. Snake is a classic arcade game first seen in 1976, made world-famous by Nokia phones in the late 1990s
  2. The gameplay is elegantly simple:
    • You guide a snake around the screen
    • The snake grows longer each time it eats food
    • Score increases with each food item consumed
  3. The challenge: the snake must not collide with the walls or with itself

Key insight: Simple rules create engaging gameplay - perfect for learning programming fundamentals.

What is Ada

Let's meet Ada! This powerful programming language will be our tool for building the Snake game.

  1. Ada is a systems programming language designed for high-integrity engineering:
    • Used in airplanes, rockets, and nuclear power plants
    • Built for mission-critical applications
  2. Ada is strongly typed with one of the most advanced type systems among imperative languages:
    • Catches errors at compile time
    • Prevents many common programming mistakes
  3. Ada prioritizes reliability, safety, and maintainability above all else:
    • Code that works correctly from the start
    • Easy to understand and modify later

Key insight: Ada's strict rules help us write better, more reliable code - perfect for learning good programming habits.

What is Alire

Let's discover Alire! This essential tool will help us manage our Ada projects efficiently.

  1. Alire is the Ada package manager, like pip for Python or cargo for Rust
  2. Alire simplifies project management:
    • Fetch libraries automatically
    • Manage dependencies
    • Build Ada projects with ease
  3. We'll use Alire throughout this tutorial to create and build our Snake game

Key insight: Alire handles the complex build process, letting us focus on writing great Ada code.

Level up your Server Side game — Join 15,000 engineers who receive insightful learning materials straight to their inbox