Wesnoth 3D

Discuss the development of other free/open-source games, as well as other games in general.

Moderator: Forum Moderators

User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Wesnoth 3D

Post by Dugi »

Hello,

Lately, I was quite annoyed by a few conceptual issues in Battle for Wesnoth:
1. 2D graphics makes it look obsolete and browser-like even if they look good, just because they are 2D
2. Modifying a sprite requires a time-consuming modification of its animation and sometimes the animation is simply removed when new sprite is made
3. I have to wait till the AI makes its turn (sometimes, it's thrilling, sometimes it's like watching a soap opera)
4. If the player has a lot of advanced recalls, the enemies must have high level units too and you see an Orcish Warlord recruiting Orcish Warlords as fooltsoldiers
5. WML tempts to overuse macros, many people think that it's like in C where macros don't cause slowdowns

So I decided to fix them. I've made my own game, strongly based on Wesnoth, with differences focusing on removing these issues. These are the changes I've done or I am aiming for:
1. 3D graphics
2. All humanoid units sharing the same animations (it's 3D, it's possible) just with smaller changes like different combat style
3. Real time, but trying to be slow-paced to let the player position all units (because attacks can't be picked, I have stolen Xudo's idea to allow changing units' stance that determines what weapon they use)
4. Any unit types' difficulty can be easily adjusted to pose sufficient threat to players with advanced units (implemented only partially because units don't advance yet)
5. More RPG style advancing of recalls (not done yet, just the design expects that it will be added once), possibly allowed to be automated to suit those who don't like it
6. Using XML as WML because it's supported by many programs and does not allow macros.
7. Using a deterministic hit calculator that prevents two attacks with 50% hit chance from hitting a target both (could be removed...)

Of course, I haven't done all that. There is currently no story, no saving, no recruitment, no UI, no advancing. But the combat is working, units and animations are working, the terrain and environment is working (and could be will be working very good once I fix a few bugs related to it aside for mysterious terrain errors when switching areas), the AI is working but is quite dumb, units can be given commands, the game currently behaves like an open word free roam (since scenarios are not implemented)...

I haven't used any game engine because they tend to be expensive and/or very limiting and usually not open source. For graphics, I haven't messed directly with DirectX or OpenGL, I am using the Ogre3D graphics system to handle that. I have created most models myself, but there were three objects that were too hard and I could not model myself, so I used three downloaded blender models with suitable licenses. That also explains why sometimes the visuals don't meet the potential.

A few images (I am not quite sure why the images are compressed so much, it looks sharper normally):
Image
Attacking a castle, you can see some loyalist soldiers around, since I don't have anything like team colours yet, it's hard to tell who are attackers and who are defenders

Image
Who needs portraits when you can just zoom?

Image
Fighting some bandits in a forest (the branches and leaves of trees are invisible if they would obstruct the view, same for ceilings in interior)

Image
Fighting some hostile dogs, I have implemented animals too

Image
(May 5th) Now, I have an UI showing life (also currently unusable mana and stamina on allies), side (the colour of the frame of lifebar) and properties of units (if hovering over them with mouse), tombs and skeletons, support for heavier units (wider limbs) and two handed weapons.

Image
(May 29th) A battle in the underground parts of the castle. Showing new additions, like archery and commanding. The spikes around health bar indicate that the unit is in offensive stance (using weapon that is more aggressive).

Image
(July 24th) New spells and abilities. Spells cost mana and take a long time to cast, but typically hit multiple enemies and are hard to defend from (currently coded spells: fireball - impacts on target and deals splash fire damage, holy bolt - chases enemies, will seek new targets after hitting one with arcane damage; currently coded abilities: healing, leadership). The Acolyte unit is a level 1 White Mage, every faction needs a healer.

For closer future, I am planning to add some weapon specials and then do some unit advancing.

I am not using git or sourceforge, the project has just 5000 lines of code and 100 megabytes of graphics files (most of which are parts of models I haven't done very efficiently because I didn't know how to make them better back then). I am using Google Drive to backup the files and older versions. I am not looking for any cooperation yet, because there is not much code and most changes from one person would break changes by other people. I am not going to disclose the source code yet because there are a few severe bugs I am quite ashamed of (including a magnificent heisenbug appearing when trying to enter or leave an exterior area). Just telling what I am working on.

