Code Monkey home page Code Monkey logo

haldric's Introduction

License: GPL v2

Branch CI status
Master CI
1.18 CI

About

The Battle for Wesnoth is an Open Source, turn-based tactical strategy game with a high fantasy theme, featuring both singleplayer and online/hotseat multiplayer combat. Fight a desperate battle to reclaim the throne of Wesnoth, search for the key to immortality, or take part in any number of other adventures.

Community

The official Battle for Wesnoth Forums: https://forums.wesnoth.org/

Discord: https://discord.gg/battleforwesnoth

IRC: https://wiki.wesnoth.org/Support#IRC

Mastodon: https://fosstodon.org/@wesnoth

Steam forums: https://steamcommunity.com/app/599390/discussions/

Features

  • A variety of different campaigns, each with their own tactical challenges, emotionally charged story, and multiple difficulty levels.
  • A detailed world and storytelling with hundreds of sprites, animations, and characters.
  • Many different unit skills and traits across several factions.
  • A map editor with multiple tools, hundreds types of terrain, and the ability for you to save and share maps with others. Create your own scenarios/battles for near infinite replayability.
  • Highly moddable, allowing a wide array of community created map packs, eras, and entire campaigns.
  • Online and local multiplayer gameplay to play with friends, strangers, or against the AI.
  • Changeable settings for base gameplay, with nearly limitless options for different hotkey configurations.
  • Beautifully composed playlist that captures the era and grandiosity of this lore-filled high-fantasy world.

Installing

Wesnoth can be played on Windows, macOS, and Linux, and can be installed using:

Additionally, Wesnoth is available for iOS and Android.

To build the game from source, see INSTALL for instructions.

Contributing

Wesnoth is most in need of skilled C++ developers (C++14 and later), however there are things that nearly anyone can help with:

  • Simple tasks in C++.
  • The Lua and WML used for content scripting.
  • Python used by various external tools.
  • Even play testing and giving feedback on updated campaigns!

Additionally, Wesnoth lacks art for a variety of unit animations - anyone who would be interested in lending a hand in updating existing unit sprites or creating animations should take a look at the Art Contributions forum as well as contact our current art director.

See also: CONTRIBUTING

For any questions, the best place to start is to simply join Wesnoth's forums, Discord, or IRC and start asking!

Donations

Donations can be sent via Software in the Public Interest, Liberapay, as well as when downloading through itch.io. All money donated is used to pay for project expenses such as server rent and art commissions, and is very much appreciated.

License

All source code is licensed under the GNU GPL v2+. Most art and music is also licensed under the GNU GPL v2+, however new contributions are now licensed under the Creative Commons BY-SA v4.0. For more detailed information on Wesnoth's licensing, see the wiki:

https://wiki.wesnoth.org/Wesnoth:Copyrights

More Information

For extensive documentation about all aspects of the game, see the official Battle for Wesnoth web site:

https://www.wesnoth.org/ https://wiki.wesnoth.org/

A (translated) description of how to play the game can be found in doc/manual/manual.*.html, or online at:

https://wiki.wesnoth.org/WesnothManual

For information on creating your own maps, scenarios, and other content, see:

https://wiki.wesnoth.org/Create

Gallery

screenshot_main_menu scrreenshot_isars_cross screenshot_campaign_menu screenshot_map

haldric's People

Contributors

0x72d0 avatar byteron avatar clutteredmind1 avatar coelhucas avatar db0 avatar derkus avatar elvish-hunter avatar hrubymar10 avatar imperators79 avatar iwek7 avatar jay20162016 avatar jswise avatar lawncable avatar lefev avatar matheuspese avatar pentarctagon avatar rosscg avatar soliton- avatar vultraz avatar yeldhamdev avatar zozer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

haldric's Issues

Moving paths into units

