Ariyana 2Dsystem Tutorial in Beef
Firstly, we should create a workspace for our game, as there are many other projects that should be added to workspace as dependencies.
- Run the Beef IDE
- Create a new workspace by selecting Files/new/new workspace
here is the link for creating new project in Beef
Adding dependencies and project to workspace
Add these projects to the game workspace : Ariyana_beef , CurlBeef, JSON_beef, BeefExtensionsLib
Projects are located in "../ariyana/Beef/deps/"
{% include elements/figure.html image="/assets/blog/GettingStartwithBeef&Ariyana/Untitled1.png" caption="Workspace layout after adding projects should be linke this" %}
Projects | Description |
---|---|
Ari2D-Tutorial | This is your game project |
Ariyana_beef | Ariyana Engine bindings for Beef |
BeefExtensionsLib | Contains IO and Reflection Extensions |
CurlBeef | Beef bindings for curl library |
JSON_Beef | JSON parser library for Beef |
adding linking dependencies to your project
dependencies for your current game project
Ariyana_beef dependencies
BeefExtentionsLib Dependencies
All the workspace configs such as a list of projects' path and StartupProject in your workspace are in "BeefSpace.toml", which located in your project folder
FileVersion = 1
Projects = {Ari2D-Tutorial = {Path = "."}, Ariyana_beef = {Path = "../ariyana/Beef"}, JSON_Beef = {Path = "../ariyana/Beef/deps/JSON_Beef/lib"}, BeefExtensionsLib = {Path = "../ariyana/Beef/deps/Beef-Extensions-Lib"}, CurlBeef = {Path = "../ariyana/Beef/deps/CurlBeef"}}
[Workspace]
StartupProject = "Ari2D-Tutorial"
GameApp handles all the main functionality of the engine This class will derive from Application in Ariyana_beef
using ari;
namespace Ari2DTutorial
{
class GameApp : Application
{
}
}
First of all we should our world entity in our "GameApp.bf".
class GameApp : Application
{
// Creating the world
World world = new World();
Check out World.bf in Ariyana binding
As Ariyana is ECS(entiry component system) engine, all the main systems such as RenderSystem, SceneSystem and GuiSystem should be added to World Entity
All of the code for this post is available on Github.