在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):SimulaVR/godot-haskell开源软件地址(OpenSource Url):https://github.com/SimulaVR/godot-haskell开源编程语言(OpenSource Language):Haskell 99.9%开源软件介绍(OpenSource Introduction):godot-haskellHaskell bindings for the Godot game engine.
Getting started with the examplesThe easiest way to get started is to have a look at the demos included in the examples directory. First check out "Dodge the Creeps!", your first game from the Godot documentation. Following along with the documentation and the code should make everything understandable. To build: git clone --recursive https://github.com/SimulaVR/godot-haskell
stack install godot-haskell:exe:godot-haskell-project-generator
cd godot-haskell/examples/dodge-the-creeps
make To make changes to the game, in two different terminals: make stack-watch
make project-watch The first command will constantly build Haskell code and copy the shared library into the Godot project, demo. The second command will constantly scan the Godot project and build Haskell code out of it. Load up the game by importing Understanding the examplesThere are two parts to every project. You must regenerate Known issues & inconveniences
Setting up your own project.It's best to start with one of the existing examples, make a copy, and rename
the project. If you want to start another project use the stack template
stack new myproject https://raw.githubusercontent.com/SimulaVR/godot-haskell/master/template/godot-haskell.hsfiles Changing Godot versionsYou will need to regenerate the bindings if you switch Godot versions. At present, these are generated for the version that corresponds to the godot_headers submodule included here. This was 3.1 at the time of writing. To regenerate bindings:
# Prerequisite
sudo apt-get install jq libcurl4-gnutls-dev # Or equivalent on you OS/Distro
cabal install xml-to-json
# Generate the JSON
xml-to-json godot-install-directory/doc/classes/*.xml | jq -n '[inputs]' &> godot_doc_classes.json
cd classgen
stack build
rm ../src/Godot/Core/* ../src/Godot/Tools/*
stack exec godot-haskell-classgen -- ../godot_headers/api.json ../godot_doc_classes.json ../ That's it! The rest of the bindings are fairly lightweight with few dependencies, so you shouldn't see much breakage in the rest of the package. If you want to get an idea of what the Haskell libraries are doing, set the
environment variable QuestionsThe primary method of contact is the SimulaVR Discord server. Mirrors are available at and in the SimulaVR channel at Matrix. DocsMost of the API is documented but the lowest-level bindings, like GDNative functions don't have documentation. They are quite intuitive to use though. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论