[DIY] making html5 wesnoth-themed roguelike

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

Moderator: Forum Moderators

Post Reply
goblinThing
Posts: 32
Joined: May 5th, 2013, 6:26 pm

Re: [DIY] making html5 wesnoth-themed roguelike

Post by goblinThing »

Shadow_Walker wrote:Right, some spell effects were messed up. Proper effects are:
- Entangled = target has reduced damage (1/2), and penalty to armor (subtract 50%)
- Sleep = target armor set to -50%, because unit is helpless
- Shadows = own armor is set to 80%
( help dialog extended with damage and armor modifiers )

Spells were fixed, web version patched in situ, with no version increment. Bundles are still buggy - will update with the next "major" release.
Note that magic shops will now buy back unused scrolls at a slightly reduced price.. see and click that "mode" button to alternate between buying and selling.

Lvl2 skeleton archer is really deadly at night, allright. With up to x2 night damage modifier (Undead night bonus), Armor Piercing trait (halves opponent's armor, unit bonus) and regeneration (Undead night bonus) it becomes really deadly for low level adventurers. Isn't it fun? :)
I'd recommend to plan your nights carefully.. Use Shadows spell to increase your armor to 80% (terrain independent), don't get caught in open - use terrain obstackles to hide from archers.

For now, I do not worry much about balance. Game is still in alpha stage: new features being added. As soon as major features are in and obvious nuts and bolts are tightened up, we will revisit game balance.

DISCLAIMER extention: Warning! Reading game code at this stage may have a devastating affect on your ability to program things, or even perform simple logical actions in real world. Printed excerpts from this code were 100% successful in scaring away erratic crows, hungry mosquitoes, reckless chipmunks and other dangerous species - proven by repetitive backyard tests.
Lol! Dang, where can I get some of that for my yard? I'd kill for a copy for hikes...
optimother
Posts: 76
Joined: July 12th, 2014, 4:09 am

Re: [DIY] making html5 wesnoth-themed roguelike

Post by optimother »

Shadow_Walker wrote:Right, ... Spells were fixed, web version patched in situ, with no version increment. Bundles are still buggy - will update with the next "major" release.
Note that magic shops will now buy back unused scrolls at a slightly reduced price.. see and click that "mode" button to alternate between buying and selling.
Awesome!!

I think sell price should be 50% of purchase, now you make too much money by selling some scrolls.
Lvl2 skeleton archer is really deadly at night, allright. With up to x2 night damage modifier (Undead night bonus), Armor Piercing trait (halves opponent's armor, unit bonus) and regeneration (Undead night bonus) it becomes really deadly for low level adventurers. Isn't it fun? :)
It'd be fun if you'd be in a real danger (say 1hp, or something) but still with a little chance to continue playing, otherwise you essentially have to <space> until the dawn if you see a undiscovered red dot on the minimap, or don't remember exactly what it is. Not exactly my definition of fun, it's what I call binary gameplay :)
I'd recommend to plan your nights carefully.. Use Shadows spell to increase your armor to 80% (terrain independent), don't get caught in open - use terrain obstackles to hide from archers.
I'll try with shadows, didn't know that.
For now, I do not worry much about balance. Game is still in alpha stage: new features being added. As soon as major features are in and obvious nuts and bolts are tightened up, we will revisit game balance.
It's hard to make it balanced in a one day, but balancing it incrementally eventually ends up in a balanced game :)
DISCLAIMER extention: Warning! Reading game code at this stage may have a devastating affect on your ability to program things, or even perform simple logical actions in real world. Printed excerpts from this code were 100% successful in scaring away erratic crows, hungry mosquitoes, reckless chipmunks and other dangerous species - proven by repetitive backyard tests.
Ouch! I just wanted to find out what exactly the spells do, how do I take this curse away now?

Look what at what a nice spot orcs respawn in 0.35319093707948923 :)

Couple more ideas: purchase telescope in shops, increasing your sight by .1, tighter string for little range increase? :)

