Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

AngelScript: The Revenge

114 replies · 56,127 views · Started 17 January 2017

Gleeok wrote:I don't read/write from ZASM bytecode at all. It's all separated. ZScript is only 32 bit integers, so this best maps to int by default. Having AS to be responsible for maintaining legacy zscript bytecode was never a goal, and I suspect never will be, but even though I'm not going to do it, maybe someone else will.

AS can work with native types easily, this includes pointers, primitives, and structs. ZScript can only handle one type: long.

You're thinking about it the wrong way:
The truth is nobody really wants (or has enough experience) to work with the ZC code because the reality of breaking computability is such a huge burden that most people are crushed by it instantly when they realize how difficult simple refactoring or other trivial things could become. In addition, we're basically running out of useful things to add to it due to complexity of working with the old systems. I'm not going to be able to get to a ZC 3.0, the best I can do is clean up some of the allegro stuff and replace it one thing at a time. You guys are pretty much the only new people who are working on ZC right now. Surely you realized by now that it's way more complicated than it needs to be, and that for all the cool stuff and good work you guys have done on 2.5x the amount of time spent for very minor improvements is sort of disproportional. If the next-gen of ZC developers want to do things differently, or even the same, then they should have that option, and I'll support them. Saffith has moved on, and the truth is I never really came back. I'm still semi-retired, and will probably stay that way for a while; I just have too many other things to do. At least Dark Dragon is currently around for the time being.

AS is something that is documented, works well, an anybody can work with without too much trouble. It's more for the future of ZC rather than the past, to put it one way. We won't even add it until 2.6 so it doesn't interfere with 2.5+.

What I read out of this, is that the plan to have this new system compile legacy scripts is dead, so, we should still be working on the ZScript parser for 2.54, 2.55. Correct?

If you truly feel that you are going to be passing the torch to us, then you might want to have a pow-wow with us and we can discuss our own goals. I wanted to work n stuff like this for 3.0, but I also wanted to do a substancial amount more, and while that may sound fantastic, the reality is that it will take time to get there. I feel that 2.54, w.55, and 2.6xc should be a slow migration away from some of the nastier elements, but not a dramatic shift.

If you get an AS implementation that we can use in one of those later shifts, fantastic. It just seems to me that we're falling back on the 'doesn't need compatibility' model, which is fine, for a wholly new ZC version.

I would frankly rather see you devote some time to the drawing stuff, and to the ffc stuff--specifically, user called ffcs--and such, sot hat we can integrate those. I would like to be able to offer something new before the Sommer, so that we attract some users to it, when they have free time, and revitalise the whole bloody thing, as the present userbase is fading away into oblivion partly from the static feeling of the programme.

I suppose the truly twisted thing, is that I'm not intimidated by the sources. I sort of feel at home, and comfortable with them, which is why every time we have a debate like this, I lose my mind.

I have no idea what your definition of 2.6 is any longer, but it is sounding more, and more, as if you mean 3.x; that is, more major changes than what we are even discussing now. Is that right?

Did you foresee two releases before this is added at all? DD was sort of going in circles with some of his planned parser changes, waiting to learn when you were planning to introduce this component, and expecting that it would be script-compatible with all present user scripts. These are the types of things that need absolute clarity.

At least you can see that we're doing something with this, and we didn;t just volunteer to work on 2.54without following through; but the continual change of plan, change of focus, and such, is also putting a pretty big burden on us, to regularly rewrite, re-merge, and changes things that we already completed. I want to solidify some plans, and I need to know if there is going to be a problem in your eyes about some of our plans, or if we should just be doing what we think is best at this stage, with some assurance that the codebase and our changes aren't going to be changed again, in a radical manner that undermines them; and that we won;t be required to rewrrite large sections for a third time, respectively.

I would have already had the merge done, if not for this; and beyond that, my own changes are so extensive, and through so many files, that handling an incremental merge is a tremendous nightmare. The fact that I am at all willing to do that should emphasise my dedication, but I have points where this diverts to bicker mode, and I just cannot care enough to do a blasted thing.

I stalled out again, because of this. I see this going back and forth, and people who are no in any way involved with the development work arguing for or against it, and I don;t feel like working on it. We need to solidify the plan for what is going in the next two releases. The modernised ZScript parser is very close to done, and we can use that. I feel that we should use that, and when you have a working parser, we can look at a way of making it work, and cross-compiling to it, or whatever we want to do.

At present, for canonical ZC, you are the only person with authority to make decisions. If you don;t want to do that, and want to work with us on deciding what belongs in it, then we need to have a discussion on that elsewhere, because I sincerely have no idea what is happening, and I'm not going to pour countless hours into this without knowing the direction. Your definition of 2.5+ is needed here, as I don;t grasp it, and you previously referred to what we were calling 3.0 as 2.6, and I am still very much against any radical engine change, or rewrite being in the 2.xx family.

I'm not willing to work with fully arbitrary version numbering. This is mad enough, without a numbering scheme with no sanity.

In the meanwhile, I need an answer from you in the npcs and items thread, and I'd like to see the script drawing integrated--and we need to discuss that in detail.

[MENTION=42228]ZoriaRPG[/MENTION]:

First off: 2.6, 3.0 whatever. Point being that it is a greater major version than 2.5+.

I purposely put the AS stuff right out there so everyone could see the current status of it. This is here to support legacy scripts in the future: https://github.com/ArmageddonGames/ZeldaClassic/tree/master/src/experimental/asBindings/Legacy It's a lot of work, and you can see that I've already started it.

As I said before ZScript bytecode is not compatible with AS and I don't want to even try to do that. If someone else wants to then feel free to go crazy. I have no idea how this would even work realistically.

DarkDragon asked how long it would take to get something working to support messaging, general scripting, using it, etc.; I said about 10%(something like that) of the total time it would take with ZScript. This may sound strange, but you have to factor in testing, maintenance, features, useability, scalability, debugging, and future features as well. If this is stable for future ZC devs, it's just a win across the board. Keep in mind that jman, Joe123, _L_, Saffith, and myself worked with ZScript code after DD left. That's a lot of people over years of time with little improvements. Long story short is that every one of us probably cringe when someone mentioned a possible bug in ZScript. -Like I said, I'd like the next gen to be happier than we were. But if anyone wants to add messaging, structs, overloads, polymorphism, or whatever else to ZScript then you don't need my approval, you just have to be willing to maintain it for years to come.

ZScript->AS conversion is planned in the form of a tool (built-in or whatever else). It cannot be 100% (unless someone wants to modify the ZC AST to output and prettify scripts, which sounds insane), but I think 99% is good enough. Users will simply have to hand modify some of their scripts that use ints and floats interchangeably that are incorrect for their type, and arrays for strings would probably need to be changed to actual strings. Most scripts are likely trivial, but the more complex the script the more crazy this becomes to automate.