The program is written in C++ using its 2011 standard quite extensively (lambdas, nullptr syntax, std::thread, std::regex for terrain). Its performance is quite good, the main cause of FPS drops is grass, groups of units are handled quite well graphically (though AI has trouble with them, lags behind and causes OoS, but I guess that it's just crappy code). I am having around 30 FPS (around 100 FPS in interior areas) with all compiled in debug mode (should be like 30% of actual performance), running on a laptop whose video card is rather obsolete. An oncoming update to Ogre is told to improve performance by 100%.

Changes:
April 1st - initial post
April 1st evening - added some missing info (actual posting delayed to April 2nd due to forum downtime)
May 5th - an update, new features like skeletons, tombs, an UI showing units' sides and life and a load of bug fixes
May19th - an update, new features like archers and commanding
July 24th - an update, new features like spells and abilities
Last edited by Dugi on July 24th, 2015, 6:20 pm, edited 5 times in total.
User avatar
lipk
Posts: 637
Joined: July 18th, 2011, 1:42 pm

Re: Wesnoth 3D

Post by lipk »

Crap. You didn't fix the biased RNG. And seriously, no WYSIWYG campaign editor? Are we in 1995 or what?
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Wesnoth 3D

Post by Dugi »

Oh, I forgot about that. The hit chance is computed differently, each unit has its own entropy variable that ensures that it will not happen that two attacks with a 50% hit chance will both hit (or both miss). But I am considering removing it, I am not opposed to wesnoth's pure randomness.
User avatar
Astoria
Inactive Developer
Posts: 1007
Joined: March 20th, 2008, 5:54 pm
Location: Netherlands

Re: Wesnoth 3D

Post by Astoria »

3D wesnoth is sooooo 2010. All the cool kids are on the Wesnoth 4D bandwagon now. Step your game up
Formerly known as the creator of Era of Chaos and maintainer of The Aragwaithi and the Era of Myths.
User avatar
iceiceice
Posts: 1056
Joined: August 23rd, 2013, 2:10 am

Re: Wesnoth 3D

Post by iceiceice »

Dugi wrote: 3. I have to wait till the AI makes its turn (sometimes, it's thrilling, sometimes it's like watching a soap opera)
Computer-generated soap operas? Sounds... potentially hilarious :lol:
Dugi wrote: 5. Using XML as WML because it's supported by many programs and does not allow macros.
You could follow Anura's lead and use JSON rather than XML... (I really have no idea of the merits of either choice.)

Alternatively, use lua, then you don't have to write your own language which is most often a huge PITA to get working nicely...

Also I hope you are writing this in OCaml or Scala or Haskell. C++ is so 1995... My eyes just bleed when I see C++ programs.
Andrettin
Posts: 189
Joined: September 2nd, 2013, 5:40 pm
Location: Vienna, Austria

Re: Wesnoth 3D

Post by Andrettin »

At first I thought "wow, it must have taken a lot of effort to do this from scratch". And then I remembered what day it is.
User avatar
ancestral
Inactive Developer
Posts: 1108
Joined: August 1st, 2006, 5:29 am
Location: Motion City

Re: Wesnoth 3D

Post by ancestral »

Dugi, correct me if I’m wrong: this will absolutely require Occulus Rift, and will be a Facebook *exclusive* game, yes? Also, you will be eschewing the restrictive, unfair, socialistic plague of open source GPL by preserving the work with vastly superior proprietary controls and DRM always-online protection?
Wesnoth BestiaryPREVIEW IT HERE )
Unit tree and stat browser
CanvasPREVIEW IT HERE )
Exp. map viewer
User avatar
iceiceice
Posts: 1056
Joined: August 23rd, 2013, 2:10 am

Re: Wesnoth 3D

Post by iceiceice »

The "real" WTFPL:
0. By downloading this game, you agree that Dugi Games LLC shall become sole proprietor of your immortal soul.
User avatar
Astoria
Inactive Developer
Posts: 1007
Joined: March 20th, 2008, 5:54 pm
Location: Netherlands

Re: Wesnoth 3D

Post by Astoria »

I downloaded it but it seems I'm missing the dependancy nsa_backdoor_2015. Does anyone know where I can download that?
Formerly known as the creator of Era of Chaos and maintainer of The Aragwaithi and the Era of Myths.
User avatar
GunChleoc
Translator
Posts: 506
Joined: September 28th, 2012, 7:35 am
Contact:

Re: Wesnoth 3D

Post by GunChleoc »

If you wrote this in Cobol or Fortran, I'd be really impressed. Dugi rulez!
bumbadadabum wrote:I downloaded it but it seems I'm missing the dependancy nsa_backdoor_2015. Does anyone know where I can download that?
Oh, come on, any child could find that.
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Wesnoth 3D

Post by Dugi »

iceiceice wrote:You could follow Anura's lead and use JSON rather than XML... (I really have no idea of the merits of either choice.)
XML is more human readable and allows more stuff. I also like how you can write whole tags with several parametres on one line.
iceiceice wrote:Alternatively, use lua, then you don't have to write your own language which is most often a huge PITA to get working nicely...
lua is nice, but I don't know how would I write its version of UnitWML or TerrainWML in lua. But when I come to doing something like ActionWML, I will surely consider it.
iceiceice wrote:Also I hope you are writing this in OCaml or Scala or Haskell. C++ is so 1995... My eyes just bleed when I see C++ programs.
Haskell isn't bad, but C++11 is from year 2011, so it's newer.
ancestral wrote:Also, you will be eschewing the restrictive, unfair, socialistic plague of open source GPL by preserving the work with vastly superior proprietary controls and DRM always-online protection?
Well, at this point it's up to me if it's going to be GPL or something else, all resources are compatible with both.
iceiceice wrote:By downloading this game, you agree that Dugi Games LLC shall become sole proprietor of your immortal soul.
Hey, don't disclose that!
bumdadadabum wrote:I downloaded it but it seems I'm missing the dependancy nsa_backdoor_2015.
Download it from this amazing website.
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Re: Wesnoth 3D

Post by Dave »

Dugi wrote:XML is more human readable and allows more stuff. I also like how you can write whole tags with several parametres on one line.
:?: :?: :?:

Please tell me this is some kind of April Fool's humor. :(
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Wesnoth 3D

Post by Dugi »

You're breaking the joking tone of this topic...
If you really want to see why I think so:
Andrettin
Posts: 189
Joined: September 2nd, 2013, 5:40 pm
Location: Vienna, Austria

Re: Wesnoth 3D

Post by Andrettin »

Dave wrote: :?: :?: :?:

Please tell me this is some kind of April Fool's humor. :(
Reminds me of when Firaxis used XML for its Civ4Col database but forgot to make it parse comments properly.
User avatar
iceiceice
Posts: 1056
Joined: August 23rd, 2013, 2:10 am

Re: Wesnoth 3D

Post by iceiceice »

bumbadadabum wrote:I downloaded it but it seems I'm missing the dependancy nsa_backdoor_2015. Does anyone know where I can download that?
I think you can just install skype and you should be good to go :P
Post Reply