Skip to content

About

3d game engine written in D3D11

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

Mercury

Mercury is a game-engine built with C++ for performant games

pequod_demo_compressed.mp4

Table of Contents

Goal

A completely open-source program that is designed to be develop performant video-games. The primary goal is to develop simulator video-games like Railroad Tycoon, SimCity, Cities Skylines etc. This means that it is developed specifically for top-down games with lots of systems being simulated, and features like ray-tracing, or advanced graphics might never be supported.

Support

A goal of this project was to be cross-platform. Since everything is being implemented myself it is difficult to and thus I'm only aiming for desktop platforms with a limited number of graphics backends.

The order of the platform is the order of importance for compatibility. For example, Windows has the most support and hence is the first on the list. If a platform is not on the list then that means supporting is not a goal of this project.

Platform Renderer Support
Windows 10/11 D3D11 Yes
SteamOS DXVK No 1
Linux Vulkan None
MacOS MoltenVK None

Issues

Any bugs related to the game engine can be reported at issues.reocelot.com

Contributing

Mercury is open-source but not open-contribution. Features part of this engine are specifically for games I want to make and not to be generalized. In fact there are much better engines already out there that do most things better so I'd recommend using that if you cannot find a feature here.

That being said, there are many instances where you might want a change urgently (bugs, vulnerabilities) and perhaps already fixed it, in which case email maintainer@pequodengine.com with more information or with a git patch.

Official repositories for the code:

Design

Mercury is designed as a C++ library that can be used to produce games. This involves tasks such as windowing, shaders, input, memory and more. There are two parts of its design. First is its implementation which is how you can get started with adding Mercury to your project, or building using it. And the other is it's internal design which is how I've decided to go about designing the program which you hopefully never see.

You can find detailed documentation at: docs.pequodengine.com

Some important design features to better understand the engine:

Application

Pequod::Application is responsible for handling cross-platform application level features such as creating a window, taking in user-input like mouse, keyboard or controller.

The goal was to minimize platform-specific code to as little of the codebase as possible. This is why the next branch of the engine are Scenes and Primitives.

Scenes

Pequod::GameScene are a state of the game that should be extended to create the world. They only implement higher level functions like managing object properties, or the physics system and don't implement platform specific features like drawing or windowing.

Primitives

Primitive is a basic struct that is the minimum requirement to render an object to the screen. Scenes can modify or create primitives and implement them however they want. For example if they want a single texture atlas and contain a bunch of objects in their vertices so less draw calls are called, that's upto the scene to implement.

When the Application finally receives the Primitives, it creates buffers out of it and draws them to the screen. Again the way primitives are understood by Application is quite simple and thus optimizing how primitives are created or pooled (for batch rendering) should be easy to implement on all platforms then.

License

GNU GPLv3

Footnotes

  1. The goal is to have SteamOS specific features like support for those touchpads on the SteamDeck or the controllers. Along with support for controller layouts, battery modes and more. ↩

About

3d game engine written in D3D11

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Used by

Contributors

Languages