If anyone wants to suggest a way to do this better, and actually do it, then let me know and I'll help with that instead if possible, otherwise I don't have a perfect solution.

Zoria, I love your determination and ambition, but some of your concerns are irrelevant. It doesn't matter if we say 2.6 or 3.0. It doesn't matter if this introduces a drastic change while you tinker with smaller, more useful short term contributions. Nothing about this makes your work for naught.

As a person who has long been wanting to get into contributing to ZC and long intimitaded it, I would rather spend 2 years working on a drastic change that could be a boon with trade off than working 5 years to make stable a few improvements that sounded good at the time. I'm really not interested in playing 10 thousand piece pick up sticks. If that means I have to spend more time digging through documentation and learning implementations of something more complicated then I'd rather put in that work.

How about we drop referring to theoretical builds by number and give them code names like Zelda Modern for the rewrite that will never happen.

Like for the Angel script build it can be... I dunno. Xen. That sounds heavenly.

And you already use Future for your stuff.

There ZC X and ZC F

ZoriaRPG, here is my current understanding of the plan: we will keep supporting ZScript for the foreseeable future. Part of this support will include the changes that we have discussed together, such as moving ZScript to a message-based system, and using this message system to allow scripting of enemies, weapons, etc.

Gleeok is working on an AngelScript engine, and ultimately it makes sense to use AngelScript as the main ZC scripting language, since it is a fully-featured and supported language, rather than hack away at ZScript on our own. But we will not suddenly drop ZScript support, and indeed if all goes according to plan, you will be able to slot in either ZScript or AngelScript handlers for the messages emitted by the game engine, so that you can seamlessly transition from ZScript to AngelScript as you become more comfortable with the latter.

SUCCESSOR wrote:Like for the Angel script build it can be... I dunno. Xen. That sounds heavenly.

And you already use Future for your stuff.


I'm fond of "heaven" and "hell" for the two of them. 😊

SUCCESSOR wrote:Hahaha, that would bee good if they wouldn't both end up being ZC H. People love their shorthand.

ZC Underworld, Purgatory?

Hades also begins with an H.

DarkDragon wrote:ZoriaRPG, here is my current understanding of the plan: we will keep supporting ZScript for the foreseeable future. Part of this support will include the changes that we have discussed together, such as moving ZScript to a message-based system, and using this message system to allow scripting of enemies, weapons, etc.

Gleeok is working on an AngelScript engine, and ultimately it makes sense to use AngelScript as the main ZC scripting language, since it is a fully-featured and supported language, rather than hack away at ZScript on our own. But we will not suddenly drop ZScript support, and indeed if all goes according to plan, you will be able to slot in either ZScript or AngelScript handlers for the messages emitted by the game engine, so that you can seamlessly transition from ZScript to AngelScript as you become more comfortable with the latter.

This is solid, and reasonable. I can work with that. It also allows us to revisit, and reconsider points that are raised along the way.

Gleeok wrote:[MENTION=42228]ZoriaRPG[/MENTION]:

First off: 2.6, 3.0 whatever. Point being that it is a greater major version than 2.5+.

That clarifies it a bit. We did in fact, have an outline for 2.6, specific, which is why this is so bloody confusing.


I purposely put the AS stuff right out there so everyone could see the current status of it. This is here to support legacy scripts in the future: https://github.com/ArmageddonGames/ZeldaClassic/tree/master/src/experimental/asBindings/Legacy It's a lot of work, and you can see that I've already started it.

As I said before ZScript bytecode is not compatible with AS and I don't want to even try to do that. If someone else wants to then feel free to go crazy. I have no idea how this would even work realistically.

DarkDragon asked how long it would take to get something working to support messaging, general scripting, using it, etc.; I said about 10%(something like that) of the total time it would take with ZScript. This may sound strange, but you have to factor in testing, maintenance, features, useability, scalability, debugging, and future features as well. If this is stable for future ZC devs, it's just a win across the board. Keep in mind that jman, Joe123, _L_, Saffith, and myself worked with ZScript code after DD left. That's a lot of people over years of time with little improvements. Long story short is that every one of us probably cringe when someone mentioned a possible bug in ZScript. -Like I said, I'd like the next gen to be happier than we were. But if anyone wants to add messaging, structs, overloads, polymorphism, or whatever else to ZScript then you don't need my approval, you just have to be willing to maintain it for years to come.

Well, as far as I'm aware, the three of us specifically volunteered to maintain this jank. Whether or not everyone maintains their commitment, i can;t say, nor can I predict what I will eat ton the morrow, but I certainly hope that everyone lives up to their word. We do want to work towards a 3.x, eventually. I put quite literally, everything in my life on ice for Dec-January working on this.

I'm also more petrified of engine bugs, than zscript bugs. Once I complete the third merge, I need to see if a few things persist. One of the main issues, is that there are arbitrary hardoced values in places with no explanations for them, so we are essentially required to experiment and see if a change to any of these effects something else.


ZScript->AS conversion is planned in the form of a tool (built-in or whatever else). It cannot be 100% (unless someone wants to modify the ZC AST to output and prettify scripts, which sounds insane), but I think 99% is good enough. Users will simply have to hand modify some of their scripts that use ints and floats interchangeably that are incorrect for their type, and arrays for strings would probably need to be changed to actual strings. Most scripts are likely trivial, but the more complex the script the more crazy this becomes to automate.

I suspect that we could either handle the conversions internally at some future point, or allow using either parsing engine in parallel. It should be possible to maintain internal ZASM calls either way.

I would just cast all ZScript ints to float, or use a special type to handle both. Arrays and strings are another issue, and converting them internally is going to be a burden for the future. Breaking int/float, and arrays, would pretty ,much kill 95% of the present codebase, so we would be required to convert these things.

Honestly, a simple parsing token would be used as a flag on legacy scripts to handle these events.


If anyone wants to suggest a way to do this better, and actually do it, then let me know and I'll help with that instead if possible, otherwise I don't have a perfect solution.

I think it's too early in the game to get any ol us to implement something in the AS engine that would be ideal. A year from now, that may be an entirely different matter, which is why rushing through this now, might not me ideal. In ten months, I may be able to sit down and work on it with you, I don't know if you would want to do that, but for the sake of the future, comment the hell out of this work, so that if we need to go through and rework any components, we can, should you decide to be done, before we get to it.

If y'all want to duplicate this in ZScript anyway then what's the point? We'd just expend multiple resources to do the same thing that are incompatible with each other and still have to be maintained separately. Okay fine; now it's my turn to ask:

How long is this going to take to complete and how many people are going to work on it?

ZoriaRPG wrote:
I think it's too early in the game to get any ol us to implement something in the AS engine that would be ideal. A year from now, that may be an entirely different matter, which is why rushing through this now, might not me ideal. In ten months, I may be able to sit down and work on it with you, I don't know if you would want to do that, but for the sake of the future, comment the hell out of this work, so that if we need to go through and rework any components, we can, should you decide to be done, before we get to it.

