Coder Social home page Coder Social logo

codewringer / godotsharpbaseapp Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 3 MB

An opinionated quick-start template for Godot projects using C# and aiming not to deliver games, but desktop applications

License: MIT License

GDScript 0.78% C# 99.22%

godotsharpbaseapp's Introduction

Godot C# Base App

An opinionated quick-start template for Godot projects using C# and aiming not to deliver games, but rich desktop applications.

What's in the box?

  • A C# ready setup.
  • A unit-test C# project is included.
  • A directory and namespace structure that promotes a separation of the presentation and business layers.
    • All presentation logic is what's happening inside of Godot's systems. Godot artifacts are separated by type by default and bundled together when reasonable. For example, components are structured so as to be as self-contained as possible.
    • All actual business logic is to be handled by C#.
  • An input validation framework, with working examples.
  • A data source framework, with working example.
    • This is a suggestion for how to read and write data from and to disk.
  • The 'Roboto' Google font. All credit goes to their respective owners. Its license is contained in the font's directory.

Prerequisites

While this project is designed to include most of the necessary parts for a running start, it cannot provide all the pieces.

  1. Make sure to have read and understood the official Godot tutorial: https://docs.godotengine.org/en/stable/tutorials/scripting/c_sharp/c_sharp_basics.html
  2. This project requires the .NET Framework v4.7.2 to run.
  3. This project has been set up with the Godot_v3.5.1-stable_mono_win64 Godot binaries.
    1. The exact version shouldn't matter, but in case you run into odd issues not outlined here, make sure to test it with this exact version also.
  4. In case you're not working with Visual Studio, you may need to invoke NuGet manually, to get any required dependencies downloaded.

Getting started

After having cloned this repository, you should be able to build and run the project right away. Then, make it your own:

  1. Change out the app/icon.png image for your own.
  2. Change the name of the project to your own. For that, in Godot, navigate to Project > Project Settings > Application > config and change the name to your preference. Be mindful that changing the name affects several other things in Godot, such as the name of the user-specific data directory.
  3. If you're working with Visual Studio, the solution file can be found in app and is called app.sln.
  4. Write your model of business data, inside the app/business/model directory and integrate your model into the app/business/state/ApplicationState.cs class.
  5. Define the application-level settings as fields inside the app/business/state/ApplicationSettings.cs class.

Gotchas

  • Due to how Godot automatically adds the contents of the Godot project to the Godot associated C# project, it is best practice to avoid adding C# sub-projects within the directory structure of the Godot project.
    • In the case of this template, avoid adding sub-projects inside of the 'app' directory. Instead, place them one level up in the root of the cloned directory structure.
  • In order to get NuGet to work with Godot's C# project setup at all, it was necessary to add a 'nuget.config' file to the root directory of the 'app' C# project.
    • The essential problem with Godot C# projects as they come out-of-the-box (from Godot version 3.3.0 and up), is that they require the Godot.NET.Sdk/3.3.0 sdk to work. This sdk is supposed to be downloaded by NuGet. However NuGet doesn't seem to know where to get it from, by default.
    • This issue is separate from Visual Studio - it is NuGet itself, which isn't playing nice.
    • For more details, see this git issue: godotengine/godot#58955

godotsharpbaseapp's People

Contributors

codewringer avatar

Stargazers

Stefano Azzolini avatar

Watchers

 avatar

godotsharpbaseapp's Issues

Model item property editing component

Requires a framework to allow defining how a property can be edited - acceptable values, type of control for editing, localized label and help texts and so on.

List component

A generic list that can display named items. The assumption is that every item that is to be displayed, has a name.

Should also provide controls for adding, editing, reordering, sorting and deleting.

Undo History

Three patterns:

  1. Command
  2. Memento/Snapshot
  3. Delta

View switching framework

A system that allows switching the child nodes of a specific node, like single page navigation in JavaScript frameworks like React or Vue.

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.