Skip to content
willmexe edited this page May 29, 2022 · 21 revisions

Initialization

Install SDL2

Windows

SDL2 SDL2_Image SDL2_TTF SDL2_Mixer

Ubuntu

sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev libsdl2-mixer-dev

Arch Linux

sudo pacman -S sdl2 sdl2_image sdl2_ttf sdl2_mixer

MacOS (Homebrew)

brew install sdl2 sdl2_image sdl2_ttf sdl2_mixer

Using DLLs

Build Fjord

(Make sure you have .NET 6.0 installed)

Launch your terminal emulator of choice in an empty folder and run

git clone https://github.com/willmexe/Fjord.git &&
cd Fjord && 
git submodule init && 
git submodule update &&
dotnet restore &&
dotnet build

Setup project

run

git clone https://github.com/willmexe/FjordTemplate &&
cd FjordTemplate &&
dotnet run

or if you want to use your own dll add

  <ItemGroup>
    <Reference Include="Fjord">
      <HintPath>bin/Debug/net6.0/Fjord.dll</HintPath>
    </Reference>
  </ItemGroup>

to your .csproj this will load the dll if put in the ./bin/Debug/net6.0/ directory

Now you have a functioning Fjord project!

Understanding Resources

The second part is the resources

The resource folder is specified with game.set_resource_folder(string folder);. Resources are kept in your specified resource folder.

Assetpacks have a structure of:

  • [asset_pack]/assets/images/ for images
  • [asset_pack]/assets/sounds/ for sounds
  • [asset_pack]/assets/fonts/ for fonts
  • [asset_pack]/data/lang/ for language files
  • [asset_pack]/data/tilemaps/ for tilemaps

Assetpacks are loaded using the game.set_asset_pack(string asset_pack); function.

Clone this wiki locally