And some more:
1) I find it easier and faster and, most important, more reliable to play with keyboard, because one mis-click and my lvl 23 mage with tons of hp dies because steps toward skeletons instead of shooting them. It would be nice to have possible targets bound to keys 1,2,3.. to 'type' their numbers instead of aiming them (or even simpler 'a' for AutoAttack, shooting the same as mirror image would do), which I discovered I'm not good at :) Instant spells can be bound to some keys too maybe, so that you walk with right hand, attack/cast spells with left, easy and fast.
2) Mage can fly to mines and complete dwarf's quest, it's bug or feature?
3) I find tornado spell the best by a huge margin. It puts some good damage and moves melee fighters to the perfect distance of 2 shots. Maybe it should be more expensive? Of course mirroring level 30 can be more devastating, but the stupidity of mirrors makes tornado much more fun.
4) If you walk through the forests and mountains by casting tornado every time it's ready you make a noticeable change to the terrain which is not reflected on the minimap (same for meteor and rain)
5) As a mage, you can't sell spell scrolls which puts it into somewhat inferior position: suppose you have 11 mirrors (which you can sell for good money) and by picking one more you lose them all. And about the rate mage learns spells, it seems to be too fast. Maybe limit 1 spell/per 2-3 levels?

gg!
Shadow_Walker
Posts: 80
Joined: July 27th, 2014, 4:34 pm

Re: [DIY] making html5 wesnoth-themed roguelike

Post by Shadow_Walker »

My daytime work is messing up W.Essense release schedule. I won't have much time for development for the next two weeks, so here is the last minute feature-packed release of W.Essense. For some time, I will make bugfix releases only. This is probably a good thing, since there are quite a few hinted but unattended issues. Soo...

W.Essense v0.86a released:
http://www.wessense.org/

Bundles:
Linux64: http://wessense.org/binaries/wessense-0 ... x64.tar.gz
Mac: http://wessense.org/binaries/wessense-0.86a-mac.zip
Win: http://wessense.org/binaries/wessense-0.86a-win.zip

Features:
[x] new monsters added, now there are 89 distinct unit types in game.
[x] Bleeding: hand-to-hand attacks may leave bleeding wounds - causes periodic loss of HP unless cured with potions, Heal spell or village (or time).
[x] Poison & Entangle attacks: some units can now poison player with their attacks, others may even entangle player with roots and nets.
Could be cured with potions, Heal spell, village - you got it, right?
[x] Evil Boss has moved into a brand new castle, with a granite throne and hardstone floors!
[x] Bad End: there are "Start New Game" OR "Resurrect Hero" options available now.
Latter allows to resume game after sudden death.. at starting position, with no gold, no spells, no exp for this level, and penalty applied to attack/defense/armor/hp. Don't tell me that I will be eternally tortured in hell becaused your superhero died of poisoning in the middle of the night, surrounded by orcs and ghosts - just resurrect hero, and resume mass destru... ahem.. your Quest, of course.

Updates and Bugfixes:
[x] Some neutral monsters became aggressive (and/or received poisonous / entangling attacks).
[x] Dwarves receive x2 gold coins for treasure and gold piles found.
[x] Terrain-changing spell effects are now reflected on worldmap and minimap.
[x] Portraits were converted from PNG to GIF format - now it takes 2MB less to download, which matters for online version.
[x] Caged Unicorn was autokilled by guards due to its "friendly" status - fixed.
[x] Good Ending was updated with quest/game statistics window.

Image

Huge Thanks to optimother for testing! I am making notes of what you have found, but had no time to go through full list yet.
User avatar
ChaosRider
Posts: 846
Joined: April 15th, 2012, 1:15 pm

Re: [DIY] making html5 wesnoth-themed roguelike

Post by ChaosRider »

As for me worsed here units are melee fighters, ranged have here easier.

Mage - well, thats a funny char, i made a spam of my clones, so i didnt had problems with enemies but only with moving.
Archer elv - damn his ciritic is op a lot, i would prefer to make it smaller and maybe increase his range.
Dwarv - not that bad, his ranged attack (with more strikes than 1) is quite usefull.
Thief - ach, here i had a lot to walk, also i was using ai stupidy because melee can fights only from n,w,e,s but ranged units can also strikes from nw,sw,ne,se, so when such ai stand on such a positions (from our unit on nw,sw,ne,se) then we can strike him without any problems and he cant move to use cause on our n & e positions we have impossible to move for ai unit terrain.

