redpointgames/protogame

❗❗❗ This project has been sunset as of 1st Jan 2018 and is no longer...

❗❗❗ This project has been sunset as of 1st Jan 2018 and is no longer supported or maintained

❗❗❗ This project has been sunset as of 1st Jan 2018 and is no longer...

Protogame

❗❗❗ This project has been sunset as of 1st Jan 2018 and is no longer supported or maintained. Please read the announcement for more information: Sunsetting Protogame. ❗❗❗

A powerful cross-platform game engine for C#

Protogame is a cross-platform game engine for C#, built on top of MonoGame. It is highly modular and flexible, built on the ideal that you should only have to pull in dependencies for what you want to use. Many parts of Protogame can be used either together or seperately, and you can use many of the APIs without adopting the core architecture.

Protogame is one of the only engines for MonoGame that has built-in support for the development of 3D multiplayer games.

Getting Started & Documentation

To get started with Protogame, check out the tutorials and walkthroughs:

  • Creating your first game
  • Rendering textures
  • Add a player
  • Handling input

Extensive documentation for Protogame is available on Read the Docs.

Supported Platforms

Protogame supports the following platforms:

  • Windows
  • MacOS
  • Linux

Experimental support is also available for:

  • Android (via Xamarin)
  • Ouya (via Xamarin)
  • iOS (via Xamarin)

Build Status

Projects are built and tested against all supported and experimental platforms.

Status
Core Project
Protogame
Supporting Projects
MonoGame
Protoinject
Prototest
Jitter (Physics)
AStarPathFinder
Newtonsoft.Json From NuGet
protobuf-net
NDesk.Options
HiveMP From NuGet

Features

Protogame is a collection of modules, each of which you can optionally use in your game. These modules include:

  • Core & Graphics
    • Full support for both 2D and 3D games.
    • Highly modular architecture allowing you to replace and extend any part of the engine without modifying library code.
    • A rendering pipeline which supports both forward and deferred rendering pipelines.
    • Built-in forward and deferred surface shaders with support for normal and specular mappings.
    • The deferred pipeline supports thousands of lights without requiring any additional programming.
    • Support for adding post-processing and custom render passes with a single line of code.
    • Support for automatic batching of rendering requests.
  • Inputs & Events
    • A highly powerful and extensible event system, which can be used to propagate events of any type through a system while still maintaining type safety.
    • An input system which allows you to prevent double consumation of input events (e.g. two entities handling the same input event).
    • A flexible binding system that allows you to map events to actions in a fluent syntax.
  • Components
    • A very powerful, yet optional component system that supports compile-time validation of dependencies.
    • Built-in components that making adding rendering and physics to entities easy.
    • A network synchronisation component that enables multiplayer entities with very few lines of code.
    • A component hierarchy which supports automatically combining transforms efficiently.
  • Asset System
    • Highly flexible asset system that can be extended to support custom game data.
    • Real-time asset reload, allowing you to replace textures, models and other game assets while the game is running, and see your changes without restarting the game or compiling assets.
    • Support for compiling textures, models, audio, confguration, shaders & effects, fonts, language translations, level data and more into cross-platform, fast to load, binary formats.
    • Support for uber shaders, allowing you to define and compile multiple variations of the same shader and choose which variant to use at runtime.
  • Level Editors
    • A 3D level editor based on the Sony ATF Level Editor. This is a WIP, and we'll be improving the workflow in the future.
    • Support for loading levels from the Ogmo Level Editor.
  • Physics
    • A full physics engine provided by Jitter, which synchronises with the entity and component hierarchy.
    • The physics system is fully managed, with no native dependencies.
  • Networking & Servers
    • Full support for building multiplayer games, with both low-level and high-level APIs.
    • A networking protocol which supports sending both realtime and reliable messages.
    • A full framework for writing dedicated servers, and server code for all entities and components.
    • Support for using Hive Multiplayer Services for game lobbies and user sessions, as well as performing NAT punchthrough for peer-to-peer games.
    • Input prediction APIs for client prediction.
    • Interpolation and extrapolation support for smooth rendering of interval data from servers.
    • A framework which allows you to build cheat-free multiplayer games.
  • User Interface
    • A full user interface framework built upon a container system.
    • Ships with support for many common UI elements, such as buttons, lists, tree views, scrollable views, and many more.
    • Full skinning support for custom rendering of UI elements.
    • Optionally declarative XML syntax for user interfaces, imported through the asset system.
  • Coroutines
    • A coroutine system that allows you to use async / await transparently with coroutines.
  • Debugging & Profiling Framework
    • Utilities and supporting methods for showing debug information in the world, such as the positions and dimensions of entities, as well as any other arbitrary data you want to display.
    • Support for an in-game profiler, which immediately shows developers where the game is spending time during game loops.
    • The profiler can also expose additional information, such as network state and rendering calls.
    • A framework for capturing and handling errors in your game, with the ability to extend it to automatially submit error reports to online systems.
  • In-Game Console
    • An in-game console which allows developers and players to access commands by pressing ~.
    • A logging framework which supports fast logging of messages, with automatic grouping of similar messages in the console.
  • Miscellaneous Features
    • Support for setting up common camera viewports.
    • LZMA compression utilities for data compression
    • APIs for streaming data from hardware such as webcams and device cameras.
    • Process and analyse image data, such as images sourced from cameras.
    • APIs for generating various types of noise, useful for procedural generation.
    • Various useful classes for mathematical calculations.
    • A framework for pooling instances of objects.
    • A fast, 64-bit addressable octree that operates both setting and getting data in O(1) time.
    • A scripting framework that includes a built-in scripting language ideal for pure logic evaluation (LogicScript).
    • Support for extending the scripting framework with other scripting languages as needed.