A year? No way. The whole rationale of switching to AS is that it's fast. If this takes a year then I'm out right now. Period.

Gleeok wrote:If y'all want to duplicate this in ZScript anyway then what's the point? We'd just expend multiple resources to do the same thing that are incompatible with each other and still have to be maintained separately. Okay fine; now it's my turn to ask:

(Emphasis, mine)

How long is this going to take to complete and how many people are going to work on it?

Clarify 'this' in the above statement, and I can give you a concise answer.

If I wasn't required to make a wholly separate branch per small set of changes, this would be done. Now. As things stand, I now need to go back in, and restart the last merge. Then I need to wait for discussion, and approval, n things that I already know work. Then repeat, for about 100 submissions. I would love to be able to submit changes in sets and get it done quickly, but clearly that isn;t how all of you want to proceed.

This is the problem when I am months ahead on engine changes, before any implementation of the git repo occurs. What do you want me to do?

As things stand, my latest push wasn't able to be automerged because of other changes in the main repo, that occurred between my last push, and the latest one.


A year? No way. The whole rationale of switching to AS is that it's fast. If this takes a year then I'm out right now. Period.

Well, let's count who we have that is even remotely interested in this, and is working on the source. Then, what are our priorities, and what is our release schedule? I was going to do one release every six months. I wanted to have 2.54 out by now, and every time I feel that we are close, we end up in a month-long debate about something.

Are you construing my input as an active developer, in that it is directly meaningful; or am I just throwing opinions to the wind, and waiting for your approval? I thought it was the latter.

I would like to wrap up the stuff that I have working for 2.54, minus one or two things that you won;t approve, unless you approve of how I would change them, integrate it, do some bug testing and bug eradication, and out out a Gamma, That would allow me to focus on this kind of topic, and devote mental energy to it, while doing minor 2l.55 improvements, so that we can get it working for the enxt release. Going in circles like this, means that my work is focused elsewhere. I also think that the drawing stuff has higher priority, because while this is a nice thing to consider, if it isn't going to compile scripts with array and string usage, then it isn't going to compile very much at all.

I have no idea what you want to be doing. I know that I will be doing this for the foreseeable future, at least a few years. That gives me the luxury to plan ahead, and not rush headlong into this change; and it means that I can plan out a series of rewrites to coincide with it. I thought that you were going to make it into a module that can be used with the current implementation, anyway?

I wish you would come over and have a skype discussion with us even once a week, to plan out this kind of thing. We resolve things much more readily that way.

As far as ratrionale, I disagree. The rationalle for shifting to AS is that it would allow things that we cannot do at present, and that it is more optimised with relation to script compiling, and user handling of script content. I do not want to rush it into production.

What I would like to see is array conversion, array pointer handling, and a method of typecasting all ZScript values to any single type. If it can;t do that, then it is a second language, tacked onto ZC. That means that at some point, we will stop adding to ZScript, but still include its parser and ZASM; and all new content will be via AS, and its parser. I don;t like that option, over properly implementing a cross-compiler, or interpreter.

If it was for a ZC version in which we were not concerned with full legacy support, then it wouldn't matter. In that, I want to do massive engine changes and improvements.

What we could do, is simultaneously develop 2.xx and 3.xx. I don't mind that option,particularly if Successor wants to work on rewrites; but I'm not some teenager who can skim this material, pick up in it in a heartbeat, and do something with it. I'm an old codger who takes his time doing everything.

Let's face it... This project is severely understaffed, and no level of re-factoring will change that unless ZC somehow becomes massively more popular. It;s been open for over a year, and you still have precisely the number of new people on board that you did, before you released 2.50.x. I was about ready to just say 'the hell with it', and again resume my plans just to work on the fork, because I'm a bit sick of the arguments.

I can't routinely debate these things, and I need to get the merging done, and get a version in Gamma. I want to get the drawing stuff in it, and I want to get most of our new features in it as well. Link.cpp needs a lot of work for 2.55 that will need to wait, and clearly isn't going into 2.54, because I can;t get anyone else to work on it with me. That seems more important than changing the script engine, at least, to me.

There is still a huge issue with diagonal movement, the user can;t set Link;s hitbox and hit offsets, link's weapons are stuck in limbo, and lots of other stuff needs work, as a priority; ass do weapons, and items.

I want to get a flag editor into 2.55 or 2.6. Bearing all of this to mind, you want me to overview, learn, and master AS not as a user, but as a developer, in a few weeks, or months.

What can I do to please you here? I don;t see this parser as such a high priority, given its low compatibility. If it is a self-contained module that is ready to use, I can integrate it whenever I want, and start putting out 3.x alphas for people to examine. As things stand, I can;t put my own approval on it, particularly wit/h what you outlined earlier. The fact that int 1.5 weill become 1.0 in this engine would break most of the scripts ever made, even without respect to arrays.

This is both because the parser was never configured to truncate those values, or return errors if the wrong type was used, and because users and developers alike advised that int and float were identical, and it didn't matter which was used. I'm not joking about when i say that the vast majority of scripts would not compile without being able to cross both of these into a new type, or crossing them both to float. Almost no script that I, Moosh, Evan, Grayswandir, Dimentio, and who knows else has made, would work if arrays and strings need to be redone.

Most of our stuff relies on how array pointers work. Perhaps if AS can't support them, then it is just the wrong choice for a replacement language. Perhaps we should contact Andreas and see if he is willing to discuss how to make our bizarre types work with a conversion of some kind.

But above all else, I would ask: Who else, developing ZC right now is going to work on this? I know in advance that Dimentio is not. He objects to the whole idea. I can't speak for the others, but if it means taking time away from what we are already doing for ZScript, then I can't justify it. I'm not looking for a quick way out of ZScript. I was only interested in AS because of what it offered to enhance our present scripting capabilities, but if it means rewriting everything, then it's just not practical.

How often have we had that debate; and have people said that it would be almost perfectly compatible; then find some way to justify that some grievous lack of compatibility is worthwhile? If it truly cannot be made to be compatible, then just forget it and work on something else.

I was wondering about why we would develop zscript into a message based language if we were implementing AS

Let me collect some points

Reasons for implementing AS:

Its fast
- it gives us the changes we want in a faction of the time it would take to do the same in zscript with a more robust end result

AS is better
- angelscript is a fully developed, tried and true which will outperform zscript. Zscript was hacked together from some DIY kit and ZC s main devs from the last few years were loathe to touch it.

Reason against AS or doing AS/ZS parallel:

Some users might have to deal with a change

Masochism

[MENTION=42228]ZoriaRPG[/MENTION]

I get what you are saying, but I don't have time right now to go over all of that. I wish you would post smaller chunks of text when there is only a few key points relevant. :/

1) You are making a huge deal about arrays for no good reason. Here is a ZScript array:


int a[] = {1, 2, 3};
//or
int a[3];

Here is an AS array:


