Giter Site home page Giter Site logo

lahklekey / blazorcanvas Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mizrael/blazorcanvas

0.0 0.0 0.0 27.14 MB

Simple 2D gamedev examples using Blazor and .NET 5

Home Page: https://www.davidguida.net

License: MIT License

Shell 0.25% JavaScript 0.82% C# 63.18% CSS 1.22% HTML 34.53%

blazorcanvas's Introduction

BlazorCanvas

I started this project with the intention of learning/exploring what can be done with Blazor and 2d graphics. I am an old-time videogames lover and I always enjoyed coding small games and prototypes in my spare time.

The goal is to create small examples, built one on top of the other, showing how easy it is to render 2d elements using Blazor. Eventually I might end up writing a full game, it highly depends on how much time I'll have.

The repository is divided into numbered subfolders, each one with a single example.

Every example is also published on GitHub Pages via GitHub Actions using the approach outlined here . The master branch is used to host the published pages. The main branch is development.

Examples

  • Example1 shows how to initialize the 2d canvas
  • Example2 shows how to render a sprite and react to the window resize event
  • Example3 shows how to move a sprite on the screen
  • Example4 builds on top of the previous one, refactoring and cleaning up the code
  • Example5 shows how to handle mouse inputs
  • Example6 shows how to animate a sprite. Spritesheets were downloaded from here and combined using a custom tool
  • Example7 shows how to control animations using the keyboard
  • Example8 shows how to use a FSM to control animations and move the character on the screen
  • Example9 refactors the code and introduces the Scene Graph
  • Example10 adds the Assets Resolver
  • Example11 shows how to do collision detection

Tutorials

Every example will be explained in detail by an article on my personal blog:

blazorcanvas's People

Contributors

mizrael avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.