Author Topic: Brick++ (Brick Language)  (Read 4071 times)



Project
Simple (not really) project where a user learns a form of "language" to "program" bricks instead of eventing them with click and pick. The project would first - remove the wrench.

The wrench would be replaced by adding a tool called "BrickModder." The BrickModder tool is used to program bricks. When you are finished programming the brick, you simply press "Save" and the brick will be saved. Below I will explain my idea of the syntax of the language.

Syntax
A hello world program would look something like this:


self.activate(brick,player)
[
   var name, blid
   name = player.name
   blid = player.bl_id
   player.centerPrint("You are " > name < " BLID " > blid < "\n"-3)
]


This simple program would have the name of the player who activated the brick have a center print of "You are YourNameHere blid YourBLIDHere" for 3 seconds. Simple, eh? Since I really haven't had much work done on the structure of the language, I haven't gotten much done on the actual code of the language. I just changed a few things around. If a player can learn this, if he changed his mind set a bit, he could easily become a programming for add-ons.

Progress
Language Interpreter - 0%
General Input Methods - 10% - Wrote the onActivate command
Client/GUI - 0%
Item - 0%
Not much is done, though it will take a bit. I will be showcasing the client and beta here. So keep I'll keep you posted.

Post what you think about the idea. Ill be posting more ideas on the syntax below.
« Last Edit: February 08, 2012, 07:25:57 PM by Brian Smithers »


Why remove the wrench? It's not only used for events.

Isn't this a little over complicated? What makes this better than events?

Brackets. It's not programming without them. Also, you use of ; is inconsistent

Brackets. It's not programming without them. Also, you use of ; is inconsistent
Woops, my mistake

Albeit the fact that this would be more expansive than events, it also makes it much more complex and only accounts for what syntaxes you think of. I think keeping the wrench and "Brickmodder" seperate would be a good idea.

self.activate(brick,player)
[
   var name, blid
   name = player.name
   blid = player.bl_id
   player.centerPrint("You are " > name < " BLID " > blid < "\n"-3)
]

Would it not look more like this?
Code: [Select]
BrickNameData::onActivate(%brick, %player)
{
%name = %player.name;
%blid = %player.bl_id;
%player.centerPrint("You are " @ %name @ " BLID " @ %blid @ "\n"-3);
}

Would it not look more like this?
Code: [Select]
BrickNameData::onActivate(%brick, %player)
{
%name = %player.name;
%blid = %player.bl_id;
%player.centerPrint("You are " @ %name @ " BLID " @ %blid @ "\n"-3);
}
It's not TorqueScript, what he's proposing is a ish new programming language for beginners, etc.

Code: [Select]
class OttosBrick
[
public:
player.killYou();
private:
player.dontKillMe();
self.onPlayerTouch(player);
]

player.OttosBrick::killYou()
[
kill();
messageClient(client, '', "\c6lol!");
]

player.OttosBrick::dontKillMe()
[
messageClient(client, '', "\c6ok no problem bro");
]

self.OttosBrick::onPlayerTouch(player)
[
player.killYou();
]

 :cookieMonster:


Ugh, boring string stuff is boring. Working on interpreting now.
The way it works
%brick.isBPPMethod(%method) - Returns boolean whether or not the brick uses that method "EX: brick.activate(player)"
%brick.runBPPMethod(%method,%args) - Calls the method
Those are the main things.
Then it will also have (probably)
%brick.getBPPMethod(%method) - Returns the string of data that is in the method
%brick.getMethodVars(%str) - Returns the variables used in the method (str)
%brick.isMethodVar(%str,%var) - Returns whether or not the variable is stated in beginning (to make sure it's variable)
%brick.getBPPVar(%var) - Returns the variable if it contains stuff.

This is pretty stupid I have to say.

Alot of the younger community doesn't know stuff when it comes to eventing. There isn't even alot of people who are what's considered "good" at eventing. So why the forget would you make a whole new thing that PROGRAMS just to confuse players more.

Simple stuff just gets more complicated, events is enough.

Wait, is this implying that Torquescript is hard? Ha. Funny joke.

Sounds cool. will try upon release.

Wait, is this implying that Torquescript is hard? Ha. Funny joke.
No lol
This is pretty stupid I have to say.

Alot of the younger community doesn't know stuff when it comes to eventing. There isn't even alot of people who are what's considered "good" at eventing. So why the forget would you make a whole new thing that PROGRAMS just to confuse players more.
433
Simple stuff just gets more complicated, events is enough.
Look, I'll be 100% honest with you. If they can't figurd this out them selves
Then they can leave my server lol. Just like the brick wire things. This  is a little hard.
Deal with it
« Last Edit: February 09, 2012, 07:19:48 AM by Brian Smithers »