View Single Post
Old January 12th, 2012 (03:26 AM).
Darthatron's Avatar
Darthatron Darthatron is offline
Silver Tier
Join Date: Jan 2006
Location: Melbourne, Australia
Age: 23
Gender: Male
Nature: Modest
Posts: 1,152
Quote originally posted by tinix:
Another idea ive got is some kind of plugin system, so people can extend the editor without messing with original source code. So for example I want the editor to be able to compile ASM, I make an DLL that can have pre-defined entry point for program to find. Then I open the editor open some kind of dialog for adding extensions and it would load the assembly and add it to the menu (or another dialog with extensions) from which I can invoke the extension.
Ugh. That would take so much effort to implement. It's going to be open source. People can just edit it.
Quote originally posted by hinkage:
I think you should treat Person Events as objects, and things like applymovement as methods. (Java style)


#org mainorg
player.lock(); // lock
player.move1(up, down, left, end); // applymovement move1 PLAYER
msgbox.talk1("Hello there, " + \v\h01 + "!"; noclose); // msgbox talk1 callstd msg_noclose; // call suborg
player.release(); // release

#org suborg
var4001 = 1; // setvar 0x4001 0x1
if (var4001 == 0x1); // compare 0x4001 0x1, if ==
var4001 = 2; // setvar 0x4001 0x2

// #org move1
m walk_up walk_down walk_left end

// #org talk1
= Hello there, \v\h01!

As you can see, this is all just aesthetics (the comments are PKSV style).

In addition, please use black font for normal syntax. Also give some syntax, like msgbox or if, bold, dark blue font like PKSV does. I find that really helpful. I think being able to add comments to the script would also be very useful. Everything else you've done so far is good. I especially like being able to put movements/text on the same line as the command.

This would help beginners program in a more realistic way.
I don't like Java. But... I guess. Maybe.
Quote originally posted by Sawakita:
Looks good. I personally like the C syntax better (might just be because of consuetude).

About suggestions, I don't know how much it would be worth it, but what about implementing a VisualStudio-like "intellisense" (sorry for using that word since I know many persons can't stand it, but it explains the idea)? So when you open a parenthesis after the function name, a tool-tip-text pops up showing possible arguments for that function.
I was already planning on including something like this. I have the base coded already.
Quote originally posted by Sande:
I'm really new to hacking etc but I am actually studying IT. I just had a class with some assembler coding this semester.
I don't know how many possibilities are available for hacking but maybe you can do one of these things:
1) for/while cycle.
2)Or something like this:
[insert command here] * 6; // do something 6 times no matter what it is. Would be easier than a for cycle and better to code. Also, no-one can possibly create an endless for cycle this way. Then again if your stupidity reaches a critical mass it might happen anyway.
Nope. I think for loops are easy enough anyway.
Quote originally posted by Sande:
Also, working slowly on a hack that will have a lot of puns/jokes and hidden easter eggs in it. I have designed a map and a rough storyline, but as I'm still learning to script it will take a lot of time until I'm ready to come out with it.
Quote originally posted by DavidJCobb:
Now that I look at the specific example you've given, the differences are minimal. XSE (as I usually see it posted here) just looks cleaner because it's lowercase. :\

I've seen other examples of PokeScript and PKSV on the boards, though, and those usually look quite a bit messier. Dollar signs, weird command names...
Haha, indeed.
Quote originally posted by Spherical Ice:
I agree with DavidJCobb's idea for the layout purely because I'm more used to that kind of style.
Though the colours - the orange in particular - tend to hurt my eyes. I'd suggest making ordinary commands (which are in blue) plain black, and then the text using the orange to become the blue. Though I guess then non-commands won't be, idk. This looks great though, good luck (not that you need luck).
Hmm, you may be right. Colors will be customizable anyway, but it's probably better to make make them basic colors for now.
Quote originally posted by Truality:
The inline thing is a good feature indeed. I'm fine with both layouts, but I wonder if you're going to include something like what XSE has on its friendly user interface; a built-in guide/command list and/or a text adjuster.

Overall, best of luck with the project!
Of course. Both of those things.
Quote originally posted by droomph:
Also, maybe an x-code thing where it guesses which function you're going to do?

For example I type in "p" and xcode guesses that I'm going to do "printf", so it prints out in gray, "printf ("message");", and if I decide to keep it...

Something like that.
Er... Maybe. It's a good idea, but may be difficult to implement.
Quote originally posted by droomph:
How about making a loop thing?

I mean,
for (variable = number, variableoperate, variable condition number)
	loop statement
	return '}

	setvar variable number
	compare variable number
	if1 condition @loop
	jump @next

	compare variable number
	if1 condition @loop
	jump @next

