Code Monkey home page Code Monkey logo

godot-roguelite's Introduction

Godot 4.1 GDExtension C++ Prototype

This project is a rough prototype focusing on understanding how to implementa majority of a game's core logic/scripting in C++ using GDExtension. Everything is done in the code aside from UI/dialog/menu design, and scene file generation.

The current focus is aimed towards learning more about how certain features and funtionality can be implemented in native code leveraging the godot-cpp GDExtension bindings so there isn't much game logic implemented yet. Since the documentation is pretty sparse when it comes to pure native development, most of the functionality implemnted in this project is focused on providing a variety of general examples of misc functionality that others will likely find useful.

Game logic will become a focus when most of the essentials are figured out and implented throughout the project.

Overview

This project is meant to show others working with GDExtension how to:

  • structure a project
  • implement specific features and functionality entirely in C++
  • incorporate 3rd party libraries into their GDExtension code/library
  • use CMake, VCPKG, and submodules to configure the project automatically
  • configure VSCode (linux & windows) / Visual Studio 2022 (windows) for
    • good code navigation for godot engine sources, godot-cpp sources, and the gdextension project sources.
    • good autocomplete / intellisense configuration
    • preconfigured debugger launch profiles to run the project standalone or by launching the editor (both launch settings debuggable)
    • good debugger visualizations for internal godot data structures by leveraging the .natvis file provided with godot-cpp

High Level Project Structure

The project's main scene consists of a single Main node. The Main node is intended to handle all high level game management (level loading, scene swaps, saving, loading, UI, input handling, menus, signal propigation, etc)

The overall node hierarchy:

Main
├── MainDialog
│   ├── RichTextLabel (In-Game Console)
│   └── MainSubViewport (Primary Game Viewport)
│       └── Canvas Layer
├── Level
│   ├── Character
│   │   ├── Camera
│   │   ├── Sprite2D
│   │   └── CollisionShape2D
│   └── Projectile Spawner
│       └── Projectile
└── Main Canvas Layer (reference to Canvas Layer in MainDialog)

Console (Singleton) └── RichTextLabel (Reference from MainDialog)

Setup Guide

See the wiki for a detailed guide that will walk you through the steps required to get this project running and debugging on linux or windows.

Contributing

This repo and/or the gdextension developer documentation I recently started working on is open to anyone that wants to contribute. Feel free to submit PRs for any changes that implement new features, fix bugs, or improve upon any existing features, functionality, or design.

Additional Resources

The projects below are also worth checking out for some additional GDExtension examples to use as references

Licensing

Code

  • All code in this project is licensed as MIT

Assets

godot-roguelite's People

Contributors

vorlac avatar

Watchers

 avatar

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.