| 09-17-2003, 09:35 PM | #16 | |
Quote:
That would be a GREAT feature. Just make it so you can type in a bunch of functions, and hit a button and it'll merge it with blizzard.j and ask you where to save the new .j file. This could go well with the upcoming JASS library -- select all the functions you want, copy and paste them into your editor, and then it'll merge it with blizzard.j. Very useful for campaigns that use the same functions over and over across multiple maps. |
| 09-18-2003, 06:44 AM | #17 |
Hmm, how exactly merge? Just Paste it at the end of the file? Remember that I know little (if anything) about AI and I don't edit the Blizzard.j. I only make Jass triggers for maps. But as I said, I'm currently attempting to reduce the loading time. |
| 09-18-2003, 06:57 AM | #18 |
Yes, it would be at the end of blizzard.j. Remember: A function can only use functions declared above. |
| 09-18-2003, 12:18 PM | #19 |
Best would be if it could also merge in globals declared in the other file. |
| 09-18-2003, 02:01 PM | #20 |
Know that this merging thing is at very bottom of my priority list. I want the editor itself to be fast and functional first. But again, what do you want it to do? Can't you just copy paste it manually? |
| 09-18-2003, 07:24 PM | #21 |
The lag is homongous when working with large files, and I can't fix it. I've tried very hard but I can't :( If I do find some means of optimizing later I will try again. For now I will just polish it so it's a bit more user friendly, but it probably won't be useful for AI working yet. Sorry ://// |
| 09-19-2003, 12:55 AM | #22 |
One way to handle highlighting (or any sort of online processing) of large files is to do it incrementally in the background. You only need to process enough of the file that is displayed before showing it and the rest can be processed in the background in parallel with user actions. The easiest way to do this is by using a separate thread for highlighting/processing (the "producer" thread) and having the main thread block only until the section currently being viewed is processed (the "consumer" thread). [Producer-consumer is a well known design pattern and works nicely in many other programming models] If you want to get a little fancy you can have the consumer callback the producer to prioritize which sections of the file get processed first (e.g., if the user scrolls down before the producer gets there). Of course if your app isn't multithreaded to begin with then you'll probably have to start over using the approach. (Single threaded is possible too, but I can't think of a way that isn't horribly painful) |
| 09-19-2003, 02:00 PM | #23 |
Multithreaded? :bgrun: I've never worked with threads before, so that might not be an option ;) |
| 09-19-2003, 03:16 PM | #24 |
Kattana: I'm very interested in how you managed to get the script into the currently opened trigger window. Could you for example also detect when a map is saved in WE or access other areas of the editor? |
| 09-19-2003, 04:13 PM | #25 | |
Quote:
Multihreading is not that difficult, especially for offline programs, and it would help you immensely. I also suggest you at least try to learn about it, since it's pretty common practice. |
| 09-19-2003, 04:20 PM | #26 |
I can read components' values in the WE, but I can't detect events like when the map is saved. I havn't tried but I expect that I could read from the Object Editor as well if I wanted. About the performance of the editor, I managed to eliminate the lag while working with large files, but it still takes a considerable amount of time to load them. By "large" I mean 500+ lines. I have also reduced the loading times a bit. Now it takes about 94 milliseconds to load and highlight 79 lines, and about 1200 milliseconds for 655 lines. Oh, and btw: I included a few templates too, just for the fun of it ;) |
| 09-21-2003, 01:19 PM | #27 |
It can now merge files at a very basic level. Eg. Identical declarations can occour, if they are present in more than one file. I consider making it recognize already declared functions and globals so they won't be redeclared. I'm not sure if it's needed, though. The screenshot shows the merge files window, and some (very) few interface changed. Enjoiiiii. |
| 09-21-2003, 04:59 PM | #28 |
Looks cool :D :D :D But it would really be much cooler if it wouldn't add globals and functions that already exist or ask if they should be renamed. But I guess this would be a lot more work. |
| 09-22-2003, 12:17 PM | #29 |
8)) It now recognizes declarations and ignores those already declared. You put them in a prioritised list, so it uses the declaration that occours in the topmost file (eg. that with the highest priority). Any other final wishes before its release? |
| 09-22-2003, 04:25 PM | #30 |
The time has come... The moment you have all been waiting for (quite :////)... [glow=color=black, size=4]Jass Editor 1.0[/glow].... In stores now! ... uh.. wait... Download it here :D |
