Code Monkey home page Code Monkey logo

sentry-godot's Introduction

GDExtensionSummator

This repository is for showcasing the new GDExtension system in Godot 4. The C++ code is from the Custom modules example of the Godot docs.

-> Feel free to use this repository as a template for your GDExtensions

Versioning

This repository is being updated regularly to work with the latest version of the master branch. If you can't compile the extension, please open an issue.

Most Recent Update: Godot 4 Alpha 14 working

Contributing

If you can't compile the extension, please open an issue with the error log in your terminal and/or the error log in the editor (if you can't run the example scene).

PRs for improvements are very welcome!

Getting started / Building the extension

To compile the extension you need to follow these steps:

  1. Click on the green "Use this template" button to generate the repository for you

  2. Clone the extension recursively from this repository

# --recursive to automatically load the submodule godot-cpp
# The git adress can be found under the green "Code" dropdown menu
git clone --recursive (--GITHUB ADRESS--)
  1. Make sure you are in the top level of the repository
pwd
.../GDExtensionSummator
  1. Go inside the godot-cpp folder
cd godot-cpp
  1. Compile godot-cpp and generate bindings
scons target=debug generate_bindings=yes
  1. Go back to the top level of the directory
cd ..
  1. Compile the extension
scons target=debug

Using the extension

After compiling the extension succesfully, you can now use the Summator Class inside Godot ๐ŸŽ‰

func _ready() -> void:
	var s = Summator.new()
	s.add(10)
	s.add(20)
	s.add(30)
	print(s.get_total())
        # outputs 60 in the console
	s.reset()

sentry-godot's People

Contributors

bitsandfoxes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

isabella232

sentry-godot's Issues

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.