Learn How to Code Your First Fighting Game

TLDRIn this video, Chris teaches you how to code your very first fighting game. You will learn how to create basic fighting mechanics, animate sprites, and design the game interface. Get ready to create your own game!

Key insights

:computer:Learn how to code basic fighting game mechanics with rectangles.

:art:Transform rectangles into animated sprites with custom designs.

:globe_with_meridians:Make your game ready for the web with a polished interface design.

:video_game:Understand object-oriented programming and apply it to game development.

:loop:Create an animation loop to continuously update and move game objects.

Q&A

Do I need prior programming experience to follow along?

Some programming knowledge would be helpful, but Chris provides clear explanations and code examples for beginners.

Can I use a different programming language to create the game?

The tutorial uses JavaScript, but you can apply the concepts to other programming languages with similar functionalities.

What tools or software do I need to code a fighting game?

You will need a code editor, a web browser to run the game, and basic knowledge of HTML, CSS, and JavaScript.

Can I add more features to the game?

Absolutely! Once you understand the basics, you can customize and add new mechanics to make your game more complex and engaging.

Where can I find the complete code for the game?

Chris provides a link to the GitHub repository in the video description where you can find the complete code and resources.

Timestamped Summary

00:00Introduction: Chris introduces the video and explains the goal of coding a fighting game.

02:18Project Setup: Chris sets up the project folders and files, including index.html and index.js.

08:42Creating Player and Enemy: Chris creates a Sprite class and instantiates player and enemy objects.

13:38Animating Sprites: Chris adds a draw method to the Sprite class and animates the player and enemy objects.

17:57Adding Velocity: Chris adds velocity and gravity properties to the Sprite class to make the objects move.

22:46Collision Detection: Chris explains how to detect collisions between game objects and implement hit detection.

27:15Game Loop: Chris introduces the concept of a game loop and updates the position of game objects in each frame.

31:20User Input: Chris adds keyboard event listeners to control the player object.