How to Contribute

To contribute to Protogame, submit a pull request to RedpointGames/Protogame.

The developer chat is hosted on Gitter

Providing Feedback / Obtaining Support

To provide feedback or get support about issues, please file a GitHub issue on this repository.

License Information

Protogame is licensed under the MIT license.

Community Code of Conduct

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information see the .NET Foundation Code of Conduct.

Versions

Quick list of the latest released versions

6.0.4 - May 13, 2017

This is a minor patch release, which updates Protogame code for changes made in external libraries.

Changes

This updates internal Protogame code for changes made in the MonoGame and Protoinject libraries. There are no changes to the Protogame APIs that impact developers, and no bug fixes in this release.

Upgrading

If you are using Protobuild, you can upgrade Protogame by editing the version specified in Module.xml and then running:

If you are using NuGet, you can use the NuGet package manager to update Protogame.

Installation

All packages both as dependencies of this package, and Protogame's available in general are now on NuGet. If you are using the latest version of Protobuild, you can install the package like so:

If you are not using Protobuild, just search for Protogame in the NuGet package manager. You will need to install the dependencies manually, which are listed below:

  • Jitter.Redpoint
  • protobuf-net.Redpoint
  • MonoGame.Framework.Redpoint
  • NDesk.Options.Redpoint
  • Prototest
  • AStarPathFinder
  • Protoinject
  • Newtonsoft.Json
  • HiveMP.TemporarySession
  • HiveMP.NATPunchthrough
  • HiveMP.Lobby
  • HiveMP.Attribute

In a future version these will be pulled in automatically, but this is dependent on new features in Protobuild.

6.0.3 - Jan 26, 2017

This release arrives soon after the Global Game Jam 2017, and includes multiple improvements that were made during the creation of Super Ball Brawlers at the event.

Changes

This release primarily contains startup performance improvements, and expands the APIs available for controlling the physics system. A detailed changelog is listed below.

