
Explore grid based games by building menus, local multiplayer, and a custom AI. Learn JavaScript in a beginner friendly class with animated visuals, a code editor, and a web browser.
Build a four-player snake arena in JavaScript with a responsive grid and fullscreen. Support one-player vs three AI or two-player play, with skins, custom names, and three AI difficulty options.
Set up a grid based JavaScript game project by creating index.html, styles.css, and script.js, and initialize a canvas with a 2d context after the page fully loads.
Build a responsive canvas game with an object-oriented game class, render on a full-screen canvas, handle window resize, and use arrow functions to preserve this context.
This lecture explains a canvas-based game loop where a game class renders shapes, and shows animation with requestAnimationFrame, resize handling, and redraws at 60 frames per second.
Instantiate a snake as a playable character in a grid-based JavaScript battle arena, enabling user and computer control and drawing each character as a rectangle.
Use nested for loops to build a grid on the canvas, mapping rows and columns with x and y coordinates and cell size (50 by 50) to draw each cell.
Create a fully responsive grid by recalculating columns and rows on resize, with automatic resize at load, trimming edges to cell-size increments using the remainder operator and center the canvas.
Explains building a grid based snake game with cell sized movement, using requestAnimationFrame, delta time, and a periodic 200 ms update to control fps and smooth animation.
Create a grid-based JavaScript snake battle arena with player and computer snakes by extending a base snake class, wiring keyboard arrow controls, and enforcing wall boundaries via a moving state.
Extend a snake game with keyboard controls for a second player using wsad and arrows, grid-based starting positions, and multi-player object management.
Explore grid-based gameplay in JavaScript by extending a snake superclass to create AI controlled players, implementing update loops, turn timers, and simple random movement to simulate intelligent behavior.
Create a grid-based snake game in JavaScript by adding a food class that spawns on the grid, resets after being eaten, and draws as a white square using cell size.
Render dynamic player scores on an HTML canvas via fillText with an anchor point and left and top alignment, drawing text after game objects to sit on top.
Create multi segmented snakes with a segments array of x and y coordinates and a dot length that grows when food is eaten, using unshift and pop as they move.
Describe movement rules for grid snakes, including moving through bodies and preventing turning back on a spot, with velocity-based turning and a ready-to-turn flag restricting turns per animation frame.
Create a controls panel div and a wrapper for three buttons - start, debug, and fullscreen - centered on the page with absolute positioning; buttons are 65px wide, black with white text.
Create a two-column game user interface scoreboard showing four players' scores with dynamic names, using a dedicated user interface class and an update method called each frame.
Design the game UI for grid-based JavaScript games by configuring a gamer menu to rename players, choose control schemes, select snake graphics, and display status messages.
Tile the tileable background for a grid-based JavaScript game, reserving the top two rows for environmental art and the scoreboard, then lay a forest margin image across the width.
Reserve the top two rows for background artwork and menus, preventing snakes from entering that area. Confine food to the playable area and control state with a game over flag.
Learn to implement start and restart screens for a grid-based JavaScript snake game, handling resize, reset of snakes and food, game over logic, and dynamic UI states.
Explore tweaks to a grid-based JavaScript snake game that prevent wall turns and self-crossing by refining boundary checks and turn rules.
Learn how to wire up player control menus in a grid-based JavaScript game by linking dropdowns to keyboard and AI players, initializing players on start, and syncing name inputs.
Toggle full screen with the built-in full screen API in vanilla JavaScript using a simple if-else method in the main game class, triggered by the button and a keyboard shortcut.
Toggle debug mode with the plus key or the debug button to reveal helper shapes, hitboxes, and the game grid, controlled by the main game's debug property.
Scale the grid by resizing cells and updating art assets for a sharp, seamless background, and draw the magic berry within each cell using canvas drawImage.
Turn snakes into animated creatures by cropping directional sprite frames from a sheet, drawing each segment with drawimage, and computing head, body, and tail frames for clockwise and counterclockwise turns.
Animate a two-cell-tall mushroom from a sprite sheet by cropping frames with drawImage, managing frame x and max frame, and aligning a hitbox for eating in a top-down sideways view.
Create dynamic win and lose messages in a grid-based JavaScript game by updating on game over using winner and score data, controlling start/restart flow and user interface text properties.
Animate snake mouths in a grid-based game by using directional head sprites and open-mouth frames when food nears. Customize assets, names, and reuse sprite sheets for consistent animation.
Showcases a grid-based snake game with edible and non-edible foods. Trigger non-edible collisions that cost score and shorten the snake, while frame y crops and randomizes food on reset.
Explore creating a character choice UI with multiple dropdowns to select spritesheets and image references for four players, wiring dropdown values to image elements using getElementById.
Implement smarter ai for computer snakes in a grid-based game with a three-option difficulty dropdown, prioritizing food and preselecting default sprites for players while allowing manual changes.
Implement a delta time timer that accumulates milliseconds during play, formats the value to seconds with one decimal using the format timer helper, and shows the game time on win.
Use an object pool of particles to produce performance-friendly bursts when the snake eats food, with color variations, start and reset methods, and two layered canvases for smooth rendering.
Design and implement a robust sound system for a grid-based JavaScript game by loading assets, using a custom play method, and mapping bite, food, start, and win sounds to events.
Add multiple snakes as selectable characters by importing assets into assets/images, wiring them to sprite sheets in index.html, and setting default dropdown options for four players.
Bring your game ideas to life with animated characters, interactive environments, and engaging gameplay mechanics. With JavaScript as your tool, you'll have the power to design and code games that are fun to play and nice to look at.
2D grid-based games have been a staple in the world of gaming for decades. From classics like Pac-Man to modern hits like Stardew Valley, these games have captured the hearts of players worldwide. Let me give you the basic tools and building blocks and by the end of this course you will be able to tap into a rich history of game development and unlock endless possibilities by making your own creative ideas come to life.
Unleash your creativity with JavaScript and 2D animation! Elevate your web projects with interactive animations that captivate your audience. Learn how to bring your designs to life and stand out in the digital realm. Mastering JavaScript and 2D animation opens doors to endless possibilities in web development and design. Join us on a journey of innovation and visual storytelling - let your imagination take flight!
Today we will build animated fantasy game and we will discover how to:
- create a responsive game grid
- create player-controlled and computer-controlled characters
- implement many fundamental 2D game development techniques such as 2D grids, player inputs, sprite animation
... and much more
Have fun!