int[] a = {1, 2, 3};
//or
int[] a(3);
//or
int[] a; a.Resize(3); //etc..
Array<int> = {1, 2, 3};
Array<ffc> f;
Array<MyClass@> ae;
eweapon[] aew;
//etc....

Oh my god! They are so different I don't know what to do!?

2) int a = 0.5; This will end everything and the sees will boil! ...No. This is caught at compile time. No debugging required, just change the stuff to other stuff when the compiler tells you you fucked it up. ...or... just don't convert it to AS and keep using ZScript. Old quests will still work. ZScript will still work. I've said this enough already.

I know that your scripts are hacks built around the fact that ZScript is very limited in features. Surely you also must recognize that your scripts are by far the most 'out there' and are not a good sample of normal scripts. I'm sorry that migrating your stuff over to AS is by far the absolute worst case scenario, but for most people it's nowhere near as bad. So just keep using ZScript if you want.

I've used angelscript for two side projects over the last 6 years. It works great. The only people not in favor of improved fully-featured script support for future versions seem to be you and Dimentio. If you can explain that without strictly /personal/ reasons or motives and why it is not good for future ZC users then I'm all ears. If you can't then, well, we're just going to have to bring back General Bitching. 😉

ZoriaRPG wrote:Clarify 'this' in the above statement, and I can give you a concise answer.

this = everything that AS already does that would need to be implemented from scratch in ZScript.

ZoriaRPG wrote:
Well, let's count who we have that is even remotely interested in this, and is working on the source. Then, what are our priorities, and what is our release schedule? I was going to do one release every six months. I wanted to have 2.54 out by now, and every time I feel that we are close, we end up in a month-long debate about something.

Are you construing my input as an active developer, in that it is directly meaningful; or am I just throwing opinions to the wind, and waiting for your approval? I thought it was the latter.

It's not me who's arguing with you about /your/ new features, it's the other way around. I try not to interfere with what you want to do at all, but you have to realize that when all the active ZC devs tell you some very small feature is a bad idea and we won't take it it's probably a valid point. I think some of the things you added are pretty cool and hopefully you can streamline the keeping up-to-date with the zc repo to make it easier. I'm the type that likes new stuff. It's unfortunate that I started on ZC when it was such a mess with getting 2.5 done and I couldn't do anything major with it.

ZoriaRPG wrote:
What I would like to see is array conversion, array pointer handling, and a method of typecasting all ZScript values to any single type. If it can;t do that, then it is a second language, tacked onto ZC. That means that at some point, we will stop adding to ZScript, but still include its parser and ZASM; and all new content will be via AS, and its parser. I don;t like that option, over properly implementing a cross-compiler, or interpreter.

If it was for a ZC version in which we were not concerned with full legacy support, then it wouldn't matter. In that, I want to do massive engine changes and improvements.

What we could do, is simultaneously develop 2.xx and 3.xx. I don't mind that option,particularly if Successor wants to work on rewrites; but I'm not some teenager who can skim this material, pick up in it in a heartbeat, and do something with it. I'm an old codger who takes his time doing everything.

It's for both. Existing quests won't use it but new quests will have people switching over to AS.

ZoriaRPG wrote:
Let's face it... This project is severely understaffed, and no level of re-factoring will change that unless ZC somehow becomes massively more popular. It;s been open for over a year, and you still have precisely the number of new people on board that you did, before you released 2.50.x. I was about ready to just say 'the hell with it', and again resume my plans just to work on the fork, because I'm a bit sick of the arguments.

This is why we don't need people working on incompatible things when we can work on the same thing and get it done faster.
Again, I'm not the one arguing.

ZoriaRPG wrote:
I can't routinely debate these things, and I need to get the merging done, and get a version in Gamma. I want to get the drawing stuff in it, and I want to get most of our new features in it as well. Link.cpp needs a lot of work for 2.55 that will need to wait, and clearly isn't going into 2.54, because I can;t get anyone else to work on it with me. That seems more important than changing the script engine, at least, to me.

Link.cpp sucks, but the enemies are needing a rewrite right after the the next (maybe 2 or 3) 2.5+ release. Totally different discussion though.

ZoriaRPG wrote:
Most of our stuff relies on how array pointers work. Perhaps if AS can't support them, then it is just the wrong choice for a replacement language. Perhaps we should contact Andreas and see if he is willing to discuss how to make our bizarre types work with a conversion of some kind.

Arrays are not pointers. Again you refer to /our/ meaning this is a personal matter, not one that reflects the overall ZC community.

ZoriaRPG wrote:
But above all else, I would ask: Who else, developing ZC right now is going to work on this? I know in advance that Dimentio is not. He objects to the whole idea. I can't speak for the others, but if it means taking time away from what we are already doing for ZScript, then I can't justify it. I'm not looking for a quick way out of ZScript. I was only interested in AS because of what it offered to enhance our present scripting capabilities, but if it means rewriting everything, then it's just not practical.

How often have we had that debate; and have people said that it would be almost perfectly compatible; then find some way to justify that some grievous lack of compatibility is worthwhile? If it truly cannot be made to be compatible, then just forget it and work on something else.

What /are/ you doing for ZScript? How am I supposed to know that? Where is the code that does it, or, the spec that defines it? Don't get mad at me for being in the dark here... O_o

ZoriaRPG, the major premise in your post appears to be that if ZC does not support old ZScripts integrating flawlessly with new features, then everybody will refuse to adapt and the change is not worth doing.

I think this position is more conservative than the historical evidence has borne out. Nobody cares nowadays, for instance, that ZAsm is completely incompatible with ZScript and that you cannot easily write ZAsm scripts that interoperate with ZScript. Similarly, if some new hotness like scriptable enemies and weapons works only with AS, I think scripters would learn AS a lot quicker and adapt a lot faster than you give them credit for.

All that said, nobody here is ruling out a 100% working cross compiler, or fully functioning messaging system that supports ZScript and AS side by side. These are separate questions from the main topic here, which is brainstorming a messaging/callback system, a change that will help tremendously in making enemy and weapon scripting tractable, no matter what language the scripts use.

You are right that working simultaneously on AS and ZScript messaging is a spreading-out of scarce resources, but if you and Dimentio care passionately about maintaining compatibility of ZScript, perhaps you can help out with this task. As far as I know nobody (including Gleeok) objects to ZScropt and AS working side by side for the time being.

I denoted the individual, key response points,in bold text, so that you can examine them at your leisure.

Gleeok wrote:[MENTION=42228]ZoriaRPG[/MENTION]

I get what you are saying, but I don't have time right now to go over all of that. I wish you would post smaller chunks of text when there is only a few key points relevant. :/

1) You are making a huge deal about arrays for no good reason. Here is a ZScript array:


int a[] = {1, 2, 3};
//or
int a[3];

Here is an AS array:


