Giter VIP home page Giter VIP logo

murder's Introduction

Murder logo

Welcome to Murder Engine!

This is the source for Murder Engine, a pixel art ECS game engine built on top of MonoGame.

Publish release License

๐Ÿšง๐Ÿ‘ท Warning Proceed at your own risk. This is an in-development engine, which is another way of saying that it will change quite a lot. We do our best to keep release branches stable, but expect a lot of breaking changes and things that are not perfect (yet!).

How to build it?

If you're good at just digging examples and figuring things out, I recommend starting out with our game jam project or the Hello World project. These projects show what to expect from the Murder architecture and how to create a world, entities and components, which ECS is all about.

...I realize this is quite redundant because the Hello World references this repository as a documentation source, but hang with me.

This is what the architecture looks like:

โ””โ”€โ”€ root 
    โ””โ”€โ”€ resources
    โ””โ”€โ”€ src
        โ”œโ”€โ”€ game
        โ”‚   โ”œโ”€โ”€ bin (final game)
        โ”‚   โ”œโ”€โ”€ packed
        โ”‚   โ””โ”€โ”€ resources
        โ””โ”€โ”€ game.editor
            โ”œโ”€โ”€ bin (game editor)
            โ””โ”€โ”€ resources

You may notice that there is no external editor.exe, only your own project. This is so you can have full control of your project! Very similar of what you expect developing a MonoGame project, for example.

The idea of a separate project for the editor is that editor code never touches your beautiful and efficient game code, and you can do whatever you want on the editor side.

There is no nuget package for Murder yet, so the recommended way is to keep a git submodule to reference in your .csproj, see example.

For more information on how the ECS applies to the engine, I recommend checking out the documentation for Bang, the framework that Murder uses.

Requirements

We support developing (which means, running the editor) on Linux, MacOS, Windows and even SteamDeck. All you really need is .NET 8 SDK installed. The game obviously also ships to all these architectures.

Console support is still on progress.

Contributing

This is still super early, but feel free to contact me or saint11 if you have any suggestions. I am very interested in people trying it out and any feedback you may have!

โœจ Editor examples

Murder logo Murder logo Murder logo

murder's People

Contributors

burstflare avatar codeimpossible avatar d3adb5 avatar dgoelitz avatar grouting avatar heytherewill avatar isadorasophia avatar jdrst avatar lihaochen910 avatar saint11 avatar yozhy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

murder's Issues

Index outside bounds crash when editing TileGridComponent

Summary:

When you try to edit the width or height of a TileGridComponent in the world view out of its bounds, it crash the editor.

What should happen:

It should not allow to go out of bounds, without crashing.

How to reproduce the issue:

https://github.com/isadorasophia/hellomurder/assets/94173512/8c382636-d84a-4f68-a7a1-f42fddd0fc19
https://github.com/isadorasophia/hellomurder/assets/94173512/33866940-cb0f-4085-8d88-7c2c280dc79f
https://github.com/isadorasophia/hellomurder/assets/94173512/fea96988-b3d4-4414-becd-90800d17ca99

Allow instance prefabs to be an instance-less prefab

Repro

  1. Create a prefab A
  2. Create an instance B from prefab A
  3. Delete prefab A

Expected
Prefab B will become a prefab by itself. Prefab A will be deleted.

Actual
Prefab A will be deleted. Prefab B will become "corrupted" and will need to be manually deleted. Any world instance of prefab A will be deleted from the world.

Fix
The fix is the tricky part. I guess we should scan all possible instances of prefab A prior to deleting it? Do we want to delete all the instances from the world or make them a complete instance (no prefab attached)?

We should come back at this eventually.

debug file

i followed the steps for neocity express and when i press f5 it says
image

Create CI for automating documentation page

Currently, I manually run in my machine:

dotnet build Murder.sln
.\tools\dotnet2md.ps1 ..\src\Murder\bin\Debug\net7.0
tools\publish.ps1

So it outputs the md files at docs\src and the html files at docs\book. We should rather have a GitHub action (or a bot?) that automatically generates the html files.

Tile grid size is hardcoded

Check Grid.cs.
CellSize is hardcoded, the default value should be available to change on GameProfile and each scene should have it's own grid size.

Need a Better Search Box

image
The search box we have right now currently very functional, but has a few problems and could be improved:

  • Opening with the mouse cursor far to the right will extend it, then it will slowly contract to a fixed size (?). This shouldn't happen. It should take the horizontal size of the field.
  • Arrow keys should select an option and enter should choose it.
  • Pressing escape should close it.

Check Murder.Editor\Utilities\Gui\SearchBox.cs for current implementation.

Good first issue for those familiar with ImGui

Better entity editor movement

It would be great to have some nice quality of life improvements on the entity selector. This would only be enabled if the entity is selected - otherwise, move camera, like we have it now:

  • Arrow keys move entities by 1 pixel
  • Shift+Arrow keys move entities by 1 tile.

Other features that would be nice:

  • Hold shift while dragging constrain to an axis (horizontal, vertical).
  • Alt+Click+Drag duplicate entity and drag.

Implement Undo in the Editor

We don't have an undo feature except on ImGui fields, we eventually will need one, specially for the map editor.
Maybe we can start simple and add more "undoable" things in the future?

Font UI is broken

The UI for fonts is broken.
This reproduces on all systems (Win/macOS/Linux).

How to reproduce:

  1. clone this repo.
  2. run dotnet run --project src\HelloMurder.Editor\HelloMurder.Editor.csproj
  3. under Fonts click on any font.

image
/e under linux it's a bit worse
image

Implement ImGui ctrl-c/ctrl-v for Linux

ImGui does not support clipboard by default in Linux and Mac. We already implemented Mac scenario, see this line:

private void InitializeImGui()
{
    // Magic so ctrl+c and ctrl+v work in mac!
    if (OperatingSystem.IsMacOS())
    {
        ImGuiIOPtr io = ImGui.GetIO();

        if (OperatingSystemHelpers.GetFnPtr is IntPtr getFnPtr)
        {
            io.GetClipboardTextFn = getFnPtr;
        }

        if (OperatingSystemHelpers.SetFnPtr is IntPtr setFnPtr)
        {
            io.SetClipboardTextFn = setFnPtr;
        }
    }
}

We should implement such that OperatingSystemHelpers also supports Linux.

Agents don't move with impulse. AgentCleanupSystem runs before AgentMoverSystem

When trying to sent entity agent impulse, the impulse never updates the movement of the agent, since it gets cleared first.

Notes:

  • Working out of the HelloMurder project
  • I manually added the PlayerInputSystem into the Systems of the World "Hello World" to register input
    image

Order of execution:
PlayerInputSystem FixedUpdate()
entity.SetAgentImpulse( _lockMovement ? Vector2.Zero : _cachedInputAxis, direction);
Then AgentCleanupSystem FixedUpdate runs, removing the impulse
Therefore AgentMoverSystem Update never updates the velocity.

Workaround:
Commenting out / disabling AgentCleanupSystem allows the impulse to apply correctly, but then friction is never reapplied to the agent by the cleanup system.

Perhaps it has something to do with AgentMoverSystem using Update and not FixedUpdate, or otherwise the order of operations matters here?

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.