This repo contains the source code of godot engine and the influencemap library.
All the IMap-related codes are located in modules/imap
, and all the other files
are kept update with the master branch of Godot.
To use the InfluenceMap library, either clone this repo, which grants you the ability
to compile the source code into executable. What you can also do is to only download the
modules/imap
folder, clone the source code of godot from the official website, and place
the folder into the same place.
- Clone the repo:
git clone https://github.com/suiyoubi/GodotWithIMapLibrary.git
- Install Scons:
- Build the engine:
- Make sure you are in the root folder of the repo
- For mac user:
user@host:~/godot$ scons platform=osx --jobs=$(sysctl -n hw.logicalcpu)
- Please refer to their documentation for other specific platform usage (since I have not tested) here
- Run the engine:
- For mac user, you can simply execute the executable in the
bin
folder, the executable should be named similar togodot.osx.tools.64
:user@host:~/godot$ bin/godot.osx.tools.64
- For mac user, you can simply execute the executable in the
- Use the library:
- In the Godot script, you can simply instantiate a influence instance by
var imap = IMap.new()
- It is important to call
imap.initialize_default_map()
after creating the new instance, the default map has size 40x30. If you want to customize the size, useimap.create_imap()
- For now, there are three basic operation provided for godot: add/move/get influence source:
void add_influence_source(int id, float x, float y, float influence_value);
void move_influence_source(int id, float x, float y);
float float get_influence_value_at(float x, float y);
- You should be able to call this three method directly from the GDScript
- There will be more operations supported, you can read the implementation of the "wrapper" class IMap.cpp
Homepage: https://godotengine.org
Godot Engine is a feature-packed, cross-platform game engine to create 2D and 3D games from a unified interface. It provides a comprehensive set of common tools, so that users can focus on making games without having to reinvent the wheel. Games can be exported in one click to a number of platforms, including the major desktop platforms (Linux, Mac OSX, Windows) as well as mobile (Android, iOS) and web-based (HTML5) platforms.
Godot is completely free and open source under the very permissive MIT license. No strings attached, no royalties, nothing. The users' games are theirs, down to the last line of engine code. Godot's development is fully independent and community-driven, empowering users to help shape their engine to match their expectations. It is supported by the Software Freedom Conservancy not-for-profit.
Before being open sourced in February 2014, Godot had been developed by Juan Linietsky and Ariel Manzur (both still maintaining the project) for several years as an in-house engine, used to publish several work-for-hire titles.
Official binaries for the Godot editor and the export templates can be found on the homepage.
See the official docs for compilation instructions for every supported platform.
Godot is not only an engine but an ever-growing community of users and engine developers. The main community channels are listed on the homepage.
To get in touch with the developers, the best way is to join the #godotengine IRC channel on Freenode.
To get started contributing to the project, see the contributing guide.
The official documentation is hosted on ReadTheDocs. It is maintained by the Godot community in its own GitHub repository.
The class reference is also accessible from within the engine.
The official demos are maintained in their own GitHub repository as well.
There are also a number of other learning resources provided by the community, such as text and video tutorials, demos, etc. Consult the community channels for more info.