Open Source J-RPG (Based on the Hero of Allacrost engine)
Clone or download
Bertram25 Fixed segmentation fault related to audio cache limit.
The audio cache limit was resetting random stopped audio sources,
making map sound objects source become dangling pointers.

I fixed this by removing the cache limit and setting audio sources
as free when their corresponding audio descriptor is unloaded.

This doesn't completely fix the bug though as the audio source is still limited
for some reason. This will be investigated in another issue.

Refs #623
Latest commit 04139a3 Nov 11, 2018
Failed to load latest commit information.
.tx Added config for Transifex client Apr 2, 2017
CMake/Modules Grabbed more modern versions of SDL2 CMake modules Oct 19, 2018
Xcode Update Xcode project Mar 9, 2015
data Fixed used of escape smoke. Nov 11, 2018
doc Added the missing image in the offline manual. Mar 16, 2015
po Get rid of the LINGUAS file Oct 19, 2018
src Fixed segmentation fault related to audio cache limit. Nov 11, 2018
tools Adding a test to check that source code is in ASCII or UTF-8 Mar 18, 2017
vs2013 Fixed absolute paths Mar 17, 2017
.dir-locals.el Minor additions for users of GNU Emacs May 29, 2017
.editorconfig Adding a file for EditorConfig Mar 18, 2017
.gitattributes Updates the .gitattributes file for line endings. Jan 30, 2014
.gitignore Fix CMake for MSys2 Oct 19, 2018
.gitmodules Used utils/ as submodule now. Jan 17, 2018
.mailmap Update .mailmap Apr 26, 2013
.travis.yml Kept trying ... Feb 5, 2018
AUTHORS Minor changes in some modes Aug 20, 2017
CMakeLists.txt Fix CMake for MSys2 Oct 19, 2018
COPYING.CC-BY-3 A bit more HTTPS Aug 20, 2017
COPYING.CC-BY-SA-3 A bit more HTTPS Aug 20, 2017
COPYING.CC0 Add copies of the CC licenses used by some of our art assets. Aug 15, 2013
COPYING.GPL-2 Separate the COPYING file into a v2 and a v3 copy. Aug 15, 2013
COPYING.GPL-3 A bit more HTTPS Aug 20, 2017
KWStyle.xml Not more than 3 empty lines and files end with new line Mar 18, 2017
LICENSES.txt Added info sign, fixed collision size for all wood signs, and first p… Jul 4, 2018
MANUAL While seeing, updated a bit the manual file. Aug 17, 2013
README-SDL.txt Minor changes (not in C++) Oct 3, 2017 Fixed README file line returns being removed. Oct 19, 2018
README.txt Update README.txt with new build instructions Oct 19, 2018
ValyriaTear-Info.plist Started the app rebranding to Valyria Tear. Mar 24, 2012
ValyriaTear.cbp Updated the C::B file to latest changes. Feb 16, 2015
ValyriaTear.nsi First version of appveyor-ci.yml Nov 9, 2018
ValyriaTear.workspace Removed the unexisting Map_Editor.cbp file from the C::B workspace Oct 4, 2013
appveyor.yml First version of appveyor-ci.yml Nov 9, 2018 Added uninstall target to CMake. Nov 11, 2015
icon.rc Fixed windows icon location for C::B builds. Mar 14, 2015
valyriatear.appdata.xml Minor changes (not in C++) Oct 3, 2017
valyriatear.desktop Minor changes (not in source code) Aug 20, 2017

Valyria Tear

Valyria Tear is an open-source single-player medieval-fantasy 2D J-RPG based on an extended Hero of Allacrost engine and inspired by classic console RPGs.

The player incarnates Bronann, a young boy forced to take part into the struggle for the possession of a mysterious crystal. This powerful artifact will lead him to discover the actual threat set upon his world, but also courage and love.

The game has all the features you can expect from JRPG classics: entertaining story development, colourful map exploration, active side-view battles, character management, puzzles... It is also translated in several languages.


Copyright (C) 2012-2017 by Bertram
Copyright (C) 2004-2011 by The Allacrost Project

The source code is licensed under the GNU GPL. It is free software and you may modify it and/or redistribute it under the terms of this license.
See for details.

The graphics, sounds, musics and script files are licensed according to the LICENSES file.

While the scripts are under the GNU GPL, the story concept is copyrighted and cannot be reused as is or part of it in another project without the author's consent. This means you can package, and distribute Valyria Tear under the term of this license but you cannot take the story or parts of it in another project without agreement.