int[] a = {1, 2, 3};
//or
int[] a(3);
//or
int[] a; a.Resize(3); //etc..
Array<int> = {1, 2, 3};
Array<ffc> f;
Array<MyClass@> ae;
eweapon[] aew;
//etc....

Oh my god! They are so different I don't know what to do!?

I don't know if you are deliberately mocking me, or if you missed my point; but I will clarify, if the latter. This concerns array pointers, not array declarations:


int foo[32];
int arr[16];
arr[0] = foo; //pointer for foo is stored in arr[0];

int ptr = arr[0];
pr[20] = 5; //foor[20] = 5

This is extremely commonplace array pointer usage. because AS doesn't have (traditional) pointers, I am concerned that this will break.

Will it? Evan effectively begged me at one point to ensure that this would never change. He and Moosh both use arrays by reference in precisely this way in almost every one of their ghost scripts. Gray, ywkls, and I all do so in our engines. It's not trivial, if it changes.

Gleeok wrote:this = everything that AS already does that would need to be implemented from scratch in ZScript.

Here is what we seem to have, as a general plan, with some aspect or another complete.

Additional C Syntax : Switch-Case, Define, Enum, Structs (or something similar), potentially classes. -Grayswandir, minor contribs from me.
Sophisticated Messaging : -DarkDragon
Enhanced string and array usage : Array declaration improvements, usage of maths, and constants for array sizes. String literals (limited, but functional). -Grayswandir
Function pointers, that work similarly to handles in AS. -Grayswandir

I'm sure there are other things that these two are working on at present. I was going to add in enum and define, if Gray doesn't, and I sent him the rules that I wrote for define, and some stuff for constants and other materials. He wanted me to hold off on doing anything else, particularly adding npcdata, and other script types, until he finishes his present round of changes.

I have not focused on the parser itself of late. I mainly worked on the ZScript language, which I shall cover below.


It's not me who's arguing with you about /your/ new features, it's the other way around. I try not to interfere with what you want to do at all, but you have to realize that when all the active ZC devs tell you some very small feature is a bad idea and we won't take it it's probably a valid point. I think some of the things you added are pretty cool and hopefully you can streamline the keeping up-to-date with the zc repo to make it easier. I'm the type that likes new stuff. It's unfortunate that I started on ZC when it was such a mess with getting 2.5 done and I couldn't do anything major with it.

I only wish. If I could submit the changes that you will ratify, and do it in a sane manner, then keeping it up to sate in a streamlined manner would be easy-peasy.

The changes are scattered around in various ways; see the links listing the changes below. There is no way to do this that isn't gong to drive me mad, under the present accepted method. You both want to maintain a repo using pushes, instead of commits. That just isn't hot the software was designed to flipping work. I literally need to make twenty or so identical forks, apply some of the changes to each, and mind, some of these changes depend on one-another, so I need to either (submit incomplete/non-working changes), or (lump more together at one time and hear complaints about total push size)--and pray that some other change doesn't make an auto-merge impossible; and be asked to do it again???

That is absolutely ludicrous. You wonder why I'm not working on AS, and why I frankly don't want to be bothered with it? Hell, I have to merge in Dimentio's changes, too; and when I wake, and think about doing it, I get such a bad taste in my mouth between the constant complaints, and the sheer volume of merging many, many, tiny changes, that I just decide to do something else.


It's for both. Existing quests won't use it but new quests will have people switching over to AS.

(Emphasis, mine.)

Wait, what? Now we're going back again? Can we [B]please clarify if after adding this AS parser, people will be able to flipping compile a ZScript script, without changing it? [/B]I don't care how it's compiled, just that it compiles. What you say here, implies that the change is forced on the user. Earlier you said they could use both or either. Before that, it was one or the other. Which is it, again?

What bothers me, is that even between the last few posts, or in the same post, I see wholly-contradicting points. If your AS implementation is a module, and the ZScript parser will work alongside, in parallel or otherwise, I certain have no objections at all. It is the one-or-the-other philosophy, that brings in potential problems; and aye, I have objections to it, but not merely because of any personal issue. I can easily make a custom ZC build to suit any purpose that I desire, for my own personal needs, or just modify my scripts if I wish. That is not the point; not at all.


This is why we don't need people working on incompatible things when we can work on the same thing and get it done faster.

Again, I'm not the one arguing.

This is what happens when you let four mice out into a cage with cheese at both ends. You want us to work on this thing, we want to work on our thing, and no-one is happy. At present, I think what we want to accomplish, is to get our planned changes in and done, and get out a new version that is both more sable, and offers more to the user, before even considering any other radical changes.

For the most part, expanding the capabilities of ZScript, and adding non-scripting features so that scripting is not mandatory for various effects; and adding in other elements that are useful to scripter and non-scripter alike, have a higher priority to us than making structs, or other far more advanced concepts that AS may offer. What's the carrot here?

I'm the only one adding in actual ZScript commands. I have no problem with the system of doing this at present, and no urgent need to change it. My complaints stem from how the ZC classes are designed, not the way to implement things in the scripting language.

Dimentio wants to work on weapons, items, and strings. He hasn't shown the slightest interest in working on ZScript, AS, or the parser.

Grayswandir seems to enjoy the challenge of adding things to Flex-Bison. I don't know if this is my false perception, but he appears to get a thrill out of making new things work, that he himself added.

The only person so far that seems to care is Successor. Hell, even Tamamo is opposed to this, for no reason that i can clearly comprehend, other than to want something else that she has no specified. Should we just do a Ruby parser, and be done?

-------------------

I know that there is a long-term benefit involved, but when I say that it will be a while before I can get to it, and you flat-out threaten to quit, that just tells me that you don't give a damn. I know you are going through hell in your life. Some of the rest of us are in pretty bad spots, too. I can't just stop everything I'm doing to work on some new aspect that I don;t believe needs to be done immediately; particularly when it is too much trouble to read one of my replies, much less to read through any of the code changes, or other stuff that I've done, or other threads on matters that I feel are important.

Your time is valuable; so is mine. I can't say which is more finite, and limited. I can say that I'm getting far too old to care at times. You probably feel likewise.

-------------------


Arrays are not pointers. Again you refer to /our/ meaning this is a personal matter, not one that reflects the overall ZC community.

See above.

My reference of 'we', 'our', and such, is as a collective, referencing the totality of developers and users; in this case, the types that ZScript, and everyone using it, uses: int float, bool, npc, *weapon, ffc, itrem, itemdata. How was that coded that it wasn't clear?


What /are/ you doing for ZScript? How am I supposed to know that? Where is the code that does it, or, the spec that defines it? Don't get mad at me for being in the dark here... O_o

[/quote]

Everything that I've done is out in the open for scrutiny. I don't feel the need to post every little thing, so I keep a change log, and 'update' docs that anyone may elect to read.

Source Pack
Change Log
ZScript Changes | (Abbreviated form.)
ZScript Syntax Changes
ZQuest Changes
ZStrings Changes
ZC Changes

