Git Product home page Git Product logo

gamemodel's Introduction

GameModel

GameModel is a collection of platform-agnostic services and interfaces to aid in the creation of games running in .NET.

GameModel is currently in the very early stages of development and testing, and for these reasons is not very performant and is missing many important planned features.

You can think of GameModel as the game-focused cousin of AppModel, the project that I created for writing cross-platform apps in .NET. This library ditches the dependency injection-focused approach to provide a more streamlined and performant platform for creating games. It also provides abstractions of lower-level graphics to allow for 2D and 3D raster and vector graphics support on all platforms, as well as dynamic input detection across different kinds of input devices and executing platforms.

The project is organized as follows:

  • BassClefStudio.GameModel.Core is the base project with mathematical constructs, geometry definitions, and various shared logic and helper classes.
  • BassClefStudio.GameModel.Graphics provides the interfaces and abstractions over low-level graphics surfaces, as well as a system for extending the graphics commands with game-specific ones as the use case requires.
  • BassClefStudio.GameModel.Input provides a unified way to check for user input, whether that be touch, keyboard, mouse, joystick, controller, or something else. Games can bind groups of inputs to a single command and repond to those inputs in their game logic.
  • BassClefStudio.GameModel.Runtime handles game activation, game loops (such as handling timing between screen refreshes and game logic passes, etc.), and combining game subsystems (such as connecting the response from user input to a graphics animation).

Various platform-specific heads, similar to AppModel, are then included with the project, that implement the interfaces using platform-specific features such as graphics systems and app platform types (WPF, UWP, GTK, iOS/Android, etc.). Currently planned for this library are SkiaSharp, Win2D, and possibly OpenGL and/or Direct3D.

Why Use GameModel (when it's done)?

GameModel's graphics are different to some of the other competing game platforms because most of it is based around drawing commands, instead of more traditional things like sprites and textures. It's primarily a 2D engine, and while raster graphics will be possible, the main attraction here will be the ability to construct vector-based graphics that render natively in the library. I created this library mostly because a vector-graphics solution to make cross-platform games didn't really exist, and so most of the features that GameModel will showcase revolve around what I believe is a missing piece in game libraries available today - easy drawing APIs that utilize hardware acceleration and still provide support for concepts like 'sprites' and animation.

In terms of structure, GameModel is similar to AppModel in that it provides interfaces that you can use in a .NET Standard/Core project to write most of your game code, and then simply use the platform-specific projects and packages to attach your already-written game to a specific implementation, like Win2D or SkiaSharp. This means that the cross-platform development process is simple, and doesn't rely on "just pick the default package and swap them out" or having to rewrite all of your code every time you want to change platforms. The modularity of the system even allows you to attach your own graphics/input/audio solution to your game library without having to rewrite any of your code!

If you're looking for a low-level, 3D, or raster-based library, then GameModel probably isn't for you. However, if you're looking for an easy-to-use framework to create a game that deals mostly with vector geometry, GameModel aims to be one of the easiest places to start that journey in .NET.

gamemodel's People

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.