Features

  • The performance of launching games has been greatly improved.
  • Protogame now supports showing loading screens during the initial game load. This makes the game feel more responsive on launch. You can change how the loading screen is rendered by implementing and rebinding ILoadingScreen. Because of these changes, some of the overridable methods on Game now occur before the IGameContext, the world or the world manager is available. In particular, engine hooks now need to check if gameContext.World is null before attempting to access it, as it may not yet be available. To show loading screens, you must append a fixed render pass of type I2DBatchedLoadingScreenRenderPass, e.g. pipeline.AddFixedRenderPass(kernel.Get<I2DBatchedLoadingScreenRenderPass>());.
  • An assembly-level ConfigurationAttribute attribute has been created. When at least one assembly contains this attribute, game startup will use game configuration classes specified by this attribute. You can add as many ConfigurationAttributes as you like, to as many assemblies as you like. Using ConfigurationAttribute is much faster than the previous method, as Protogame no longer needs to scan for all implementations of IGameConfiguration and IServerConfiguration. You can use this attribute by placing the following directive after a using block but before a namespace block: [assembly: Configuration(typeof(NameOfYourGameConfiguration))]. If no attributes are found, Protogame falls back to the more expensive type scanning method to locate implementations.
  • There is a new virtual method on CoreGame called PrepareGameWindow which allows you to center, reposition or resize the game window during game start.
  • Audio instances now make a Volume property available, which allows you to change the volume of a sound before, during or after playback.
  • Many properties and behaviours of the physics system can now be controlled by the IPhysicsWorldControl interface. You can use this interface to change the gravity of the world and set custom callbacks for determining restitution and friction during collisions. You can also disable speculative contacts in the physics system, or tell it to ignore angular velocity during collisions.
  • 3D deferred render passes can now be configured such that they can be layered on top of 2D render passes. This allows for cheap skybox techniques where you render a 2D skybox in a batched or direct 2D render pass, and then render your world in a 3D deferred render pass after that. To do this, set the ClearDepthBuffer property to true and the GBufferBlendState property to BlendState.AlphaBlend on the 3D deferred render pass.
  • The alpha value in colors within a 3D deferred render pass are now used correctly, providing the blend state is configured such that alpha values are used. This allows for rendering of semi-transparent 3D worlds in a 3D deferred render pass.
  • PhysicalBaseRigidBodyComponent can now be derived by your own classes, making the implementation of custom physics shapes much easier.
  • The Material class now has a cloning constructor, which makes modifying existing materials or materials loaded from models easier.

Bug Fixes

  • An issue was fixed where Render3DModelComponent would not pick the correct shader when there is no normal map on a material.
  • The direction of directional lights placed in the ATF level editor is now honored by DefaultDirectionalLightEntity.
  • An issue where the ATF level loader would incorrectly parse color values has been fixed. This issue led to scenes being rendered with blue lights, even when the lights were configured for a different color.
  • Fixed an issue where GamePadIndex was not set correctly on GamePadThumbstickActiveEvent events.
  • Fixed an issue where calling Loop on an audio instance would not result in the audio instance starting playback.
  • An issue where execution of scheduled coroutines occurred immediately instead of being delayed until the next update has been fixed.

Other Notes

  • Explicitly loading ProtogameCoroutineModule is no longer needed. Support for coroutines and coroutine scheduling is now done in the core module, so calls to load ProtogameCoroutineModule can be safely removed.
  • AssemblyLoadStrategy is now no longer bound by default in ProtogameAssetModule. This load strategy was prohibitively expensive when loading the first asset in the game, as it would perform reflection to scan all types in all loaded assemblies. If you still need this load strategy (for example, when using AIAsset), you should bind it in your game module like so: kernel.Bind<ILoadStrategy>().To<AssemblyLoadStrategy>().InSingletonScope();.
  • Startup logs are no longer automatically emitted to the debug window in Visual Studio. These logs caused a noticeable increase in load time. If you need to diagnose game startup (in particular, determining what game and server configurations it is loading), pass the --debug-startup as an argument to your game executable.

Upgrading

If you are using Protobuild, you can upgrade Protogame by editing the version specified in Module.xml and then running:

If you are using NuGet, you can use the NuGet package manager to update Protogame.

Installation

All packages both as dependencies of this package, and Protogame's available in general are now on NuGet. If you are using the latest version of Protobuild, you can install the package like so:

