fendrin/wesnoth-love
Wesnoth for Löve - port of Wesnoth to the love2d engine
Wesnoth for Löve 
Port of The Battle for Wesnoth to the Love2d Engine.
It is still in early development and not playable at this time.
License
W4L is licensed under the GPLv2+.
The distribution ships with several third party libraries,
have a closer look here for their License and Copyright information.
Discord Server
Please feel free to join the public Discord server to discuss Wesnoth for Löve.
Development Thread
Have a look at the Development Thread found on Wesnoth's Forums.
Installation
Players
Sorry, there is no stable release yet.
Testers
Windows
Fetch the wesnoth-love-win64.exe of the latest release at github.
The file is a self-extracting archive that should run on all Windows versions > XP.
Double click for extraction, then double click the "wesnoth-love.exe" inside the extracted "wesnoth-love-win64" folder.
Pure zip archives are also available.
Ubuntu
# love2d and dependencies of wesnoth-love
sudo add-apt-repository -y 'ppa:bartbes/love-stable'; sudo apt-get update
sudo apt-get -y install love lua-lpegFetch the wesnoth-love_all.deb of the latest release at github.
sudo dpkg -i wesnoth-love_all.deb
# start the game
wesnoth-loveMacOSX
Fetch the wesnoth-love-macos.zip of the latest release at github.
unzip and then TODO
Developers
General
This are general instructions, for specific operating systems have a look below.
- Install the love2d engine.
A version >= 11.1 is required. - Clone (recursive) the wesnoth-love
directory
from GitHub. - Install the dependencies
- Start the game by executing the love engine with the path to the wesnoth-love directory as argument.
Once downloaded and with the dependencies installed, a simple open click onto the wesnoth.love file in a filebrowser can be used to start the game on most systems.
Ubuntu
# love2d and dependencies of wesnoth-love
sudo add-apt-repository -y 'ppa:bartbes/love-stable'; sudo apt-get update
sudo apt-get -y install love lua-lpeg git
# fetch from github
git clone --recursive https://github.com/fendrin/wesnoth-love.git
# start the game
./wesnoth-love/wesnoth-loveHowl is a decent editor with Lua/Moonscript support.
Contribute
W4L comes with a low profile regarding the entry demands.
Human Skills
You need
- Basic understanding of git and github
- Language Skills
- Lua 5.1
- Moonscript 0.5 (very similar to Lua)
Contributions in both, Lua or Moonscript will be accepted,
although the Lua ones might be translated into Moonscript at a later time.
Development Setup
- Text Editor preferable with Lua/Moonscript support.
- A development installation of W4L
- Lua 5.1 (or luajit) with
- Busted unit test suite
- binop library
- moonscript
Hardware
- 1GB of extra hard drive space is more than enough for the whole setup.
- There is no extra demands to the cpu and ram than the requirements of the love2d engine itself.
Coding Conventions
- W4L uses an indentation level of 4 whitespaces.
- Use ldoc-style comments to document non-trivial sections.
- It can't hurt to implement busted unit tests.
- Prefer readability over optimizations.
- Naming Conventions
- class: PascalCase
- local variables/functions: snake_case
- constants: ALL_CAPS
Filename Extensions
- .lua
Files containing lua code. - .moon
Files containing Moonscript code. - .wsl
Wesnoth Script Language - Modified Moonscript with Macro support - .wesnoth
A file containing an add-on for Wesnoth for Löve - .love
A file containing a Löve Game (like W4L) - .md
Markdown File - used for documentation
Löve boot sequence
-
Löve loads in boot.lua:
- require "love"
-
love.boot() called -- (1st xpcall in boot.lua)
- Require love.filesystem
(the only module that you can't disable in conf.lua, it's mandatory) - Parse command line arguments
(they will reside in the global arg table) - Determine if game is fused or not
- Set game identity
- Early check whether main.lua or conf.lua exists or not
(if not, then errors later with the game being badly packaged)
- Require love.filesystem
-
love.init() called -- (2nd xpcall in boot.lua)
- Create default configuration settings
- Load in configuration settings from conf.lua if it exists
(or if love.conf exists, even without conf.lua) - Require modules
- Create event handlers
- Check version (compatibility related)
- Setup window (if window module is loaded)
- Set first timestep
- Require main.lua
(Loads in the body of main.lua) - Error if game is badly packaged.
-
love.run() called
-- (3rd xpcall in boot.lua (if using the default love.run))- seed löve's default PRNG
- love.load(args) -- (Actual game startup... usually)
-
loop:
- poll events -- (other love.___ callback functions)
- love.update(dt)
- love.draw
- sleep