Still alive :)

Anything else to do with MoM IME
Nehan
Posts: 32
Joined: Mon Jun 02, 2008 11:06 am

Re: Still alive :)

Post by Nehan »

anything? :cry:
Warsaw isn't a kind of a battle saw. It's the capital of Poland.
Lupinedreams
Posts: 83
Joined: Tue Jul 25, 2006 6:40 pm

Re: Still alive :)

Post by Lupinedreams »

Please be alive. Please release the glory of multiplayer MoM to the world. I hear it can end hunger and bring about world peace and invent cold fusion and limitless internet bandwidth all at once.
User avatar
Implode
Site Admin
Posts: 433
Joined: Fri Feb 24, 2006 3:35 am
Location: Newfoundland, Canada
Contact:

Re: Still alive :)

Post by Implode »

Still alive yes :P Just my time I can spend on this varies from zero to fair amounts at different times depending on work, family and whatever else I'm involved in.

Short update: (In order to pick something to do next other than combat which I'm avoiding cos its nasty :P ) Been trying to get spells to work. But in the process of trying to write unit tests for the casting routines, I had to finally accept that the complexity of some of what's going on behind the scenes meant I couldn't write sensible unit tests which used links to the real other related methods (like, when you cast a spell, it has to recalculate what you can see in case what you cast was a new summoned unit or spell that somehow otherwise changes the area you can see, plus recalculates all production for the additional mana consumption, plus maybe the spell itself alters production in some way like Prosperity).

So had to bite the bullet and pull every class apart into a separate interface so that in unit tests I could mock the related methods. Then using spring to assemble all the "real" methods together when it runs properly. And I now seem to have that mostly working (the loggers I know are all broken but that's the least of my concerns, and I'm only testing it for now with the server in console mode/text only). So that's been a huge number of changes to get through. But now I feel like its starting to work how it should and be all (reasonably lol) well designed and tested code.

I must say, in trying to convert bits of the old Delphi server across into Java, I'm constantly astonished how much code there is. I didn't realise how much I'd done in 0.9.3 and how involved some of it was. I keep finding huge routines that I'm like, wow, I forgot that piece was so complicated.
User avatar
Implode
Site Admin
Posts: 433
Joined: Fri Feb 24, 2006 3:35 am
Location: Newfoundland, Canada
Contact:

Re: Still alive :)

Post by Implode »

Got far enough in the last few days that for the first time the Java server actually gets far enough that I can basically play it, run units around the map and so on (as long as I don't start any combats, which aren't done yet). Keep running into bugs and stuff that isn't implemented yet, so just going along fixing/finishing things as I find them at this point, so for the first time its looking promising :)

Just thought I'd share this bug I just fixed on it since it really amused me. I noticed (since I had all the debugging turned on on the server) that it was on turn 2 killing off every Rampaging Monsters unit in nodes/lairs/towers. Realised after a while that what was going on was I hadn't told it NOT to check production for Rampaging Monsters. So, like, when it pops up saying "Unit lost due to lack of production", it was spotting that the Rampaging Monsters player had enough units that they had about 860 mana per turn maintanence, and was generating 0 because they have no buildings producing mana, so it killed off every unit. Yeah, fixed that now lol
npilgaard
Posts: 5
Joined: Sat Feb 25, 2012 7:18 pm

Re: Still alive :)

Post by npilgaard »

:) Glad to hear that things are going well on the project.
Thanks for the effort!

Regards
Nikolaj
User avatar
Implode
Site Admin
Posts: 433
Joined: Fri Feb 24, 2006 3:35 am
Location: Newfoundland, Canada
Contact:

Re: Still alive :)

Post by Implode »

meh, still something goofy going on with production calcs. I summon a magic spirit, then as soon as I cast another spell, I get "unit dispelled due to lack of production", because casting the spell is dropping my MP to 0 then I have nothing left to pay for the magic spirit. Not supposed to work like that, not sure what's going on.
npilgaard
Posts: 5
Joined: Sat Feb 25, 2012 7:18 pm

Re: Still alive :)

Post by npilgaard »

Perhaps to many MP is subtracted when casting the spell? Or perhaps the check for MP upkeep is done before MP for the current turn is added? Or perhaps the check for sufficient MP for upkeep is done right after casting the spell, instead of at the beginning(?) of a turn?
User avatar
Implode
Site Admin
Posts: 433
Joined: Fri Feb 24, 2006 3:35 am
Location: Newfoundland, Canada
Contact:

Re: Still alive :)

Post by Implode »

Perhaps I fell in the trap again... whereby Mana doesn't get produced "directly" - you produce Magic Power and then allocate a % to skill improvement, mana + research. The "Sell something in insufficient producton" routine wasn't taking that into account and so always assumed mana production was 0 so always disbanded all magic units and spells. Have tripped up on that sooo many times :( Meh, well fixed now.

Done a lot lately, with rush buying+selling buildings, proper movement routine, casting/targetting/cancelling spells, etc. I think I am getting to close to everything being done+working, aside from combat.
npilgaard
Posts: 5
Joined: Sat Feb 25, 2012 7:18 pm

Re: Still alive :)

Post by npilgaard »

Sounds good! :)
Worsas
Posts: 12
Joined: Sat Jun 16, 2007 8:15 pm

Re: Still alive :)

Post by Worsas »

Hey Implode,

I have been following your project years ago and I have just started to play the original game again almost instantly regaining my interest in an advanced version of the game. Knowing the trouble you've had years ago I was considering working on an own version of the game (I consider myself quite familiar with Java), although it would have taken quite a bit of research to acquire the knowledge on the game mechanics you already have, not to speak of all the other effort involved.

The wikipedia article of Master of Magic does not contain a link to your project anymore, so I considered the project dead. Now I gave this a google search and the way it looks you are still going on with this. Would there be any way to help you on this programming-wise? Though, if you prefer working on your own, it's fine with me.

I have a sister and 3 brothers who have played the original MoM themselves who would anytime start a multiplayer session with me (infact we were jointly trying your old game version years ago). We all play the original MoM from time to time. I want to assure you that there would be a big audience for your multiplayer version.
User avatar
Implode
Site Admin
Posts: 433
Joined: Fri Feb 24, 2006 3:35 am
Location: Newfoundland, Canada
Contact:

Re: Still alive :)

Post by Implode »

Been busy trying to tidy all the loose ends up. Redone a lot of the multiplayer layer, finished implementing all the messages that weren't previously done (like naming heroes, cancelling movement). Done the installer (mostly.. one key issue left). Was basically trying to get everything finished until combat was the only thing left to do, so I could concentrate on that.

So, started on that now last day or so, and oh boy, there's so much of it > Finding piles of routines to do with combat which all need doing, always surprises me how much code there was in the Delphi version that I had forgotten writing :) So trying to slog through it.

A lot of the complication is for handling monsters in nodes/lairs/towers - they're an annoying special case for just about everything. If you're wandering around the map and walk next to a stack of enemy units, you can see the exact types, numbers, health, experience of every enemy unit. If you walk next to an enemy city, you can see every unit in the city. But if you walk next to a node, you can't see what's inside. Even when you 'attack' it to scout it and see the type of mob inside, you only find out the type - not how many, whether they're already damaged, what the secondary type of mob is or so on. That is all a royal pain to deal with in the code, it has to send the units to the client a the start of the combat and kill them off at the end. If monsters in nodes/lairs/towers just worked the same as everything else, so you could see all of them as soon as you walk next to them, there'd be a lot less fuss to deal with in combat. But oh well, I try to stick to how the original worked :)
Post Reply