Sometimes game is blocking and you have to start it again from 1 lvl (thats a terrible thing), i thing you could add using here coockies to be able to save it.

As for me i would decrease size of that all icons and words (also spells icons), they are too big and units who strike on long distance not allways can use that advange in battle.

As for spells i would add here mouse right click to cancel spell casting (i was trying to do this but i couldnt).

For a monsters new images you should check Modified World Conquest Part 2 addon from addon server.
Creator of WOTG (+2880 units), MWC (+615 units), SurvivorsArea, RandomColosseum, RC WOTG, RC MWC, ColosseumRandomClonesBattle, BetweenDarknessAndLight, StealingWeapons, MoreUnitsForms, MoreDamageTypes, CanBeOnlyOne, ColosseumOneWinner, BonusSpam, CriticalStrike - available at 1.12 Wesnoth server.
Shadow_Walker
Posts: 80
Joined: July 27th, 2014, 4:34 pm

Re: [DIY] making html5 wesnoth-themed roguelike

Post by Shadow_Walker »

ChaosRider wrote:Sometimes game is blocking and you have to start it again from 1 lvl (thats a terrible thing), i thing you could add using here coockies to be able to save it.
Save & Reload is against Rogue-like rules.. Die and Be Resurrected with penalties (as in latest version) is much closer to the original style.
ChaosRider wrote:As for me i would decrease size of that all icons and words (also spells icons), they are too big and units who strike on long distance not allways can use that advange in battle.
Heh. Alternatively, you can make game field smaller.. Try [options] (right under the portrait) -> [zoom out]
ChaosRider wrote:As for spells i would add here mouse right click to cancel spell casting (i was trying to do this but i couldnt).
Eventually, it may be implemented, but to keep things in style, it should have 50% chance of really nasty effects on player. Magic Rutuals cannot be cancelled in a snap, powerful energies are involved into spell crafting. Whole visible World is at risk when spell is cancelled. Or it is something else, even more terrifying..
ChaosRider wrote:For a monsters new images you should check Modified World Conquest Part 2 addon from addon server.
Will do, thanks. Now I only need to guess correctly which one out of 13 addon versions has it..
Shadow_Walker
Posts: 80
Joined: July 27th, 2014, 4:34 pm

Re: [DIY] making html5 wesnoth-themed roguelike

Post by Shadow_Walker »

optimother wrote:Couple more ideas: purchase telescope in shops, increasing your sight by .1, tighter string for little range increase? :)
This is possible.. Say, as an extra item/stat in a weapons shop.
optimother wrote:And some more:
1) I find it easier and faster and, most important, more reliable to play with keyboard, because one mis-click and my lvl 23 mage with tons of hp dies because steps toward skeletons instead of shooting them. It would be nice to have possible targets bound to keys 1,2,3.. to 'type' their numbers instead of aiming them (or even simpler 'a' for AutoAttack, shooting the same as mirror image would do), which I discovered I'm not good at :) Instant spells can be bound to some keys too maybe, so that you walk with right hand, attack/cast spells with left, easy and fast.
Key bindings and keyboard in general - not sure. Auto attack when enemy is in firing range is possible - will implement. Spells - again, need to understand how to avoid keyboard as much as possible.
optimother wrote:2) Mage can fly to mines and complete dwarf's quest, it's bug or feature?
Bug. Will fix.
optimother wrote:5) As a mage, you can't sell spell scrolls which puts it into somewhat inferior position: suppose you have 11 mirrors (which you can sell for good money) and by picking one more you lose them all. And about the rate mage learns spells, it seems to be too fast. Maybe limit 1 spell/per 2-3 levels?
Limit learning by levels gained is a great idea! Will come with the next release. As for trade - well, being mage is tough. No time to barter, as spellcraft takes all spare time.. :)
User avatar
ChaosRider
Posts: 846
Joined: April 15th, 2012, 1:15 pm

