| 06-17-2006, 10:25 PM | #1 |
This is a mind storming , would let me do JASS things in linux and will also let us get rid of a big hazard - the editor's JASS parser. The idea would be to redo the entire thing allowing #preprocessors , we need things like #include for example. #include would just merge the given script into the script you are typing. A magic program would require a map, a source jass 3.0 file (with preprocessors if you want) and any other jass files if required, then it will create the new war3map.j and pass it to pjass. Handling the generated content Let's say you want to keep the preplaced units and rects, maybe because you are a human being. Then this thing requires to be able to use the preplaced things and declared variables. The easy solution is that if you use the #usegenerated preprocessor then it will be like #include "war3map.j" but it will use the war3map.j that's already inside the map. This will even allow you to make GUI triggers, GUI won't be able to use variables declared in the external .j files though. Test map Making the map and using this tool has to be easy and without problems, the normal procedure would be saving the map then using this tool to re make the script. We can make this tool able to run the game and let it open the map, that's easy. This will take more time than pressing the test map button and it will suck. Advantages
I need opinions. |
| 06-17-2006, 11:40 PM | #2 |
This is a good idea. I would like to have functional programming but this would be worth it just for getting rid of the world editor. It shouldn't be a problem to hack the test map button. You already have a loader; you just need to have it run a little script that runs the parser and starts warcraft up. Templates are an interesting idea. I would extend it a little to the compiler doing the type analysis for us. Rather than GetTable<type T> and force us to know which to use, just use GetTable. Then the compiler figures out in context based on what it's assigning to or what arguments there are which version it needs to create. I would also toss out the return bug and simply let the compiler know to write it in. C macros are garbage. Constant defines are fine and dandy, but if you want inline functions, you're asking for pain. I recommend an inline directive. Game cache could also be abstracted away into a class system. We could get type safety and lose the wrong string problem. If we had that, it wouldn't be far to go to functional programming, by which I mean being able to pass/call functions of varied arguments. Since we could pass classes (just a string for the gamecache key) seems doable, no? |
| 06-17-2006, 11:44 PM | #3 |
but well just adding #include and get rid of the editor will be the first step. The loader just overwrote "-loadfile" with "-window -loadfile" making it not call warcraft iii but other program would be a little more complicated I think |
| 06-17-2006, 11:54 PM | #4 |
Does DOS have line delimiters like semicolon? If the editor uses a 'system' type thing instead of 'execv' type then you could make warcraft start up, die, and then run your own script. Anyway I can find the address of the war3 exe string if not. Edit: It's just 12B before what you're using for commands. 0x007BDA54. |
| 06-18-2006, 03:49 PM | #5 |
I'm actually writing a compiler for pure lambda calculus to jass. Unfortuantly I'm really lazy, and this is mostly for research credits. I'm also porting over DT4a to RCCS v W. My main directive is functions as first class objects, and nothing else. (I think i'm going to add integers, but nothing else). The idea is that it will incorporate many of the bajillion tricks one needs to know to code properly in jass. That's the real bummer it isn't good enough to be a good programmer, you have to know how shit works. Why you have to use timers of zero, why you have to set an items charges to its current value, why you have give a unit aloc and shove him in to unplayable lands. Why catching an order isn't always good enough There are so many goddamn quirks in war3 that if Blizzard fixed any of its bugs my maps would halt and crash. |
