https://github.com/kazzmir/master-of-magic

Early demo of progress so far. Wait a few seconds for the game to load.

Click on the game window in order to get audio to work. Press 'N' to go to the next turn.

Discord link: https://discord.gg/xCpHBKrU9c

Updated 7 days ago
StatusIn development
PlatformsHTML5
Rating
Rated 4.5 out of 5 stars
(2 total ratings)
Authorkazzmir
GenreSimulation

Development log

Comments

Log in with itch.io to leave a comment.

Destroying city walls in combat is supported now (WallCrusher ability)

(1 edit) (+1)

If a unit leaves an army that's on Patrol, all of the units in that army sometimes lose their movement points.

Can you say more about how you got into this situation? I was unable to replicate. So far I tried these situations:

* have a stack of units that are all in patrol mode, next turn select 2 units to activate, move them to a nearby square. works fine

* have a stack of units that are all in patrol mode. have another stack nearby that is active walk a path through the patrol stack. the non-patrol units walk through the patrol units just fine and have the expected number of movement points

I did manage to capture one sequence: The stack was in a city, I clicked on the stack while in the city, I moved two units away. I checked the city, then the stack; they had movement. I checked a second time, they did not have movement.

I've seen a case or two where stacks merged together incorrectly, I think it is related to this issue.

(+1)

The engineers can build a road on a specified path now. The hud ui changes to allow you select a path that the engineers will take.

Can the F1 key also close the Surveyor view? I keep getting tripped up that it's not a toggle.

(+1)

Done

Five flaming fusion spheroids out of five.

When opening a city from the Cities screen, can closing the city return to the Cities screen? I know that's not the way the DOS original does it, but insert-standard-ISO-notation-for-tedium-in-neurotypical.

(+1)

This is implemented now.

Two sort-of related bugs:

  • I obtained a spellbook of Life magic from a ruin while playing a Death wizard.
  • I obtained the Spell of Mastery from a ruin.
(+1)

Treasure will now never give out the Spell of Mastery, nor a forbidden book (life to a wizard with death, or death to a wizard with life)

Found the Spell of Mastery in a ruin. I think this isn't possible in the DOS version.

(+1)

LOL good catch. I'll make sure spell of mastery cannot be part of treasure.

LOL accidental  double post.

(+1)

The Leadership skill only seems to affect the unit that has it. My Veteran War Trolls with a Leadership +1 hero have 9 attack dice, and should have 10; 8 base + 1 from their level +1 from Leadership.

The hero has reached Commander level, but only due to Warlord. This may be a factor.

(+1)

Fixed. Leadership now applies its bonus to all valid units in an army (any non-fantastic unit)

It looks like all of the neutrals field Barbarian units?

(+1)

Fixed, now each raider city can have a different race (consistent with the plane the city is on), and units produced by that city will match the race of the city.

Confirmed; Earth Lore showed a Gnoll city with Gnoll units.

(1 edit)

My engineers did not build a road on one specific hill, no matter how long I waited. Later:Two out of three of my Engineer stacks are doing nothing when told to build roads.

Roads can be built on the ocean by putting the Engineers in a boat.

(+1)

Roads can no longer be built on water. All build actions are disallowed on water (including settle and meld).

(2 edits)

A raider Swordsmen popped out of a city after I conquered it. Yep.

I just attacked it; it was invisible on the battlefield. I forgot to check if the invisibility was a spell.

I moved my unit back to the city I had conquered, and  which contained three of my units (confirmed afterwards). I had to fight an army of raiders to get in. Fortunately, Alchemy+Warlord Wolf Riders are handy like that.

(1 edit)

The game was ended due to an ever-growing swarm of invisible raiders with zero hit points swarming around a different town I had conquered on Myrror.

This probably needs more details. There appears to be a bug where dead raider units stay on the map, and continue to move and "attack", although once on the battlefield, they do nothing, do not have a visible sprite, and have zero HP. They can still be detected with mouse-over, and the auto-battler fights them as normal. However, only melee attacks dispatch them from the battlemap. This does not remove them from play.

(2 edits)

The same bug occurred today, in a local game this time; the first time I conquered a neutral city. My units killed two cavalry and a swordsmen. The next turn, they moved out of the city, and then back in. On the battlefield, they had no visible sprite, and zero HP. After killing those units again, they moved out of the city...