Re: [DIY] making html5 wesnoth-themed roguelike

Post by ChaosRider »

This time its blocked me in game with 20 lvl assasin and 2 clones near him, and i cant do anything cause its enemy turns: "Current Turn: Enemy Units". Thats why some saves or quicksaves could be really usefull.
Attachments
Bez tytułu.png
Creator of WOTG (+2880 units), MWC (+615 units), SurvivorsArea, RandomColosseum, RC WOTG, RC MWC, ColosseumRandomClonesBattle, BetweenDarknessAndLight, StealingWeapons, MoreUnitsForms, MoreDamageTypes, CanBeOnlyOne, ColosseumOneWinner, BonusSpam, CriticalStrike - available at 1.12 Wesnoth server.
Shadow_Walker
Posts: 80
Joined: July 27th, 2014, 4:34 pm

Re: [DIY] making html5 wesnoth-themed roguelike

Post by Shadow_Walker »

ChaosRider wrote:This time its blocked me in game with 20 lvl assasin and 2 clones near him, and i cant do anything cause its enemy turns: "Current Turn: Enemy Units". Thats why some saves or quicksaves could be really usefull.
Hmm.. Your screenshot puzzles me. Game may have stuck in that mode if some combat animation happened off-screen, but it looks like there was no actual combat going on, right? Did you have more clones who may have been killed off-screen same turn? Or any other action happening about 10 tiles away from your character?
User avatar
ChaosRider
Posts: 846
Joined: April 15th, 2012, 1:15 pm

Re: [DIY] making html5 wesnoth-themed roguelike

Post by ChaosRider »

I had only 2 clones near my unit as on ss, i just create them after reach 20 lvl, its a third time when after reach some lvl just like that game stuck. I had a situation when i was spaming mage clones (i had them 30 if not more) then it was normal that i have to wait 2-10 seconds but not longer.
As about saves i dont think to do save & reload all the time, but for such a situations it could be usefull, also to not spam saves you could make it works as a spell, allow it again to use after some value of passed turns from last using it.

Edit: I think you could also while day increase some units range of vision to let them earlier start chasing player unit.
Elves while night should see more than other classes thx ultravision.
Why wose cant move on forest terrain, thats interesting for me, its like a troll couldnt move on mountains terrain (but he can).
Creator of WOTG (+2880 units), MWC (+615 units), SurvivorsArea, RandomColosseum, RC WOTG, RC MWC, ColosseumRandomClonesBattle, BetweenDarknessAndLight, StealingWeapons, MoreUnitsForms, MoreDamageTypes, CanBeOnlyOne, ColosseumOneWinner, BonusSpam, CriticalStrike - available at 1.12 Wesnoth server.
Yomar
Posts: 344
Joined: October 27th, 2011, 5:14 am
Contact:

Re: [DIY] making html5 wesnoth-themed roguelike

Post by Yomar »

I agree, that there should be a sort of save mode, like in other rogue games, not to reload if you die, but just a progress save system, so I can continue after that I stop playing for some reason.
You can add a save system, where you have to pay gold, or a system where you can save only at shrines locations on the map.
Or even better to keep the "rogue game spirit ";
Why you don't add a save system that deletes the save file if you die ? So you can only reload to continue a game that you interrupted because you had, for example to go out, or because you were bored.
Shadow_Walker
Posts: 80
Joined: July 27th, 2014, 4:34 pm

Re: [DIY] making html5 wesnoth-themed roguelike

Post by Shadow_Walker »

Yomar wrote:Why you don't add a save system that deletes the save file if you die ? So you can only reload to continue a game that you interrupted because you had, for example to go out, or because you were bored.
First, you are not supposed to be bored. If this happens, then this game is lacking something different but save games :)

Second, all online games I saw suffered from same issue: whenever they implement save game option, it is totally abused. People load up same saved game in two browser tabs, and keep playing in one tab knowing that if they die, they will switch to that "backup" tab with full state preserved, and replay that combat hoping to get better luck.

