Options to pass data between triggers with something less convoluted than global hastable or parallel arrays.
Typecasts.
More common functions, e.g. something like: native function PolymorphicDestroy takes widget myWidget returns nothing;
user-declared types (that’s one of the way to solve data passing problem), e.g. something like: type userTimer extends timer { function CreateUserTimer takes handle dataContainer returns userTimer }
passing pointers to array
forward declarations for proper recursion
enable debug.
constant functions that are actually constant
can we functions like native ParallelForGroup that would work like parallel_for_each please?
Blizz please make us happy
PS. of course it would be much easier if WC3 code was just opensource on GitHub, so that we could just write what we need ourselves… But I understand why this will never happen
They said they will be improving it, so I’d expect a lot of new natives and also other functionalities. Obviously, we don’t have any details what they are planning, but I’m pretty sure they working on it. Also, with LUA introduced, it widens the possibilities as well.
Do you have a link? Did they said anything except that they will be improving WE?
I had been active with WE between 2003 and 2010 and it would be nice to do something in it again (especially with all experience in software development I got since), but man JASS limitations are so irritating!
Yeah, they haven’t been very specific. There are a couple details, but they too are just general “more JASS commands and natives” and never been explained what exactly this includes.
[Compilation] ALL we know so far! - here is a list of all the changes known for sure so far. Under the “World Editor and custom games” section there a couple things that was mentioned.
Do you think this physics engine is coded in Jass? Are you a masochist? We coded in JavaScript transcompiled to lua which is read by the 1.31 game engine instead of Jass. It’s already finished and deployed and usable in Patch 1.31!
You can use a lambda function and capture your variables to pass data into a trigger. In Lua they use dynamic type variables so the rules of typecasting are different and are not stupid.
Lua adds new natives in the form of the Lua APIs, such os.clock, so that you can make your map behave differently on holidays. New natives were added for customizing the game UI, unit datas, abilities, listening for WASD keyboard events, and many other things.
I watched CanFight code this physics engine nand it was filled with custom classes, user declared types, in the TypeScript he was writing. He passed pointers to arrays around, using nested 3 dimensional arrays for minecraft block pathing.
This makes no sense at all… Triggers cannot run code. Triggers generate JASS threads which run code. A trigger can spawn many threads which are alive at the same time, especially if they run blocking code such as TriggerSleepAction.
Which are usually a bad thing. One generally uses typecasts for optimization or when dealing with API flaws.
JASS is not object orientated.
Not safe. There is a reason most scripting languages do not allow this.
If you mean passing a reference to an array then that is quite different. Depending on the direction the developers go there will likely be a solution to this.
Multi threaded scripting is not possible due to race conditions. Would require synchronization primitives and even then people would regularly mess up and generate race conditions which have catastrophic results on the game. Either that or everything is synchronized all the time so one might as well run it single threaded and hence faster.
Yes they did. However these are very much “in development” style ideas. So what we end up getting may or may not reflect them so it is pointless speculating them.