Sunday, January 03, 2010

Making spells in wc3: still torture


I spent a lot of holiday time making spells for the failed hero contest at wc3c.net My spells are somewhere around that page.

My conclusion is that. I have ZINC which makes typing very fast. Let me self indulge by saying it really does help. Of course, it also allows me to code atrocious things like:


t = CreateTrigger();
TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_CAST );
TriggerAddCondition(t, function()->boolean {
return BUILD_SPELL_ID == GetSpellAbilityId();
});
TriggerAddAction(t, function () {
onRebuildStart( GetTriggerUnit() );
});


Yay! anonymous functions... I wonder if people can actually read that code...

Another accomplishment of the year was the discovery of jEdit. It has also been amazing at increasing my efficiency. Thanks to auto complete I don't actually need to browse common.j every 5 minutes...

I have also made a lot of things to my linux command-line based warcraft map build system.

So, in theory I should now be able to make spells and maps quite quickly. Unfortunately that's not true. Just like I thought, the bottleneck was never coding or compiling, it was testing. In fact, I think I could have finished the spells using the vJass from 3 years ago much faster than I did now if map loading time took 1 second instead of 40 seconds. The other major issue is that wc3's engine is full of idiosyncrasies that force you to keep tweaking and testing object editor until you find something that actually works. In fact, making these spells was a fight against the engine. I had to deal with pocket factory and storm, earth and fire, both things required a lot of reverse engineering.

Reality is that regardless of all the work in the last years to make coding easier, and although we succeeded at that. Making spells is still torture. But I also figured that we still lack specialized libraries or at least I do. The spell making process invokes using certain tools and processes over and over and over again. The spells I made all are really just combinations of the same old 'processes' I've been using since 2004. The language has changed. The rules about how to code have changed. But it is still the same. Doing all these things over and over again is very repetitive.

I think some sort of library combination that has all these common processes abstracted in a way that you can just put them together as LEGO bricks would be amazing and seriously improve the speed of these things. I also think that maybe we need a better language. We've been messing with syntax and OOP concepts for ages but maybe we need something that would free us from having to use all that attaching and defensive programming related to it manually.

10 comments :

Kyrbi0 said...

Hey, someone *else* who finally gets it! :P

Yeah, I have to keep re-realizing that all the fun of modding is in the theory-crafting... Actual modding can be quite tedious, as each new change necessitates another "Save-Test-Map" run.

This is so cool, didn't know you had a separate blog. Would be nice to see more information about the hero design process (for this or others). Hey, is your brother (?) Mc! still about?

Respectfully,

Kyrbi0 (that one dumb GUI coder from Wc3C that was too stubborn to see sense xD)

vexorian said...

Dude, 2010


Basically, I became too focused on this programming contest thing. Click thje blog home to see more about it.


Mc! is now modding civilization V under an odd pseudonym.

Kyrbi0 said...

Testing

Kyrbi0 said...

[[Dude, 2010]]
Yeah, sorry. I always was bad about 'necro-posting'.

Kyrbi0 said...

[[Basically, I became too focused on this programming contest thing. Click thje blog home to see more about it.]]
I know, I was pretty amazed; they have whole *contests* in real life for programming problems like this? How fascinating. I'm only just entering the world of 'real' programming (taking Java classes at college), so I'm pretty blown away by all the stuff you talk about on this blog.

Kyrbi0 said...

(continued)

Kyrbi0 said...

(Trying again... Message Length > 11 characters = fail?)

vexorian said...

What happened? I guess I just got tired of Wc3 modding.


Also the community became increasingly annoying. Or perhaps I matured as a programmer and was no longer impressed by the obsession for speed and other useless things. There is only so much times you can stand watching people migrate to a terrible, unusable programming interface just because the author claims that his flawed benchmarks show that it is 0.0001% faster than what people were already using.


I have no idea what Mc!'s new name is. He left wc3c even before I did.

Kyrbi0 said...

Ah. 'Tis a shame, though I suppose we all may move on eventually.

Well, thanks for the reply, and thanks for helping keep the site afloat, even if you no longer frequent it. Good luck in future competitions!

vexorian said...

Schulze is an algorithm that you can implement, it is not so complicated from wikipedia page, you would probably need some php to get it working in the hive.

https://en.wikipedia.org/wiki/Schulze_method

I think the code used in wc3c is too dependent for old vBulletin version and too specific to its forums to be usable elsewhere

Schulze is also not the only voting method that allows ranking. Also, apparently this is a common issue for many sites, you can for example use an external poll service: I found http://betterpolls.com/