Of course, I can always introduce "hardcore" and "normal" modes, with latter one having save option while first one will keep the true rogue-like spirit. But I'm not at that level yet. Adding features is fun, working on optimizations, maintenance and interface/save game compatibility is not. I have plenty of those at work, so hobby project is the opposite side of the coin at the moment. One day - maybe. Just not now.
Yomar
Posts: 344
Joined: October 27th, 2011, 5:14 am
Contact:

Re: [DIY] making html5 wesnoth-themed roguelike

Post by Yomar »

First, you are not supposed to be bored
Well after 2 days of perpetual playing, maybe you actually get bored, or at least tired, so being able to resume a game would be nice, anyway introducing the two game modes that you mentioned is a good idea, I saw a lot of rogue games that actually have a sort of save mode.

Another idea, don't add a save option, but what about to make the game do an auto-save only when you quit the game, and then make it delete it when you load it ?
optimother
Posts: 76
Joined: July 12th, 2014, 4:09 am

Re: [DIY] making html5 wesnoth-themed roguelike

Post by optimother »

Shadow_Walker wrote: [x] Bleeding: hand-to-hand attacks may leave bleeding wounds - causes periodic loss of HP unless cured with potions, Heal spell or village (or time).
At current rate (-2/turn) the effect of this is so minor, barely noticeable, just a distractor from keeping things simple. Make it real danger, like in Wesnoth, or get rid of it entirely.
[x] Bad End: there are "Start New Game" OR "Resurrect Hero" options available now.
Latter allows to resume game after sudden death.. at starting position, with no gold, no spells, no exp for this level, and penalty applied to attack/defense/armor/hp. Don't tell me that I will be eternally tortured in hell becaused your superhero died of poisoning in the middle of the night, surrounded by orcs and ghosts - just resurrect hero, and resume mass destru... ahem.. your Quest, of course.
Oh, yeah! Now you can get out of your cauldron. For a little while :)
Huge Thanks to optimother for testing! I am making notes of what you have found, but had no time to go through full list yet.
Fantastic release, Some interesting moments arise already, like blocking shooters with your own grown forest.

Here's some more additions to my list:
[ ] If you hover over the tile you don't see at night cursor reveals it all: unit, defense etc :)
[ ] You should be able to cast spell in stopped time mode, if you haven't casted it just before stopping. because when time unstops archers start shooting you and you cannot heal.
[ ] Completing quests should give some rare benefits, like +5 attack for flaming sword (or adding flaming attack / aura)
[ ] Nights are too long, searching key is a pain especially for melee fighter. I'd prefer 40% broad daylight and 20/20/20 - dusk, dawn, night
[ ] Casting forest breaks ancient lich's castle, don't know bug or feature.
Shadow_Walker wrote:Save & Reload is against Rogue-like rules.. Die and Be Resurrected with penalties (as in latest version) is much closer to the original style.
I'm +1 on this to ChaosRider and Yomar. No need for abusable save/reload but continuing the progress is very much welcome. It's easy to implement: store current state in localStorage, here is how to: http://diveintohtml5.info/storage.html . You open the browser and have an option to continue last game, or start new. It's of course is possible to cheat, but very tricky - you need to patch your browser.
ChaosRider wrote:As for spells i would add here mouse right click to cancel spell casting (i was trying to do this but i couldnt).
Eventually, it may be implemented, but to keep things in style, it should have 50% chance of really nasty effects on player. Magic Rutuals cannot be cancelled in a snap, powerful energies are involved into spell crafting. Whole visible World is at risk when spell is cancelled. Or it is something else, even more terrifying..
While it sounds like fun, but it maybe very anti-fun if you click something accidentally. Your mistake resulting in something terrifying is good, but an UI flaw resulting in something terrifying is bad.
Key bindings and keyboard in general - not sure. Auto attack when enemy is in firing range is possible - will implement. Spells - again, need to understand how to avoid keyboard as much as possible.
Why? Is it against original Rogue spirit? :) Try playing on laptop with no mouse only touchpad.