It's totally possible.
I really don't see For Loop shorthand as necessary.
Quote originally posted by droomph:
Quote originally posted by droomph:
aww no mac

best of luck!
Yeah. I might code a compiler in C, and build it for Mac and PC, but Mac won't get a GUI. I don't have a mac to test on.
Quote originally posted by Lawrenсe:
I prefer the C-style, but lowercased commands and keywords. Also, coming from a programming (Java) background and wanting to take up scripting, I like to see the print command: message.print("this is a message!"); or msgbox.print("this is a message!");.
Er... That's just a longer name. Seems silly to me.
Quote originally posted by Lawrenсe:
I'm not all that familiar with other scripting formats, but I find applymovement too lengthy of a command; how about reducing it to just move? If you want to move that player, then we use move(player, movement commands) or if any other NPC, we use move(var, commands) where var is the players number or whatever.. I'm just blabbering, lol.

The in-line feature is actually pretty great to implement.

#org @main
lock; faceplayer;
move(PLAYER, 0x1 0x2);
move(10, 0x1 0x2);
move(10, @movement);
message.print("a message!", #6); // in-line
message.print(@msg, #6); // or without the hash-tag.
release; end;

#text @msg
= this is a message!

#raw @movement
= 0x1 0x2 0xFF
Something like this. Or not.
Command names will be customizable, so you can change them to whatever you like.
Quote originally posted by Lawrenсe:
Also, the colors are fine except the orange; what about just simple dark gray or something close to black?
Suggestion noted.
Quote originally posted by IIMarckus:
Providing a GUI editor is fine, but please provide at least a basic command‐line option for people who like to use other text editors like vi.

Also, making it open source would be a great idea.
Deal. To both suggestions.
Quote originally posted by Stash:
Adding a looping feature is very good idea:

loop(@i ; 10)
      message("Message " + i);

loop(@i ; 10) :
message("Message " + i);
@i declares an integer variable and 10 represents how many times the loop will iterate. Using for or while might be a little confusing to some so using a keyword like loop explains what will happen upon usage better. I also am fond of using brackets since they organize the script, but not really needed. This is regards for a loop. I haven't seen something similar to this in other languages, so this will be great if it is to be implemented. Having a script editor that have a close syntax to an actual programming language would be great, at least in my opinion.
Ugh. I guess everyone wants a loop. Can someone give me an example of why this would be needed. Any script example would be great. Thanks.
Quote originally posted by tinix:
Well you can already do this in XSE by doing something like this:
#dynamic 0x80000
#org @main
setvar 0x8000 0x0
goto @loop
#org @loop
compare 0x8000 0xA
if 0x1 goto @cont
//Code Here
addvar 0x8000 0x1
goto @loop
#org @cont
Anyway I think it is great idea to have loops implemented with less annoying syntax.
EDIT: This is very similar to Assembler loops and I think that if we will be implementing some other dialect for scripting whit some advanced freatures like loops or objects, we should treat XSE like "assembly". By that I mean like C on computers which is compiled into assembly and the machine code. We could make the compiler compile the new dialect into machine code BUT any freature of the new dialect must be implementable somehow through the "assembly" (XSE in our case).

I also support this.
Quote originally posted by DavidJCobb:
It's my understanding that there actually are other move-related commands, which teleport a sprite instead of having it execute a movement sequence. Ergo "move" as a command name would be too ambiguous.
Quote originally posted by link12552:
Someone mentioned a smart intellisense type dialog, I think that would be wonderful!
(no more having to guess what variable goes where)
Quote originally posted by link12552:
And on second thought, I don't know if all these colors are necessary for the highlighting.
Just blue and black, with maybe red for defined terms, would be very easy on the eyes.

Blue = things like "if" and all the functions,
Red = defined terms, from the custom definitions and the predefined ones, they might begin with the #,
Green = commented lines,
Black = everything else.

It can be hard to see the orange font if you have, say a dim laptop screen, or there is a source of light/glare.
That could work.
Quote originally posted by link12552:
I was also wondering if you were going to use c# or c/c++ style naming convention.

c/c++ contains more all caps and all lowercase terms, where as in c# most terms begin with a capital letter, and are lowercase except if the term, is a combination of multiple words.
(ex: applymovement vs ApplyMovement)
Well... I'm undecided. I was just going to allow both. But I could add something to change the case if everyone would prefer. Right now it allows for either.

*Sorry if I seem blunt, but there was a lot to reply to.
あなた は しきしゃ です
わたし は ばか です