The game directories included and used are:
data/ po/

Compilation procedure

Linux compilation

Once you've unpacked the tarball, if you have checked it out from the Git repository, run this first to get the latest luabind code:
git submodule update --init --remote --force
and then the usual cmake . && make from the top-level directory at the prompt.

You'll then be able to play by typing: src/valyriatear

Windows compilation


A Code::Blocks project file is also provided when compiling under Windows. In that case, you might need the dependencies and headers files that can be downloaded here.


  1. Download and install MSys2
    1. Download MSYS2 from, either the 64 bit or the 32 bit version, depending on which type of build you want to create
    2. Depending on your version, install to C:\msys64 or C:\msys32
    3. Run C:\msys64\mingw64.exe or C:\msys32\mingw32.exe
    4. Follow the update steps. Running pacman -Syuu repeatedly and following the instructions on screen should do it.
  2. Install the toolchain and the dependencies
    1. Install the mingw64 toolchain (or mingw32 toolchain)
      • 64bit: pacman -S mingw-w64-x86_64-toolchain
      • 32bit: pacman -S mingw-w64-i686-toolchain
    2. Install CMake and all dependencies
      • 64 bit: pacman -S mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-boost mingw-w64-x86_64-SDL2_ttf mingw-w64-x86_64-SDL2_image mingw-w64-x86_64-glew mingw-w64-x86_64-libpng mingw-w64-x86_64-libzip mingw-w64-x86_64-lua mingw-w64-x86_64-libogg mingw-w64-x86_64-libvorbis mingw-w64-x86_64-openal mingw-w64-x86_64-libiconv
      • 32 bit: pacman -S mingw-w64-i686-cmake mingw-w64-i686-ninja mingw-w64-i686-boost mingw-w64-i686-SDL2_ttf mingw-w64-i686-SDL2_image mingw-w64-i686-glew mingw-w64-i686-libpng mingw-w64-i686-libzip mingw-w64-i686-lua mingw-w64-i686-libogg mingw-w64-i686-libvorbis mingw-w64-i686-openal mingw-w64-i686-libiconv
      • If any of the dependencies should be missing from the lists above, you can search for them on
  3. Configure the build
    • 64bit: cmake -G "Ninja" -DCMAKE_C_COMPILER=C:/msys64/mingw64/bin/gcc.exe -DCMAKE_CXX_COMPILER=C:/msys64/mingw64/bin/g++.exe .
    • 32 bit: cmake -G "Ninja" -DCMAKE_C_COMPILER=C:/msys32/mingw32/bin/gcc.exe -DCMAKE_CXX_COMPILER=C:/msys32/mingw32/bin/g++.exe .
  4. Run the build: ninja

Microsoft Visual C++ 2013 and later

(Warning: not officially supported!) Please contact authenticate for support.
To create a debug build on Windows with Visual Studio 2013, do this:

  • git clone
  • git submodule update --recursive --init --remote --force
  • Copy the contents of ValyriaTear-VS2013-Dependencies/ into a new folder ValyriaTearRepository/vs2013/libs in your Valyria Tear repository.
  • Copy the debug versions of all the dependencies' dlls into ValyriaTearRepository/vs2013/Debug
  • Open the VS 2013 solution file: ValyriaTearRepository/vs2013/ValyriaTear.sln
  • Build F7
  • Run F5

Mac OS X compilation

  • Use Macports or Homebrew to install things like boost.
  • Open Xcode project, to quickly update the files, delete the src folder in project and add it again. Remove all unnecessary things.
  • Press "Play"


You will need the following in order to compile and run the game:

  • Boost headers (Tested from 1.42 to 1.58)
  • GNU Gettext - (libiconv, libintl)
  • lua (5.1.x - 5.2.x - 5.3.x) - (liblua)
  • libz
  • libpng (1.2 to 1.6)
  • Ogg/Vorbis - (libogg, libvorbis, libvorbisenc, libvorbisfile)
  • OpenAL
  • OpenGL, GLU and GLEW
  • SDL (2.0.0+)
  • SDL_ttf (2.0.12+)
  • SDL_image (2.0.0)

Debug feature support compilation

  • Using CMake: Use the -D parameter when invoking cmake to add compilation flags.

  • Add debug menus, and debug commands: cmake -DDEBUG_FEATURES=on .

  • On Code::Blocks: Go to Project->Build options, and add the flags in the #defines tab, i.e.: DEBUG_MENU