optimother wrote:5) As a mage, you can't sell spell scrolls which puts it into somewhat inferior position: suppose you have 11 mirrors (which you can sell for good money) and by picking one more you lose them all. And about the rate mage learns spells, it seems to be too fast. Maybe limit 1 spell/per 2-3 levels?
Limit learning by levels gained is a great idea! Will come with the next release. As for trade - well, being mage is tough. No time to barter, as spellcraft takes all spare time.. :)
It's ok for now, but will be an issue for balancing right.
Shadow_Walker wrote:
ChaosRider wrote:This time its blocked me in game with 20 lvl assasin and 2 clones near him, and i cant do anything cause its enemy turns: "Current Turn: Enemy Units". Thats why some saves or quicksaves could be really usefull.
Hmm.. Your screenshot puzzles me. Game may have stuck in that mode if some combat animation happened off-screen, but it looks like there was no actual combat going on, right? Did you have more clones who may have been killed off-screen same turn? Or any other action happening about 10 tiles away from your character?
I sent you idea before on this. What's the point of passing next_monster_move in arguments?

Replace this (fragile and boilerplate):

Code: Select all

$.each(monsters, function( i, monster ) {
        GAME.mMQ.queue('monster_move_queue', function( next_monster_move ) {
          if ( monster.died === undefined ) {
            GAME.ProcessMonsterAction( monster, function() { next_monster_move(); });
          } else {
            next_monster_move();
          }
        });
      });
with this

Code: Select all

$.each(monsters, function( i, monster ) {
        GAME.mMQ.queue('monster_move_queue', function( next_monster_move ) {
          if ( monster.died === undefined ) {
            GAME.ProcessMonsterAction( monster );
          }
            next_monster_move();
        });
      });
Simple, and solid.
Shadow_Walker
Posts: 80
Joined: July 27th, 2014, 4:34 pm

Re: [DIY] making html5 wesnoth-themed roguelike

Post by Shadow_Walker »

Hehe, whole W.Essense development and testing is done using old ASUS laptop - no mouse involved. Just old good RedHat Linux, multitouch pad and a few missing/stuck keys :D

"next_monster_move" is passed because it should be called when async action completes. It is a callback. Not sure that unit animations will tolerate your suggestion. Could you try your suggestion locally, please? Actually, my observation of this bug was slightly different: game is stuck *during* the move of a monster (some callbacks do not fire for the unknown reason), not in-between moves. Will check if it is jquery/browser dependent. Problem is that I just cannot reproduce it after the off-screen render fix.

Saves - yep, I understand your frustration. I know how to use localStorage (which will not work here due to browser storage size limitations, btw) and IndexedDB (no size limitations, tested up to 100+ GB, proper js plugin is already included in w.essense), but it means that I will have to provide conversion for old saves to new game versions as it goes. I see how much time is spent on this by Wayward developer, and I don't want to do it myself. I'm quite lazy, this project is totally fun-driven - let's see how it goes in a few weeks, ok?
optimother
Posts: 76
Joined: July 12th, 2014, 4:09 am

Re: [DIY] making html5 wesnoth-themed roguelike

Post by optimother »

Shadow_Walker wrote:Hehe, whole W.Essense development and testing is done using old ASUS laptop - no mouse involved. Just old good RedHat Linux, multitouch pad and a few missing/stuck keys :D
Ha! Now I see why you want to avoid keyboard :)
"next_monster_move" is passed because it should be called when async action completes. It is a callback. Not sure that unit animations will tolerate your suggestion. Could you try your suggestion locally, please? Actually, my observation of this bug was slightly different: game is stuck *during* the move of a monster (some callbacks do not fire for the unknown reason), not in-between moves. Will check if it is jquery/browser dependent. Problem is that I just cannot reproduce it after the off-screen render fix.
Okay, I'll try something. Didn't want to code my own, but since you insist :)

So. I've set up git repo (if you mind I'll delete it). Here is what's more probable: https://github.com/optimouser/wessense/ ... f9dda9L329

If sprite is currently animating something, then callback is just discarded. And it could happen if attack is longer than defend, because only defend is queued.

Also, images are preloaded in background, so startup is 'instant', without need to wait, LandSettingsDialog (LSD) is preserved in localStorage.

I've got sublime text automatically doing some cleanup, so in commits tons of lines are changed, but those are only whitespaces :)
Post Reply