If you are not using Protobuild, just search for Protogame in the NuGet package manager. You will need to install the dependencies manually, which are listed below:

  • Jitter.Redpoint
  • protobuf-net.Redpoint
  • MonoGame.Framework.Redpoint
  • NDesk.Options.Redpoint
  • Prototest
  • AStarPathFinder
  • Protoinject
  • Newtonsoft.Json
  • HiveMP.TemporarySession
  • HiveMP.NATPunchthrough
  • HiveMP.Lobby
  • HiveMP.Attribute

In a future version these will be pulled in automatically, but this is dependent on new features in Protobuild.

6.0.2 - Jan 15, 2017

This marks one of the first releases under the new semantic versioning scheme. We're marking this as a pre-release since it's the first 6.0 release, and we want to perform some additional testing in the future to make sure we have a stable version across desktop platforms.

Changes

Prior to this release, Protogame used a rolling release model, where we did not explicitly version releases (instead developers often just used master). This makes it difficult to build a changelog for the first semantically versioned release.

Future releases will contain a more detailed changelog; for now please refer to the README for details on engine features.

Installation

All packages both as dependencies of this package, and Protogame's available in general are now on NuGet. If you are using the latest version of Protobuild, you can install the package like so:

If you are not using Protobuild, just search for Protogame in the NuGet package manager. You will need to install the dependencies manually, which are listed below:

  • Jitter.Redpoint
  • protobuf-net.Redpoint
  • MonoGame.Framework.Redpoint
  • NDesk.Options.Redpoint
  • Prototest
  • AStarPathFinder
  • Protoinject
  • Newtonsoft.Json
  • HiveMP.TemporarySession
  • HiveMP.NATPunchthrough
  • HiveMP.Lobby
  • HiveMP.Attribute

In a future version these will be pulled in automatically, but this is dependent on new features in Protobuild.

v2.0 - Dec 21, 2013

This is a reasonably stable version of Protogame 2.0. We do however, recommend using Protogame in a Git submodule if you're using Git as your version control system, as you will be able to receive updates much more frequently.

v1.0 - Jul 12, 2013

This is the original version of Protogame. It only supports Windows and doesn't have many of the infrastructure improvements present in version 2.

Library Stats (Sep 24, 2022)

Subscribers: 20
Stars: 171
Forks: 33
Issues: 4

CSharpMinifier filters comments and unnecessary whitespace from valid C#

source code in order to arrive at a compressed form without changing the

CSharpMinifier filters comments and unnecessary whitespace from valid C#

CSharpFastPFOR: A C# port of the simple integer compression library JavaFastPFOR

==========================================================

CSharpFastPFOR: A C# port of the simple integer compression library JavaFastPFOR

csharp-data-visualization

I've always wanted to learn how to visualize data in C#

csharp-data-visualization

CSharpToCppTranslator

A specific translator for LinksPlatform's libraries

CSharpToCppTranslator

CSharpDecodeSdpc

This is a tool to extract image tiles from pathological whole slide images (WSIs) based on C#

CSharpDecodeSdpc

C Sharp Helper Methods

Bu bir Windows Form uygulamasıdır ve içerisinde genel olarak ERP projelerinde sıkça kullanılabilecek bazı metotları ve kullanımlarını içermektedir

C Sharp Helper Methods

CSharp-CodeSnippet

Wide variety of sample code snippets from the topics related in C#

CSharp-CodeSnippet

CSharp &quot;C#&quot; WAVE &quot;

Parses the audio data and the format chunk info from a WAVE-Format audio file &quot;

CSharp &quot;C#&quot; WAVE &quot;

CSharp_ChromaStreamApp

C# Chroma Stream App for Chroma RGB streaming

CSharp_ChromaStreamApp

CSharp-SMTP-Server

Simple (receive only) SMTP server library for C#

CSharp-SMTP-Server

CSharp To Mindustry Logic

This is a code transpiler that will transpile C# code to mlog

CSharp To Mindustry Logic