(+1)

I've been trying to reproduce this issue but have not succeeded yet. I am still investigating

Engineers only build roads on the current tile, and then just move the remaining distance.

Not sure if one post per topic, or multiple topics per post.

(+1)

Ok I'll check on this. BTW you can join the discord channel too: https://discord.gg/xCpHBKrU9c

As a summary, I do not interact with real-time text chat. Past, and extensive, experience.

Enemies may have difficulty pathfinding to the gate in city walls. After the enemy unit in front of the gate fell, none of the others moved to close. All other units were against the walls, and may have been trying to move diagonally into the gate, which isn't allowed.

(+1)

I think this is fixed now. Enemies outside the gate will constantly try to move towards the gate, or further inside the city if possible.

Seems to be fixed. I did a quick test game; built City Walls and then just waited. After a while, I got attacked by raider cavalry. After moving units to make room inside the city, the raider cavalry moved through the gate.

When a city has a full 9 units, new units built there displace an existing unit, rather than being displaced themselves.

After further play, I have come to prefer this. It means that newer, and therefore likely more advanced, units guard the cities and gain experience, while less-advanced but more-experienced units can be sent to scout or attack. This is particularly effective with an Armsmaster hero: by the time a unit is ejected by a new one, it is likely already Elite.

It's possible to have more than 9 units in a city, if a unit has a goto order that completes the same turn as a unit gets built.

(+1)

Ok I'll see if I can fix it, although I have been toying with the idea that a stack of units can have more than 9 in it. Combat already supports nearly unlimited units per side. The only real constraints on the stack units in the rest of the game are various ui issues, but I can just make the unit sprites overlap/shrink if there are more than 9

(1 edit)

Modding capability would be neat, if you've got the time. I'm not sure if that's what you're talking about.

(2 edits)

It's possible to right-click on and observe towns on unexplored tiles. I don't think it's critical, because players would have to click on the exact tile basically at random, but it can happen by accident; that's how I found out.

(+1)

Ah good find. I'll fix

(+1)

Fixed

When a town grows by one pop, it sometimes turns a free pop on the right, one that can be assigned to any job, into a farmer on the left. Since the farmers on the left are needed to support the population, if that pop was already a farmer, that means afterwards I have one less farmer feeding my units.

(+1)

I believe dos mom does this too. When one new citizen is created, that citizen starts out as a worker unless there are not enough farmers to support the food needs of that specific city where the population growth occurred. If there is a deficit in the required farmers to support the new population then the new citizen automatically becomes a farmer.

None of this takes the food needs of the army as a whole into account. You have to manually rebalance the farmers across your empire to sustain the army's food needs. But the game will warn you when your army food needs becomes negative.

That's entirely valid for a remake.

(+1)

I added a feature wherein if you click on the food UI element in the main hud while it is negative the game will ask if you want to rebalance food production, which will convert some workers to farmers in your cities. See https://github.com/kazzmir/master-of-magic/pull/649 for details

I attacked two Great Drakes in a ruin with a Warship with Flight and Invisibility. The Great Drakes showed no difficulty in finding a path to my Warship; I drove the Warship around the edges of the battle map for a few loops to check. Probably units that can't find an invisible unit should move randomly until one of them finds it.

(+1)

There was a bug with invisibility. Its fixed now, and the AI unit will not walk towards an invisible unit unless the AI unit has illusions immunity.

Today I noticed the upvote button, because I took a massive malus to Perception as a flaw at character creation.

Deleted 52 days ago

A couple of bugs:

  • I got a gift of 760 gold but got no gold.
  • I get event notifications for AI cities I can't see.
(+1)

The bug about a gift being applied to an AI but being shown to the user is fixed. I'm still investigating what is supposed to happen for events to AI cities. It could be that the human should see event notifications if the human knows about the city, or maybe the human just never sees notifications about those cities at all.

Some observations I marked probably-bugs with an ❌ good things with a ✅:

Pathfinding:

  • Avoids nodes, lairs, towers, and cities unless you path directly to them. ✅
  • Does not otherwise check intermediate tiles, only the destination tile. ❌
  • Flight does not allow a Warship to set a destination on land. Probably a bug, although my bot opponents would clearly argue that it's a fix. ❌