Currently, there is just one "active_unit_path" variable in Game.gd, which causes some trouble when this variable gets changed while a unit is currently moving, e,g when selecting and moving a different unit or ending a turn meanwhile.
Thus, I think it would be good to move the path that a unit should walk onto into the unit itself. This way, there should be no "collisions" while having multiple units walking (if that'll be a thing) or doing something else which causes active_unit_path to overwrite be overwritten while a unit is still moving.

Graphical bug with campaign card

when I was playing a little bit with the lobby I found by quickly spamming on the campaign card that we can let the card keep their expanded size:

Screenshot_2019-08-26_18-16-42

Recruitment

Sides shall be able to recruit units.

For this we need factions a side can choose from.
these factions define the leader and recruitable units of a side.

I am thinking a RFaction class, extending Resource.
these would contain all information needed and would be loaded into a side.

Settle on a project license

There was a fair amount of discussion about this on Discord the other day, but this prototype(and the eventual full implementation, if that happens) really needs to settle on the project license sooner rather than later.

For art/music, it's fairly straight forward: anything taken from Wesnoth 1 remains under the same license, whether it's the GNU GPL v2+ or CC BY-SA 4.0. Anything new is under the CC BY-SA 4.0.

For code though, it becomes more complicated, but some things that need to be considered are:

  • Linking to non-free libraries, such as the SteamWorks SDK or Discord's Rich Presence.
  • The license of Godot add-ons, such as the YAML parser.
  • Any modules we may need to create ourselves. Particularly this would include MySQL functionality to query Wesnoth's forum database as well as potentially a lua module for UMC scripting, depending on if any of that code would be taken the Wesnoth 1 codebase.
  • There are more options than just the GPL or CC suite of licenses, such as MIT, Apache, WTFPL, etc.

On-Map Unit Plate

Currently the Unit Plate (which shows life / experience / side) of units is created inside of the Unit.tscn.

However, since it's a UI element, I think it should be decoupled from the Unit.tscn and moved to GameUI.tscn.

It would suggest to use a RemoteTransform2D as hook InterfaceHook inside the Unit.tscn, and then create a Unit Plate inside GameUI and t set it to remote_path of that unit. This way it's drawn by the GameUI but should still follow the units.

AMLA

AMLA -> At Max Level Advancement, means, when advancing, the unit type stays the same, but the unit heals and slightly increases both max health and max experience.

There was talk about an overhaul for how AMLA works.
Suggested was a more advanced AMLA system, closer what is implemented for certain characters in UtBS.

Let's discuss.

Pause menu improvements

  • Add a backdrop to make it clear that the game is paused
  • Painting in the mapeditor should not be possible while pause is active
  • Currently moving units should pause
  • and mouse hovering should not select/highlight anything

for Idle animations, they could continue to play, but they could also pause, I don't know which one is better 😄 - let's discuss it below.

Roadmap for Wesnoth 2.0 Alpha

Wesnoth 2.0 Alpha

Gameplay

Classic

  • upkeep
  • rest / village healing
  • advancement (#56)
  • AMLA (#62)
  • combat (#57)
  • recruitment (#58)
  • factions (#58)
  • traits (#84)
  • abilities (#20)
  • weapon specials ( #59)
  • recalls (#60)
  • define next scenario for campaigns
  • AI

New Mechanics

  • Inventory (#66)

Terrain

  • add missing terrains
  • two-way transitions (#64)
  • to-terrain transitions (#65)
  • mulit-hex terrains
  • castles
  • animated terrains

Map Editor

  • define ToD schedule
  • define number and start positions of sides

Interface

  • define main menu visuals
  • define game HUD visuals
  • scenario settings (selectable factions, gold, income, stuff)
  • story screen for campaigns

WDK (Wesnoth Development Kit)

We should set this up and use it for core content as well.

  • create units
  • create scenarios
  • create campaigns
  • create events

Networking

  • MP Matches
  • MP Moderation Tools
  • ? Player Profiles (SteamWorks?)
  • ? MySQL Module

Content

Units

  • Rebels
  • Undead
  • Loyalists
  • Knalgan Alliance
  • Drakes
  • Northerners
  • Dunefolk

Campaigns

  • Heir to the Throne

I18N

It may not be fully translated, but it should at least use it to proof concept

  • English
  • German

load terrain dynamically

Right now we have static tilesets for both terrain tiles and transitions.
We should create these tilesets on startup based on the images available in the images/terrain/ folder.

Campaign language

Since GDScript is being used for mods, what language is going to be used for campaigns? Is it going to be in the same format as the test campaign?

detecting map dimensions

It seems

func _update_size():
	width = get_used_rect().size.x
	height = get_used_rect().size.y

in Map.gd does not work properly.
It is supposed to get the dimensions as a rectangle of the map from (0, 0) to what ever extend the tiles are present.

It's quite important to get the map dimensions right, so someone should have a look at it.
(this is mostly because I go to sleep now and want to remember this issue, hah!)

Poor performance on integrated Graphics

When I run it from the editor loading a game screen takes long sometimes I get the whole game to freeze for a few seconds.
Loading the test scenario has loads without user feedback ~6 seconds after the progress bar is already done.
Also I only get like 36 fps in the test scenario and drops when i move units as low as 26 fps.
The exported version is only like 6 fps better but still drops down to 27.
(I'm on a laptop using Linux)

Anyways Performance on lower end hardware is also an important thing we should keep in mind.

Combat

Units shall be able to battle.

  • Attack enemy units
  • choose between attacks
  • give xp on kill
  • give xp equal to opponent level if opponent does not die
  • respect defense and resistances

Path finding finds suboptimal path

Screen Shot 2019-08-26 at 15 51 44

For some reason in case when it's possible to get into the point with high movement cost directly, path generated via point with low movement cost.

To-Terrain Transitions

We need terrains that draw specific transitions only to specific terrains, such as grass-to-water and so on.

FoW not updating correctly after attacking

I think this bug is something new but I'm not sure.
There is issue with showing FoW turn after attacking:

image
As you can see vision range is 0 for some reason.

What it should look like:
image

Steps to reproduce:

  1. launch test campaing
  2. approach enemy with scout
  3. attack enemy
  4. end players turn
  5. end enemy turn
  6. observe FoW issue

Income & Upkeep

Player needs to receive income based on the number of villages they control. Player needs to pay upkeep based on the number of units they own

  • Income is: 2 base + 1 per village you control
  • Upkeep is: 1 gold per unit level
  • Unit with Loyal #84 Trait and Leaders do not cost upkeep

draw_arc is not declared in the current class

Just cloned this project and loaded it in godot and tried to run it. It crashes on

draw_arc(center, center.x / 2, deg2rad(angle_step * i), deg2rad(angle_step * (i + 1)), 360, times[i].color, center.x, true)

Method 'draw_arc' is not declared in the current class

Very new to godot, so it could be I have a dependency problem that i'm not sure how to resolve.

Checked the contributing guide but didn't see anything about dependencies or a getting started guide or anything

Two-Way Transitions

In 1.x we have certain terrains that draw transitions both ways, especially the grass terrains.
We don't have any way to do that in haldric right now.

Proposal: Stackable Units

Currently units of a player are able to:

  1. move through other units
  2. get stuck on a tile where a unit already stands on, when the ZoC of an enemy unit kicks in

That needs to be fixed.

CONTRIBUTING guide?

This project doesn't seem to have a CONTRIBUTING.md file, so it is not clear how to get started.

Please add a contributing file describing how to run the game in development mode, create assets, and other critical tasks. This way, new contributors can quickly get started.

Inventory

There was talking about supporting inventories / items.
This may be an issue about discussion about how that could look like, and how it may be implemented.

Traits

As per the original: When units are recruited they should receive 2 traits from a random choice selection according to their race (e.g. Strong/Intelligent/Resilient etc). Undead should receive only 1 trait always: Undead

Advancements

When the experience of a unit reaches it's maximum, a unit shall advance.

  • advancing to a higher level unit
  • possibility to choose between multiple advancements

Abilities

Discussion and implementation of abilities like healing, curing, regenerating and such for units.

I would approach it similar to the current implementation of attacks.
We have a base Ability Scene (plain Node with Script). For a new Ability, you add a new Node to the Abilities Node in UnitType and attach a script that holds the logic of the wished ability.
New abilities would be script only, extending from a base Ability.gd script to ensure basic functionalities/structure.

Main menu freezes when coming back to Home

If you select other option, like "Campaigns" and then select "Home" back, the whole menu freezes.
I run it in Godot 3.1.1 stable with the following set up:

Ubuntu 18.04.3 LTS 64bits
7.7GB of DDR3 RAM
Processor Intel® Core™ i5-4210U CPU @ 1.70GHz × 4
Graphic Card GeForce 940M/PCIe/SSE2

Lua API

This is for both discussion and implementation of the Lua API, which is needed for scripting scenarios and campaigns in mainline and UMC

(will update updated frequently, as discussion goes on)

Wrong assignment during recruit

Tried the new recruiting code with 3.2. Got the following error

Trying to assign value of type 'Node2D' to a variable of type 'PackedScene'.

Looks like it's coming from: res://source/interface/hud/UnitRecruitmentCard.gd line 12

var unit_type: PackedScene = Registry.units[unit_type_id].instance()

pause between unit steps

When moving a unit, it seems there is a pause between the unit arriving a tile and start moving to the next tile.

This happens since we introduced FSM to Unit.tscn

Note: Currently the tween is set to TRANS_SINE. This pause also happens when it's set to TRANS_LINEAR.

it appears to be a severe performance drop, so it should definitely be investigated further.

Add Godot/GDScript/C# learning resources to CONTRIBUTING.md

Some people would like to help contributing to the Haldric engine, but they might never have used Godot so far. Would it be possible adding to the CONTRIBUTING.md file (or to another file, in case that one becomes too long) a list of good resources to learn how to use Godot and how to program in GDScript and C#?

Godot engine things we'd like to fix

Just a reference list of features we'd like or bugs we come across in Godot that we should either try to implement open issues about.

  • Better Easing interface in the Animation player.
  • A Close All Scenes context option.
  • Vertical GradientTextures.
  • Better interface for when nodes are automatically removed when editing an instantiated scene.
  • Move Signal and Group tab icons closer to their text so it doesn't look like there are 4 buttons.

unit visibility

Units from side 2 can see units from side 1, but units from side 1 cannot see units from side 2 for some reason.

Learning from old mistakes

We discussed the things that we want to have in our prototype. What might also be interesting to know, especially for the new volunteers, is what mistakes we don't want to repeat, which have been made in the Wesnoth 1.x. series.
So please, go ahead and tell us what the mistakes there were and how we could improve on that!

Long Initial Load on Test Scenario

The first load of the scenario takes long: after the progress bar is finished it takes up to 15 seconds until its loaded, if we need that time, a second progress bar for these additional would be appreciated.
When I quit to the main menu and open it again, I see the level nearly directly after the progress bar reaches 100%.

Weapon Specials

Weapons shall have specials to them, such as poison, charge, etc.

I am thinking a class WeaponSpecial extending Node which provides base functionality, such as a virtual -execute function that shall contain the logic.

To add a Weapon Special, a simple Node would be added to the Attack node, with script extending WeaponSpecial containing the logic.

Potential new Mechanics

I'll leave this issue here as collection of features and new mechanics that come up during development.

So far we have

  • inventories for units
  • UtBS like AMLAs.
  • terrain abilities / traps
    - area attacks
    - true ranged attacks
    - stackable units

Map is redrawn three times per rendering loop

Hi,

I am not an expert in graphics engine, but since I got terrible performance running haldric on my old laptop (13 fps while it is 40 fps with main wesnoth), I decided to run it through renderdoc on my other computer to see what is happening.

Since renderdoc does not support capture with OpenGL 2, the capture is full of not batched drawcall (The tilemap seems to be drawn with one drawcal per hexagon using the godot GLES3 renderer ! But the GLES2 godot renderer supports batching :/).

But what seems the strangest to me is that the map is drawn entirely three times per "rendering loop": once for the main map, once for the unit zoom and once for the minimap.

I guess you could renderer the minimap to a texture and display it, use that texture as a base to draw the full map to a texture and display it, and use that final texture to draw the unit zoom, thus dividing the amount of draw calls per loop per three (I think in godot you could use godot "viewports" to do this ? -> https://docs.godotengine.org/en/stable/tutorials/viewports/viewports.html).

I hope I did not bother you recalling something you already knew ^^.

Thanks for the amazing work on wesnoth 👍.

Healing

Units need to be able to heal HP. Basic methods (i.e. without involving abilities or traits)

  • A unit that does not move or is involved in an attack heals 2 HP on its next turn
  • A unit which starts its turn in a village or oasis, heals 8 HP

Recalls

When having multiple scenarios (generally like in a campaign), players shall be able to recall units from previous scenarios.

World Scaling

I once read that one hex tile in Wesnoth is about one mile in length. Given that a day in Wesnoth usually lasts 6 turns, and in each turn the usual infantry moves 5 tiles, this is about 30 hexes / miles per day, (if moving 24/7), which does seem reasonable to me.
What does not though, is the fact that characters in campaigns use to talk to each other without issues even though there are several hexes, thus miles, between them.

Since we're doing this game pretty much from scratch and we also talked about new HD terrain, we could rethink the scales of a hex. Units are treated as single persons all the time already, so we might actually make them single persons, and a single hex tile could me meters, not miles, as an example.

What are your thoughts about this? Your ideas?

Keep all methods of Control in mind

Namely those would be:

  • Mouse only

  • Mouse + Keyboard shortcuts

  • Touch only

  • Keyboard only

  • Gamepad (like xbox 360 / ps4 controller)

bold stands for important, italics stands for would be nice

It is possible to stop on another unit

When unit with higher sight spots enemy unit when he is on the tile with another unit it looses selection and stops.

  • - It shouldn't be possible to stop on another unit.
  • - Unit shouldn't loose selection.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.