Game Programming A. Avinash, Ph.D., Assistant Professor School of Computer Science and Engineering (SCOPE) Vellore Institute of Technology (VIT), Chennai
Game Design & Management Core Elements of Game Design Concept Development: Idea Generation: Brainstorming and coming up with innovative game ideas. Research: Studying existing games, market trends, and player preferences. Documentation: Creating a game design document (GDD) that outlines the game's vision, features, and mechanics. Gameplay Mechanics: Rules: Defining the rules and objectives of the game. Systems: Designing the systems that govern gameplay, such as combat, inventory, and progression systems. Balancing: Ensuring that the game is fair, challenging, and engaging for players .
Game Design & Management Story and Characters: Narrative: Crafting the game's storyline, including plot, setting, and themes. Character Design: Creating compelling and relatable characters, both protagonists and antagonists. World-Building: Developing the game world, including its history, lore, and environment. Level Design: Layout: Designing the levels or stages of the game, including their structure and flow. Challenges: Placing obstacles, enemies, and puzzles in a way that provides a balanced challenge. Aesthetics: Ensuring that the levels are visually appealing and immersive .
Game Design & Management User Experience (UX) and Interface: Controls: Designing intuitive and responsive control schemes. Interface: Creating menus, HUDs (heads-up displays), and other interfaces that are easy to navigate. Feedback: Providing feedback to players through sound, visuals, and haptic feedback. Prototyping and Testing: Prototyping: Building early versions of the game to test core mechanics and concepts. Playtesting: Conducting playtests with target audiences to gather feedback and identify issues. Iteration: Refining and improving the game based on playtest feedback. Art and Audio: Visual Design: Developing the game's art style, including character models, environments, and animations. Sound Design: Creating sound effects, music, and voice acting that enhance the game's atmosphere and experience.
Game Design & Management Tools and Software Game Engines: Unity, Unreal Engine, Godot. Art and Animation: Adobe Photoshop, Blender, Maya. Audio: Audacity, FMOD, Wwise . Project Management: Trello, Asana, Jira .
Differing game types Games come in a wide variety of types, each with its unique mechanics, goals, and player experiences. Common game types and their key characteristics: 1. Action Games Subgenres: Platformers: Games where players navigate a character through a series of levels by jumping, running, and climbing (e.g., Super Mario Bros. , Celeste ). Shooters: Games focused on shooting enemies, often with a variety of weapons (e.g., Call of Duty , Doom ). Fighting Games: Games where players control characters to fight against opponents, typically in one-on-one combat (e.g., Street Fighter , Mortal Kombat ). Characteristics: Fast-paced gameplay, reflex-based challenges, and a focus on physical skills .
Differing game types 2 . Adventure Games Games with a focus on storytelling and puzzle-solving (e.g., Monkey Island , Grim Fandango ). Characteristics : Emphasis on exploration, puzzle-solving, and narrative. 3. Strategy Games Subgenres: Turn-Based Strategy (TBS): Games where players take turns to make strategic decisions (e.g., Civilization , XCOM ). Tower Defense: Games where players build defenses to protect against waves of enemies (e.g., Plants vs. Zombies , Kingdom Rush ). Characteristics: Focus on planning, resource management, and tactical decision-making .
Differing game types 4. Puzzle Games Subgenres: Logic Puzzles: Games that challenge players' reasoning and problem-solving skills (e.g., Tetris , Sudoku ). Physics Puzzles: Games that require players to manipulate objects and use physics to solve puzzles (e.g., Angry Birds , Portal ). Characteristics : Cognitive challenges, often with a focus on pattern recognition and spatial reasoning .
Differing game types 5. Sports and Racing Games Subgenres: Sports Simulation: Games that replicate real-world sports (e.g., FIFA , NBA 2K ). Racing Simulation: Games focused on realistic driving experiences (e.g., Gran Turismo , Forza Motorsport ). Arcade Racing: Games with more casual, fast-paced racing (e.g., Mario Kart , Burnout ). Characteristics: Competitive gameplay, often emphasizing skill and strategy in a specific sport or racing scenario .
Differing game types 6. Horror Games Subgenres: Survival Horror: Games where players must survive against threats with limited resources (e.g., Resident Evil , Silent Hill ). Action Horror: Games that blend horror elements with action gameplay (e.g., Dead Space , The Evil Within ). Characteristics: Emphasis on creating fear and tension, often with a strong narrative component .
Differing game types 7. Casual Game - Match-3 : Games where players match items in groups of three or more (e.g., Candy Crush Saga , Bejeweled ). Characteristics : Easy to learn, quick to play, and accessible to a wide audience. 8. Educational Game - Serious Games: Games designed for training and educational purposes (e.g., flight simulators for pilot training, medical simulation games for healthcare professionals). Characteristics: Focus on learning objectives, often with interactive and engaging content to teach specific skills or knowledge.
Game modes Game modes and perspectives significantly impact the player's experience and gameplay style. Various modes and perspectives commonly found in games: Game Modes Single-Player: Story Mode/Campaign: The main mode focusing on the narrative and character progression. Sandbox/Free Roam: Players can explore the game world without specific objectives. Challenges/Levels: Discrete levels or challenges with specific goals . Multiplayer: Local Multiplayer: Players share the same device or screen (e.g., split-screen). Online Multiplayer: Players connect over the internet to play together or against each other. Co-op: Players work together to achieve common goals. Competitive: Players compete against each other, either individually or in teams.
Game modes Modes Based on Gameplay Mechanics: Survival: Players must survive as long as possible against waves of enemies or other challenges. Time Attack: Players complete levels or objectives as quickly as possible. Endless/Infinite: The game continues indefinitely, with increasing difficulty or new challenges over time. Puzzle/Logic: Focuses on solving puzzles or logical challenges . Modes Based on Rulesets: Hardcore/ Permadeath : Players have only one life, and dying means starting over from the beginning. Casual: Easier difficulty and more relaxed gameplay mechanics. Role-Playing: Players assume roles of characters and make choices that affect the game's outcome.
Perspectives ( how the player views the game world ) First-Person Perspective (FPP): The camera is positioned as if the player is looking through the eyes of the character. Common in shooters and immersive simulations (e.g., Call of Duty , Skyrim ). Third-Person Perspective (TPP): The camera is positioned behind and slightly above the character, allowing the player to see their character and the surrounding environment. Common in action-adventure and platformers (e.g., Uncharted , Assassin's Creed ). Top-Down Perspective: The camera is positioned above the game world, looking down at the action. Common in strategy games and some RPGs (e.g., Diablo , StarCraft ).
P erspectives Isometric Perspective: A type of top-down view where the camera is tilted to give a 3D appearance on a 2D plane. Common in strategy games and classic RPGs (e.g., Civilization , Baldur's Gate ). Side-Scrolling Perspective: The camera moves left to right (or vice versa) as the player progresses through the level. Common in platformers and beat ' em ups (e.g., Super Mario Bros. , Castlevania ). 2.5D Perspective: Combines 2D and 3D elements, where gameplay is on a 2D plane but with 3D graphics. Common in modern platformers and action games (e.g., LittleBigPlanet , Ori and the Blind Forest ).
P erspectives Virtual Reality (VR): Players experience the game world through VR headsets, providing an immersive first-person perspective. Common in VR-specific games (e.g., Beat Saber , Half-Life: Alyx ). Augmented Reality (AR): Combines digital game elements with the real world, often through mobile devices. Common in mobile games (e.g., Pokémon GO , Ingress ). Combining Modes and Perspectives Game designers often mix different modes and perspectives to create unique experiences . A game might have a single-player campaign in a third-person perspective and a competitive multiplayer mode in the first-person perspective. Sandbox games might offer both single-player and multiplayer modes, allowing players to explore and build in either context. Some games switch perspectives for different gameplay elements, such as a first-person view for exploration and a third-person view for combat.
Scripting Common scripting languages used in game development include: Lua : Lightweight, easy to embed, and commonly used in game engines like Unity (via plugins), CryEngine , and others. Ideal for defining game logic, AI behavior, and game events. Python: Known for its readability and simplicity. Often used in game development tools and engines like Panda3D and Blender. JavaScript: Widely used for web-based games and in engines like Unity (with UnityScript ) and Godot. Great for handling web technologies and browser-based game interactions .
Scripting Common scripting languages used in game development include : C#: The primary language for scripting in Unity. Used for writing game logic, controls, and other game-related functionalities. UnrealScript /Blueprints: UnrealScript was the original scripting language for Unreal Engine, now largely replaced by Blueprints, a visual scripting system. Blueprints are powerful and allow designers to create complex game mechanics without writing code. GDScript : The primary scripting language for Godot Engine. Designed to be easy to learn and use, with a syntax similar to Python.
Scripting in Game Engines Unity: Uses C# for scripting. Scripts are typically used to control game objects, handle user input, manage game states, and implement gameplay mechanics . using UnityEngine ; public class PlayerController : MonoBehaviour // allow the script to be attached to game objects and interact with Unity's engine. { public float speed = 10.0f ; // control the movement speed of the player character void Update() // called once per frame { float moveHorizontal = Input.GetAxis ("Horizontal"); float moveVertical = Input.GetAxis ("Vertical "); Vector3 movement = new Vector3( moveHorizontal , 0.0f, moveVertical ); // direction of movement based on the player's input transform.Translate (movement * speed * Time.deltaTime ); // moves the game object } }
Scripting in Game Engines Unreal Engine: Uses Blueprints for visual scripting and C++ for more advanced scripting. Scripts in Unreal are used for defining game logic, AI behavior, and handling physics . Godot: Uses GDScript , which is similar to Python . Scripts are attached to game objects and used to define their behavior.
Scripting in Game Engines extends KinematicBody2D // 2D physics and collision detection var velocity = Vector2 () func _process(delta ): // time elapsed since the last frame velocity = Vector2 () // vector to (0, 0) at the beginning of each frame if Input.is_action_pressed (" ui_right "): velocity.x += 1 if Input.is_action_pressed (" ui_left "): velocity.x -= 1 if Input.is_action_pressed (" ui_down "): velocity.y += 1 if Input.is_action_pressed (" ui_up "): velocity.y -= 1 velocity = velocity.normalized () * speed move_and_slide (velocity )