DarkDragon wrote:ZoriaRPG, the major premise in your post appears to be that if ZC does not support old ZScripts integrating flawlessly with new features, then everybody will refuse to adapt and the change is not worth doing.

I think this position is more conservative than the historical evidence has borne out. Nobody cares nowadays, for instance, that ZAsm is completely incompatible with ZScript and that you cannot easily write ZAsm scripts that interoperate with ZScript. Similarly, if some new hotness like scriptable enemies and weapons works only with AS, I think scripters would learn AS a lot quicker and adapt a lot faster than you give them credit for.

Hmm... Who, in reality, ever used ZASM? I did, a little bit. I know of what..one other user who did? I published one whopping ZASM script in the last ten years, and it does in fact, interoperate. It is designed to do precisely that, to allow 2.5 users to use a feature that was never implemented in ZScript. 😛

I think you underestimate two things. One, is that the majority of ZScript users are not programmers. They manage to hack their way around, stumbling blindly at times, and they are more than happy to accept horrible, bugged results, if they work for their application. This tends to lend to laziness, and the desire not to move to anything new.

The second, is that the number of scripters out in the wild is small, and compared to the library of extant scripts, any new material is likely to me marginal, at best. This limits the resources for the user, and my considerations have the userbase in mind as a whole on this basis, not merely if something is inconvenient to a scripter. It's hard enough to explain how to import and compile a basic script to the average user. They simply are not willing to learn; and stemming from that point, they are not going to edit scripts to bring them in line with a new spec.

No, instead they will ask the scripters to do it for them, as they always do; and this time, no-one will ave any clue what to do, save for perhaps five of us. I can name only one scripter who is a programmer, can comprehend these changes, and is not in some way involved with ZC dev: MoscowModder.

(What happened to that userbase poll? It wasn't by job to run it. In fact, I stayed 20 metres away from that, to avoid any possible impression of a conflict of interest.)

All that said, nobody here is ruling out a 100% working cross compiler, or fully functioning messaging system that supports ZScript and AS side by side. These are separate questions from the main topic here, which is brainstorming a messaging/callback system, a change that will help tremendously in making enemy and weapon scripting tractable, no matter what language the scripts use.

You are right that working simultaneously on AS and ZScript messaging is a spreading-out of scarce resources, but if you and Dimentio care passionately about maintaining compatibility of ZScript, perhaps you can help out with this task. As far as I know nobody (including Gleeok) objects to ZScropt and AS working side by side for the time being.[/QUOTE]

The problem here, is that the idea of them working, side-by-side, seems to be like a pendulum. If they do, fantastic. I couldn't ask for more, as it gives the choice of which to use, to the user, and the choice of which to expand, to the potential developer. I' am however, a bit weary of repeating that I do not have the time at present to dedicate to learning how AS works internally, en lieu of working on my present goals. I suspect that [MENTION=61126]Dimentio[/MENTION] feels likewise.

We both have very specific, and compatible, end-results in mind. There is in fact, a reason that we three, decided to work together. It's because we do not bicker about what we see as our vision for the next ZC/ZQ version. I certainly can't help with a task when the goal is as clear as mud.

The bottom line for me, is that any one of these outcomes should be true:

1. AS is not 100% compatible, but future versions will still support compiling ZScript code. We may even continue to update ZScript, and support both in parallel for a while.

2. AS is 99.9% compatible, with a very rare instance of something needing a change. Note, this does not mean changing types, or how some 'advanced' tricks' such as pointer handling are done. We still support ZScript, somehow, if it is needed, but we don;t spend much time on it.

3. AS is perfectly compatible, every single thing works, we abandon ZScript, and march merrily along.

4. AS doesn't work as planned, and we make ZScript 2.0 the next big bombshell.

The result that I won't accept--meaning, I would be 'done'--is:

D. AS isn't perfectly compatible and we kill the ability to compile ZScript code.

Does that suitably clarify my position on the matter?

If 'ya'all' want me to work on this stuff too, then please, make my job easier. Go over my proposed changes, select what you won't take from the list, let me wholly integrate the rest, and be flipping done with this hellish merging process, so that nay future revisions can be kept in sync with the main codebase. I simply cannot spend countless hours doing, and redoing this shyte.

First thing is first.


int foo[32];
int arr[16];
arr[0] = foo; //pointer for foo is stored in arr[0];

int ptr = arr[0];
pr[20] = 5; //foor[20] = 5


Are people actually doing this? There's so many things wrong with this I can't even fathom. AS will not and should not support this.

Gleeok wrote:First thing is first.

Are people actually doing this? There's so many things wrong with this I can't even fathom. AS will not and should not support this.

Absolutely. Here is the common way that is is used for ghost scripts:


ffc script ghostffc{
void run(){
int arr[32];
///
function(this,ghost,arr);
}
void function(ffc this, npc ghost, int ptr){
this->X = ptr[3]; //etc
}
}

Literally 'every script' that Moosh and Evan have made, does this; in their own words. Evan's statement when I discussed it with him, over a year ago, was something like this:

'Please tell me that this will never change. Everything I do relies on that.'

This is also how many scripters commonly use arrays in scripts, for engines, and otherwise. It is why I brought up array pointers, multiple times. I don't even know of a way to pass arrays in Zscript, otherwise. You need to store pointers for local arrays, to allow other external scripts to access them. Hell, I do it in ffc scripts, by storing the pointer for the ffc's local array in a Misc[] index, then referencing it with external functions. This is because scripts are not handled like classes, and their local variables/arrays can't be accessed with scope resolution; and of course because array pointers aren't handled as in C.

Quite a lot of that is due to the limited size of the Zscript stack, but that doesn't solve the issue of compatibility. No simple change of types, or preprocessor warning, is going to fix this.

If AS supports scope resolution to do that, that's fine; but in order to preserve the extant scripts, if the AS parser can't handle this, then the ZScript parser will need to be maintained in parallel, somehow.

Do you see my reason for concern? I can say with surety, that over 30% of the scripters still around do this stuff, and that half or more of the ZScript Skype members do it routinely. Every ghost script that I have seen from Moosh and Evan does something along these lines. They expect that a pointer can b e passed as an integer; plain and simple. 95% of what all of us do, would break, without this.

I'll even go so far as to note that I recorded a stream explaining how this works for a user, last week. He needed to be able to reference an array local to an ffc with external function calls, so I showed him how to do it, along with a series of warnings. If you want to view that stream, I will upload it. The point is that is is common enough that scripters teach it to one-another, and to new scripters, as the 'standard method' of doing this.

I'll add as an anecdote, that I'm stunned that you aren't aware that ZScript users have been doing this for years. I learnt this technique from Evan, Moosh, and Gray. It explains why you dinna' sense my level of dread when discussing this earlier, why you didn't know why I was mentioning pointers, and some other key factors that I have tried to bring up, only to be met with silence, or seem'd disregard.

They only do it because you have to use hacks to get around the limitations in ZScript. ...But at least tell people that they should not do this with global arrays, or, at least no global array should be used to propagate this behavior from local arrays.

In AS no hack is required; you can pass arrays from anything to anything else if you want so long as it is type-checked. You can even get member variables declared in one script by another script. Heck, you can even have 100 global scripts communicate with each other and destroy/create each other. These are all built-in, and very simple to use script-side and c++ side. That is why I say we'll be saving years of dev time.

But AS compatibility just dropped to no higher than 98% now. :P

In the future just post the thing that is relevant so there's no confusion. I've never seen anyone do this, and it technically should be a compiler error, although it's a little late for that.

Gleeok wrote:They only do it because you have to use hacks to get around the limitations in ZScript. ...But at least tell people that they should not do this with global arrays, or, at least no global array should be used to propagate this behavior from local arrays.

In AS no hack is required; you can pass arrays from anything to anything else if you want so long as it is type-checked. You can even get member variables declared in one script by another script. Heck, you can even have 100 global scripts communicate with each other and destroy/create each other. These are all built-in, and very simple to use script-side and c++ side. That is why I say we'll be saving years of dev time.

But AS compatibility just dropped to no higher than 98% now. :P

In the future just post the thing that is relevant so there's no confusion. I've never seen anyone do this, and it technically should be a compiler error, although it's a little late for that.

(Emphasis, mine.)

A little late for this now, too. I do warn that they need to refresh pointers, and that it can be dangerous (because you may be using the wrong data later), but even I need to do this, but I don;t need the data to persist between saves when I do. I do it because I store all of my global values in one array, and I use indices for pointers. I also use this a great deal for string pointers, to make them available between scripts, externally. That's another area where this is often applied.

Sure, it won't matter for new scripts, but I'm still waiting for absolute clarity on if compiling old scripts via the ZScript parser will be maintained in your plan here. That alone will resolve most user issues, point blank. If they can still use all of their old stuff as-is, and they have the option to convert it to use new features, that would be ideal. I don't have a problem committing to support both languages, if you don;t have a problem allowing me to support both languages.

Hell, I even added a way to get other-typed pointers to my fork. I need to be able to do that, to reference them externally. That's because there is no way to make a global typed array. Even DD admitted that with the stuff that we do, global special type arrays are pretty much needed for ZScript. Not to force pointers to persist, but to store them globally per-session, and to be able to store and reconstruct special-typed data. That is what type->GetPointer() does, as I had mentioned earlier.

Now you know why that sort of thing is so useful to us. Some of my magic is simply impossible without it. That equally applies to everyone else. You should look at Moosh and Evan;s scripts at some point though, and see how common this is. Lejes also used it, as i recall, and I'm fairly certain that it is as common as dirt. Is it because it is a hack required to do something? Certainly. Is that actually bad? I think it;s arguable. You can pass arrays by reference in C/Cpp, which is the equivalent of this.

I'm not sure precisely how AS does it, but clearly it has to allow passing arrays and strings by reference and using them in functions and elsewhere without worrying about scope issues like this.

Take a look at when I documented this on the Wiki. You might want to read some of this stuff, at some point; you know? (That is my comment, at the end of the page, too.)

I should further note that this is similarly used for psuedo-2D arrays, and for mass string handling, and en-queueing.


int string1[]="foo";
int string2[]="bar";
int string3[]="rats";
int string4[]="meatballs";

int strings={string1,string2,string3,string4};
//Draw strings to the screen in a for loops using the 'strings' array, one at a time, adjusting their positions.

That is how every quest that has scripted credits rolls, scrolling text, or otherwise handles this. make the strings, and store their pointers in an array, so that you can iterate them with drawstring using a for loop (using their pointers).


int subscreen[265];
int positions[16];
int items[16];

//etc

subscreen[0] = positions;
subscreen[1] = items;
//etc

//iterate subscreen[] and do all events from the iteration, because ZScript doesn't have real 2D or 3D arrays. Huzzah

I am not joking when I say it is used EVERYWHERE, by EVERYONE. I know for a fact that Lejes and MoscowModder did both of the above things. This is how I was taught] to do it. Hell, does Tango.zh do it for scrolling strings? Probably not, but everyone else that does scrolling text, or wants to manipulate many strings does it.