Observations:
  • Please add a quick restart button for starting a new game with the same settings.
  • It could be fun to have a quick start button that gives you a random Wizard to play. If so, it should probably only have a difficulty selector?
  • Very easy to compile from source. ✅
  • The minimap is not clickable. ❌
    • Right-click on the map is smooth. ✅
    • Follows the current unit exactly, which is a little distracting when I'm also tracking the map.
  • More zoom-out please. I like to see the entire map.
  • Newly-built warships are in the city, not the nearby ocean. I don't know if this is accurate to the original DOS version.
  • Warships in a city don't defend it. I don't know if this is accurate to the original version.
    • I'm pretty sure Flying Warships can defend a city in the original version, though.
  • Master of Magic engine remake. ✅
(+1)

There actually is a way to start an instant game from the command line if you have built from source.

$ magic -start

I will address the rest of your comments later. Thank you for the feedback!

(+1)

I increased the zoom level a bit, but if the map is too large you still can't see the whole thing.

(+1)

I added a "Quick Start" button to the main menu that drops you into a game with a random number of opponents on a randomly sized land size, and with a random wizard for your player.

Regarding "Does not otherwise check intermediate tiles, only the destination tile.", I guess you are saying that units sometimes run into obstacles on their way to the destination and need your help to move around them. This is partly be design, in that the original DOS version simply didn't let you move armies onto unexplored tiles that would have been illegal for that unit. Meaning, if you were to try to direct a unit onto an unexplored ocean tile, the game would simply not calculate a path at all. I think this is a bit unfair in that if the area is unexplored you shouldn't be able to know if there is an ocean tile there or not. For now, the units in my engine always try to go towards the destination tile, and just stop moving if they can't continue on their path.

I have thought about making units auto-recalculate a new path to the destination tile (if one exists), so that you don't have to manually manage the unit yourself. Do you think that would be preferable?

A Warship with a Flight spell would sometimes move on land *if* I sent it to either another ocean tile, or an unexplored tile. Otherwise it considered land tiles impassable, which is normal for a Warship but a bit odd for a flying one.

(+1)

I fixed a few issues regarding sailing units (including the warship). A flying warship can move around anywhere on the map and enter combat on land, as well as still transporting units. Also I tested in DOS MoM and new ship units do start in the city they are built in, not in the nearest ocean tile.

Thank you. I should have said that before; this kind of developer response is rare, and should not go unnoticed. I am far too used to clicking upvote buttons. Good to know new ship units start in the city they are built in; it's been a while.

I missed this part before:

"I have thought about making units auto-recalculate a new path to the destination tile (if one exists), so that you don't have to manually manage the unit yourself. Do you think that would be preferable?"

That sounds good to me. If unexplored areas are treated as traversable, it could also enable semi-automated coastline exploration by clicking on an unexplored tile that the sea unit probably cannot reach.

Which brings up a thought; I don't know if you want to add automated exploration? This could enable fully automated coastline exploration by treating a land tile as unexplored. The sea unit would try to move through the unexplored  tiles to reach the target, revealing more of the coastline. Depending on tile visibility, this might require adding a few more fake unexplored tiles, so the bot thinks there might be a path?

(+1)

As long as there is some tile that is unexplored the engine will assume it can traverse that tile, so if a sailing unit tries to reach some destination but keeps running into the coast it can recalculate a new path until it discovers the entire coast. Theres a chance the unit might get into a suboptimal situation where it keeps re-exploring the same path a few times though. I can play with it.

Big fan of making games like this playable in the browser! My only issue is that pressing "escape" shuts downs the game and I tend to hit it a lot by habit. 😅

Also, if you have a Discord server for the project, I’d love to join and chat more about it.

Really great work!

(+1)

I use escape a lot for local development to exit the game, its convenient for me. But maybe I can disable it in the browser.

Discord: https://discord.gg/xCpHBKrU9c

The Escape key is right next to the F1 key. This was unfortunate when I went to survey a new city location. :sadface:

(+1)

Ok good point

Ctrl-Escape or Ctrl-Shift-Escape to instantly exit would be safer. Could use one of those?

(+1)

The escape key is disabled in the browser now.

Hi there, the demo its really good, can you add "enter" keyboard for next turn, so we can just press that button and not click on next turn every time, thanks

(+1)

Ok, right now you can press 'spacebar' to do that.

thanks, i dint notice that