I was taught the '2D array' thing by MoscowModder, and people often (poorly) explain it as 'storing one array within another', which it does not do. I always clarify that you are merely storing the pointer. [MENTION=42509]Grayswandir[/MENTION] also teaches it to everyone, as do I. It is a staple of ZScript. 😛

[MENTION=42228]ZoriaRPG[/MENTION] please just stop, that is and has always been nothing but foolishness, it's why i stopped scripting in the first place. I just couldn't handle having to write bad code to do the shit I wanted to do.

Tamamo wrote:[MENTION=42228]ZoriaRPG[/MENTION] please just stop, that is and has always been nothing but foolishness, it's why i stopped scripting in the first place. I just couldn't handle having to write bad code to do the shit I wanted to do.

Hmm... You're the one who dubbed me the 'ambassador' to the ZC community. If you don't like me doing that job, shut it, and blame yourself. 😃

Or perhaps both of you could knock it off.
-KA-

I just wanted to mention that I picked up the array thing from reading through ghost.zh. So, blame Saffith. :P

Of course, seeing that ghost uses it, you'd end up breaking quite a lot of things if you don't support it.

The heart of the problem is that ZScript treats int and int[] as the same thing. You can do the same trick for the other types as well, but I don't know of anybody doing that.

If we end up compiling ZScript to AS (still not sure what the exact plan is), it shouldn't be too hard to fix. Just treat ZScript's arrays as their own "thing", separate from actual AS arrays. Just keep a table of them, and look them up anytime you do an array dereference. So, just compile them to eg. ZS_Array_Get(int id, int index) and similar instead of actual array references.

If we're having ZScript and AS side by side, it's a non-issue. If we want ZScript and AS to be able to interact with each other - well, that was gonna be a mess anyway.

Edit: relevant section of ghost.zh:
[C] // Remember all the global variables

// Initializing the array is faster than setting it up afterward...
// but the difference is probably negligible, realistically
float tempGhostData[24] = {
Ghost_X, // 0
Ghost_Y, // 1
Ghost_Z, // 2
Ghost_Jump, // 3
Ghost_Vx, // 4
Ghost_Vy, // 5
Ghost_Ax, // 6
Ghost_Ay, // 7
__Ghost_PrevX, // 8
__Ghost_PrevY, // 9
Ghost_CSet, // 10
Ghost_Dir, // 11
Ghost_Data, // 12
Ghost_TileWidth, // 13
Ghost_TileHeight, // 14
__Ghost_Flags, // 15
__Ghost_Flags2, // 16
__Ghost_InternalFlags, // 17
__Ghost_FlashCounter, // 18
__Ghost_KnockbackCounter, // 19
Ghost_HP, // 20
__Ghost_XOffsets, // 21
__Ghost_YOffsets // 22
// 23 is for either drawingData or tempGhostAdditionalCombos;
// update DrawGhostFFCs if that changes
};
int tempGhostAdditionalCombos[21]; // Same size as __Ghost_AdditionalCombos
// Change it in the loop below, too
if(__Ghost_AdditionalCombos[0]>0)
{
for(int i=0; i<21; i++)
tempGhostAdditionalCombos[i]=__Ghost_AdditionalCombos[i];
}

// Give ghost an array pointer so its data can be found by other scripts
if(ghost->isValid())
ghost->Misc[__GHI_NPC_DATA]=0x10000|tempGhostData;

[/C]

Grayswandir wrote:I just wanted to mention that I picked up the array thing from reading through ghost.zh. So, blame Saffith. :P

Of course, seeing that ghost uses it, you'd end up breaking quite a lot of things if you don't support it.

The heart of the problem is that ZScript treats int and int[] as the same thing. You can do the same trick for the other types as well, but I don't know of anybody doing that.

If we end up compiling ZScript to AS (still not sure what the exact plan is), it shouldn't be too hard to fix. Just treat ZScript's arrays as their own "thing", separate from actual AS arrays. Just keep a table of them, and look them up anytime you do an array dereference. So, just compile them to eg. ZS_Array_Get(int id, int index) and similar instead of actual array references.

Oh, yes, you do. Have you never seen me do this with ffcs or items? I also do it with itemdata now. :/

I second this suggestion. I mentioned earlier, that we should just treat all of the ZScript types as special cases to handle them and avoid all of this incompatibility nonsense.


If we're having ZScript and AS side by side, it's a non-issue. If we want ZScript and AS to be able to interact with each other - well, that was gonna be a mess anyway.

Precisely. My second option, is parallel operation, with no direct communication. I suppose the ZScript messaging and AS messaging could be used as an interface, but if you are going to do that, you may as well implement all the types in some fashion.

So, compatibility of 40% now? Huzzah, huzzah. I often hate the accuracy of my predictions. 😞

[MENTION=42228]ZoriaRPG[/MENTION]
Why don't we go for 0% compatibility and you learn to deal with it. Gleeok already pretty much decided he is not dropping support for ZScript. "since that's crazysauce"
There is therefore no reason for AS and ZScript to be compatible. Pick one or the other, or may'be both who knows.

Therefore every argument you make is invalid. Hence why I am annoyed at you.
Sorry if this makes me sound like a bitch.
[MENTION=42714]Gleeok[/MENTION]
Any chance I can convince you to ditch the AS compiler for ZScript, i would rather we play it safe and not have zscript and as interacting with one another... Too much can go wrong.

the answer for the zscript thing is already "no, that's dumb". It will take significantly more work for significantly less gain. It seems obvious.

Tamamo wrote:Any chance I can convince you to ditch the AS compiler for ZScript, i would rather we play it safe and not have zscript and as interacting with one another... Too much can go wrong.

I was thinking we'd just expose the ZScript internals to AS as a custom data type or something. Nothing fancy, just let AS get/set any arbitrary ZS variable, no complicated timing or waitdraws or whatever.

In any case, whether it's added or not, I don't believe interaction between the two will affect the current part of the design at all. The decision can be safely put off until AS and ZS are working side by side in the first place.

Tamamo wrote:
Why don't we go for 0% compatibility and you learn to deal with it. Gleeok already pretty much decided he is not dropping support for ZScript. "since that's crazysauce"
There is therefore no reason for AS and ZScript to be compatible. Pick one or the other, or may'be both who knows.

ZoriaRPG wrote:Precisely. My second option, is parallel operation, with no direct communication. I suppose the ZScript messaging and AS messaging could be used as an interface, but if you are going to do that, you may as well implement all the types in some fashion.

I don't see what you're talking about, Tamamo :P

Gleeok wrote:They only do it because you have to use hacks to get around the limitations in ZScript. ...But at least tell people that they should not do this with global arrays, or, at least no global array should be used to propagate this behavior from local arrays.

I mostly do it because my waitframe functions tend to get more and more arguments as I work on a boss. Every time the number of arguments changes I have to change every instance of those functions, so it's faster to just cram most of them in an array.

So for a boss with laser attacks I might have something like this:

int laserX[32]; //Laser X position
int laserY[32]; //Laser Y position
int laserA[32]; //Laser angle
int laserW[32]; //Laser width
int laserT[32]; //Laser timer
int vars[16] = {laserX, laserY, laserA, laserW, laserT};

void Example_Waitframe(ffc this, npc ghost, int vars){
Example_UpdateLasers(this, ghost, vars);
Ghost_Waitframe(this, ghost, true, true);
}
void Example_UpdateLasers(ffc this, npc ghost, int vars){
int laserX = vars[0];
int laserY = vars[1];
int laserA = vars[2];
int laserW = vars[3];
int laserT = vars[4];
for(int i=0; i<SizeOfArray(laserX); i++){
//pretend this is actually doing something
}
}

I see no use in doing this with global arrays so no worries there. And echoing what Grayswandir said, I learned to do this from looking at some of Saffith's scripts. I LEARNED IT FROM YOU, DAD! I LEARNED IT FROM WATCHING YOU! :P

Here is my announcement: We are officially ditching both ZScript and AS for the only appropriate language:

[spoiler]
Klingonese. I don't believe it has a translation for 'compromise', and its predilection for insults, bater, and argumentative and arrogant posturing, all seem wildly appropriate.
[/spoiler]

End of report.

/and I used to be so damned polite./

:banghead:

Moosh wrote:I mostly do it because my waitframe functions tend to get more and more arguments as I work on a boss. Every time the number of arguments changes I have to change every instance of those functions, so it's faster to just cram most of them in an array.

So for a boss with laser attacks I might have something like this:

int laserX[32]; //Laser X position
int laserY[32]; //Laser Y position
int laserA[32]; //Laser angle
int laserW[32]; //Laser width
int laserT[32]; //Laser timer
int vars[16] = {laserX, laserY, laserA, laserW, laserT};

void Example_Waitframe(ffc this, npc ghost, int vars){
Example_UpdateLasers(this, ghost, vars);
Ghost_Waitframe(this, ghost, true, true);
}
void Example_UpdateLasers(ffc this, npc ghost, int vars){
int laserX = vars[0];
int laserY = vars[1];
int laserA = vars[2];
int laserW = vars[3];
int laserT = vars[4];
for(int i=0; i<SizeOfArray(laserX); i++){
//pretend this is actually doing something
}
}

I see no use in doing this with global arrays so no worries there. And echoing what Grayswandir said, I learned to do this from looking at some of Saffith's scripts. I LEARNED IT FROM YOU, DAD! I LEARNED IT FROM WATCHING YOU! :P

O.o

You can do this?! Why do you do this? Why not just pass one big laser array?