The best language for making bots?

Ask questions about bots programming, discuss bot programming or just show off your bot. Topics are not required to be about bots for VP.

The best language for bots?

VB
5
50%
C
0
No votes
C++
2
20%
C#
1
10%
VB.NET
1
10%
Java
0
No votes
PHP?(its possible...but not ideal imo, but why not add it..)
1
10%
Did i forget something?
0
No votes
 
Total votes: 10

Minipixel
Member
Posts: 11
Joined: Sat Apr 28, 2007 11:45 am

The best language for making bots?

Post by Minipixel »

Hi guys, long time no see. :D

I was wondering, What do you think is better for bots?
So it may be faster or maybe better support for the sdk or whatever you can think of, vote!! :P

(Please post why you did choose for that lang. too.)


[edit]
I did pick VB.NET as my first choice, I like it because vb stays my best buddy haha.
But for the crossplatform and such i would go for C++ as my 2nd choice.
KiraNL - SKL Rooting Team
Xenion
Moderator
Posts: 49
Joined: Sun Apr 15, 2007 7:38 pm
Location: Belgium
Contact:

Post by Xenion »

I go for the old VB since it runs the best on my crappy pc :D
K-4U
Member
Posts: 13
Joined: Thu May 24, 2007 1:33 pm
Contact:

Post by K-4U »

Jepz, VB the best. and i mean it!
Edwin
Site Admin
Posts: 163
Joined: Mon Apr 09, 2007 10:04 am
Location: Almere, The Netherlands
Contact:

Post by Edwin »

C++ for the win!! :-)
Remco
Member
Posts: 9
Joined: Tue May 01, 2007 4:17 pm

Re:

Post by Remco »

Edwin wrote:C++ for the win!! :-)
/agree
Xenion
Moderator
Posts: 49
Joined: Sun Apr 15, 2007 7:38 pm
Location: Belgium
Contact:

Re: Re:

Post by Xenion »

Remco wrote:
Edwin wrote:C++ for the win!! :-)
/agree
2 bad i don't have the time to learn it. It all looks so complicated :p
So i'll stick to VB for now.
Edwin
Site Admin
Posts: 163
Joined: Mon Apr 09, 2007 10:04 am
Location: Almere, The Netherlands
Contact:

Re: Re:

Post by Edwin »

Xenion wrote:
Remco wrote:
Edwin wrote:C++ for the win!! :-)
/agree
2 bad i don't have the time to learn it. It all looks so complicated :p
So i'll stick to VB for now.
Then it might be better to move on to VB.Net if you're still using VB6 because it is newer and there will probably be a VP SDK for it :-P. Someone might write a VB6 SDK, but that won't be be me. :roll:
Xenion
Moderator
Posts: 49
Joined: Sun Apr 15, 2007 7:38 pm
Location: Belgium
Contact:

Re: Re:

Post by Xenion »

I sometimes use VB.NET but I just don't like it. They made simple tings complicated and complicated things simple :s
Minipixel
Member
Posts: 11
Joined: Sat Apr 28, 2007 11:45 am

Re: The best language for making bots?

Post by Minipixel »

@ edwin, Me nether,but i will make much of vb.net bot examples to make people more intrested, and ofcource Kirubo (aka the old Toxic project) will come!! :P
KiraNL - SKL Rooting Team
Edwin
Site Admin
Posts: 163
Joined: Mon Apr 09, 2007 10:04 am
Location: Almere, The Netherlands
Contact:

Re: Re:

Post by Edwin »

Xenion wrote:I sometimes use VB.NET but I just don't like it. They made simple tings complicated and complicated things simple :s
I agree, I haven't used VB.Net a lot but I know this is true. VB looks easy but it isn't allways clear what's happening. Maybe you could try C#, it is also using .Net but has a very clear syntax. But as with all new things, you will have to get used to it. I moved from VB6, looked at VB.Net, didn't like it and gone to C# immediately. Later I moved to C++ which I'm using now. I did some Perl and Java too. :mrgreen:
Xenion
Moderator
Posts: 49
Joined: Sun Apr 15, 2007 7:38 pm
Location: Belgium
Contact:

Re: Re:

Post by Xenion »

Edwin wrote:
Xenion wrote:I sometimes use VB.NET but I just don't like it. They made simple tings complicated and complicated things simple :s
I agree, I haven't used VB.Net a lot but I know this is true. VB looks easy but it isn't allways clear what's happening. Maybe you could try C#, it is also using .Net but has a very clear syntax. But as with all new things, you will have to get used to it. I moved from VB6, looked at VB.Net, didn't like it and gone to C# immediately. Later I moved to C++ which I'm using now. I did some Perl and Java too. :mrgreen:
Ok I'll take a look at C#(.NET). I also tried C++ but it looked too complicated :p
Rudy
Member
Posts: 36
Joined: Thu Apr 12, 2007 6:39 pm

Re: The best language for making bots?

Post by Rudy »

Visual Basic, no doubt.
i'm not a professional, so i don't care whether i have to wait 1 tenth of a second or 2 tenths of a second for a response :P it's easy, reliable (i haven't encountered errors yet) and easy to learn :)
Xenion
Moderator
Posts: 49
Joined: Sun Apr 15, 2007 7:38 pm
Location: Belgium
Contact:

Re: The best language for making bots?

Post by Xenion »

Rudy wrote:Visual Basic, no doubt.
i'm not a professional, so i don't care whether i have to wait 1 tenth of a second or 2 tenths of a second for a response :P it's easy, reliable (i haven't encountered errors yet) and easy to learn :)
I totaly agree, although I do want to learn a C language. I just made 2 C++ bots and what I notice as a big advantage is the speed, and the up-to-date'ness of the sdk. AW doesn't care about non-C-programmers.
K-4U
Member
Posts: 13
Joined: Thu May 24, 2007 1:33 pm
Contact:

Re: The best language for making bots?

Post by K-4U »

Yeah, loving C++, right Xenion!

Meh, since i have made these bots, i've become better at bots, so i don't really care which lang the sdk wil be produced...
cube3
New member
Posts: 4
Joined: Fri May 11, 2007 12:52 pm

Re: The best language for making bots?

Post by cube3 »

They are all good for this, except PHP Its possible but wouldn't recommend it for an object oriented language. VB is to my knowledge not really cross platform, although for a BOT its not really that important to support cross platform applications.

C++ often requires knwledge on the lower level to make it truly cross platform. So I really like to develop on a cross platform framework language such as .NET. I have not tried out wxWidgets .NET yet but when devleoping on OpenGL libraries for .NET you can publish cross-platform with minimal code adjustments.

So I would recommend VB.NET or C# with wxWidgets.NET and OpenGL. You can also expose bot interfaces as COM so you can support the VB6 / Microsoft managed C++ users without having to write extra code.

I think there are also wrappers for unmanaged C++ to call .NET libraries.

Ofcourse if you develop in C++ it also works the other way around, but again, C++ does not have one standardized development framework, but there are many frameworks. Which can make cross platform implementations very complicated.

Like Edwin I have been working on a VR environment for some years now, my focus has been primarily on the architecture, how broad can it be used for example.

Here are some examples of my BOT interface to the platform 3D environment. Note its a more High Level Language and much more managed than that off ActiveWorlds SDK. Furthermore the bot can not only interact with text, or 3D objects. It has access to EVERYTHING. furthermore a bot can be configured to run via Internet Connection or Plugged in to the Universe Server directly (for performance). With allowing a BOT to have complete control you can do more with it than just 3D VR Worlds. IE. 2D or Pseudo 3D games are also possible.

We have been privately developing this platform, but I am looking on opening up Platform3D bot development this year.

In this example it sends a welcome greeting to the user and adds skybox (i.e. the world will be controlled by a bot).

It also interacts with user status changes, in just a couple lines of code (most code is generate through intellisens). It currently supports:
  • VB.NET
    C#
    MS C++
    DELPHI
In the Near Future these languages will also be supported
  • VB6
    Java
PLATFORM3D BOT SDK Examples

In VB.NET

Code: Select all

Public Class GreeterBotExample
    Inherits BaseBot

Public Sub New(ByVal configuration As ClientEngineInstanceConfiguration)
    MyBase.New(configuration)
    AddHandler MyBase.OnEnterWorldResponse, New EnterWorldResponseDelegate(AddressOf Me.GreeterBotExample_OnEnterWorldResponse)
    AddHandler MyBase.OnServerConnectResponse, New ServerConnectResponseDelegate(AddressOf Me.GreeterBotExample_OnServerConnectResponse)
    AddHandler MyBase.OnLifeformChatStatusChanged, New OnLifeformChatStatusChangedDelegate(AddressOf Me.GreeterBotExample_OnLifeformChatStatusChanged)
    MyBase.Start
End Sub

 Private Sub GreeterBotExample_OnEnterWorldResponse(ByVal sender As EnterWorldResponseMessage, ByVal e As EventArgs)
    If ((Not sender.LifeformId.Value Is MyBase.BotId) AndAlso (sender.EnumResponseCode = WorldResponseCode.WORLD_LIFEFORM_ENTERED_SUCCESSFULLY)) Then
        MyBase.BeginSendChatMesage((sender.LifeformName.Value & " enters..."), ChatMessageType.CHAT_MESSAGE_PUBLIC, 0)
        MyBase.BeginSendSkyBox(sender.LifeformId.Value, "http://cube33.brinkster.net/media/skybox/zolsky4/zolsky04_lf.jpg", "http://cube33.brinkster.net/media/skybox/zolsky4/zolsky04_rt.jpg", "http://cube33.brinkster.net/media/skybox/zolsky4/zolsky04_up.jpg", "http://cube33.brinkster.net/media/skybox/zolsky4/zolsky04_dn.jpg", "http://cube33.brinkster.net/media/skybox/zolsky4/zolsky04_fr.jpg", "http://cube33.brinkster.net/media/skybox/zolsky4/zolsky04_bk.jpg")
    End If
End Sub

Private Sub GreeterBotExample_OnLifeformChatStatusChanged(ByVal sender As ChatStatusResponseMessage, ByVal e As EventArgs)
    Select Case sender.ChatStatus
        Case LifeformChatStatus.CHAT_STATUS_AVAILABLE
            MyBase.BeginSendChatMesage(("Welcome back " & MyBase.Cache.GetLifeform(sender.LifeFormId.Value).Name & "."), ChatMessageType.CHAT_MESSAGE_PUBLIC, 0)
            Exit Select
        Case LifeformChatStatus.CHAT_STATUS_BE_RIGHT_BACK
            MyBase.BeginSendChatMesage((MyBase.Cache.GetLifeform(sender.LifeFormId.Value).Name & " will be right back."), ChatMessageType.CHAT_MESSAGE_PUBLIC, 0)
            Exit Select
        Case LifeformChatStatus.CHAT_STATUS_DO_NOT_DISTURB
            MyBase.BeginSendChatMesage((MyBase.Cache.GetLifeform(sender.LifeFormId.Value).Name & " does not want to be more disturbed than this."), ChatMessageType.CHAT_MESSAGE_PUBLIC, 0)
            Exit Select
        Case LifeformChatStatus.CHAT_STATUS_AFK
            MyBase.BeginSendChatMesage((MyBase.Cache.GetLifeform(sender.LifeFormId.Value).Name & " is away from keyboard."), ChatMessageType.CHAT_MESSAGE_PUBLIC, 0)
            Exit Select
    End Select
End Sub

Private Sub GreeterBotExample_OnServerConnectResponse(ByVal sender As ServerConnectResponseMessage, ByVal e As EventArgs)
    MyBase.BeginAuthenticate("############", "######")
End Sub

End Class
In DELPHI

Code: Select all

public GreeterBotExample = class(BaseBot)
    // Methods
    constructor GreeterBotExample.Create(configuration: ClientEngineInstanceConfiguration);
    begin
        inherited OnEnterWorldResponse += EnterWorldResponseDelegate.Create(self,GreeterBotExample_OnEnterWorldResponse);
        ;
        inherited OnServerConnectResponse += ServerConnectResponseDelegate.Create(self,GreeterBotExample_OnServerConnectResponse);
        ;
        inherited OnLifeformChatStatusChanged += OnLifeformChatStatusChangedDelegate.Create(self,GreeterBotExample_OnLifeformChatStatusChanged);
        ;
        inherited Start
    end;

    procedure GreeterBotExample.GreeterBotExample_OnEnterWorldResponse(sender: EnterWorldResponseMessage; e: EventArgs);
    begin
        if ((sender.LifeformId.Value <> inherited BotId) and ((sender.EnumResponseCode as WorldResponseCode) = WorldResponseCode.WORLD_LIFEFORM_ENTERED_SUCCESSFULLY)) then
        begin
            inherited BeginSendChatMesage(string.Concat(sender.LifeformName.Value, ' enters...'), ChatMessageType.CHAT_MESSAGE_PUBLIC, 0);
            inherited BeginSendSkyBox(sender.LifeformId.Value, 'http://cube33.brinkster.net/media/skybox/zolsky4/zolsky04_lf.jpg', 'http://cube33.brinkster.net/media/skybox/zolsky4/zolsky04_rt.jpg', 'http://cube33.brinkster.net/media/skybox/zolsky4/zolsky04_up.jpg', 'http://cube33.brinkster.net/media/skybox/zolsky4/zolsky04_dn.jpg', 'http://cube33.brinkster.net/media/skybox/zolsky4/zolsky04_fr.jpg', 'http://cube33.brinkster.net/media/skybox/zolsky4/zolsky04_bk.jpg')
        end
    end;

    procedure GreeterBotExample.GreeterBotExample_OnLifeformChatStatusChanged(sender: ChatStatusResponseMessage; e: EventArgs);
    begin
        case sender.ChatStatus of
            LifeformChatStatus.CHAT_STATUS_AVAILABLE:
                begin
                    inherited BeginSendChatMesage(string.Concat('Welcome back ', inherited Cache.GetLifeform(sender.LifeFormId.Value).Name, '.'), ChatMessageType.CHAT_MESSAGE_PUBLIC, 0);
                    break;

                end;
            LifeformChatStatus.CHAT_STATUS_BE_RIGHT_BACK:
                begin
                    inherited BeginSendChatMesage(string.Concat(inherited Cache.GetLifeform(sender.LifeFormId.Value).Name, ' will be right back.'), ChatMessageType.CHAT_MESSAGE_PUBLIC, 0);
                    break;

                end;
            LifeformChatStatus.CHAT_STATUS_DO_NOT_DISTURB:
                begin
                    inherited BeginSendChatMesage(string.Concat(inherited Cache.GetLifeform(sender.LifeFormId.Value).Name, ' does not want to be more disturbed than this.'), ChatMessageType.CHAT_MESSAGE_PUBLIC, 0);
                    break;

                end;
            LifeformChatStatus.CHAT_STATUS_AFK:
                begin
                    inherited BeginSendChatMesage(string.Concat(inherited Cache.GetLifeform(sender.LifeFormId.Value).Name, ' is away from keyboard.'), ChatMessageType.CHAT_MESSAGE_PUBLIC, 0);
                    break;

                end;
        end
    end;

    procedure GreeterBotExample.GreeterBotExample_OnServerConnectResponse(sender: ServerConnectResponseMessage; e: EventArgs);
    begin
        inherited BeginAuthenticate('######', '#############')
    end;
end;
In MS C++

Code: Select all

public __gc class GreeterBotExample : public BaseBot
{
    // Methods
    public: GreeterBotExample(ClientEngineInstanceConfiguration __gc* configuration) : base(configuration)
    {
        base->OnEnterWorldResponse += new EnterWorldResponseDelegate __gc*(this.GreeterBotExample_OnEnterWorldResponse);
        base->OnServerConnectResponse += new ServerConnectResponseDelegate __gc*(this.GreeterBotExample_OnServerConnectResponse);
        base->OnLifeformChatStatusChanged += new OnLifeformChatStatusChangedDelegate __gc*(this.GreeterBotExample_OnLifeformChatStatusChanged);
        base->Start();
    }

    private: void __gc* GreeterBotExample_OnEnterWorldResponse(EnterWorldResponseMessage __gc* sender, EventArgs __gc* e)
    {
        if ((sender->LifeformId->Value != base->BotId) && (*static_cast<__box WorldResponseCode*>(sender->EnumResponseCode) == WorldResponseCode::WORLD_LIFEFORM_ENTERED_SUCCESSFULLY))
        {
            base->BeginSendChatMesage(String::Concat(sender->LifeformName->Value, S" enters..."), ChatMessageType::CHAT_MESSAGE_PUBLIC, 0);
            base->BeginSendSkyBox(sender->LifeformId->Value, S"http://cube33.brinkster.net/media/skybox/zolsky4/zolsky04_lf.jpg", S"http://cube33.brinkster.net/media/skybox/zolsky4/zolsky04_rt.jpg", S"http://cube33.brinkster.net/media/skybox/zolsky4/zolsky04_up.jpg", S"http://cube33.brinkster.net/media/skybox/zolsky4/zolsky04_dn.jpg", S"http://cube33.brinkster.net/media/skybox/zolsky4/zolsky04_fr.jpg", S"http://cube33.brinkster.net/media/skybox/zolsky4/zolsky04_bk.jpg");
        }
    }

    private: void __gc* GreeterBotExample_OnLifeformChatStatusChanged(ChatStatusResponseMessage __gc* sender, EventArgs __gc* e)
    {
        switch (sender->ChatStatus)
        {
            case LifeformChatStatus::CHAT_STATUS_AVAILABLE:
            {
                base->BeginSendChatMesage(String::Concat(S"Welcome back ", base->Cache->GetLifeform(sender->LifeFormId->Value)->Name, S"."), ChatMessageType::CHAT_MESSAGE_PUBLIC, 0);
                break;
            }
            case LifeformChatStatus::CHAT_STATUS_BE_RIGHT_BACK:
            {
                base->BeginSendChatMesage(String::Concat(base->Cache->GetLifeform(sender->LifeFormId->Value)->Name, S" will be right back."), ChatMessageType::CHAT_MESSAGE_PUBLIC, 0);
                break;
            }
            case LifeformChatStatus::CHAT_STATUS_DO_NOT_DISTURB:
            {
                base->BeginSendChatMesage(String::Concat(base->Cache->GetLifeform(sender->LifeFormId->Value)->Name, S" does not want to be more disturbed than this."), ChatMessageType::CHAT_MESSAGE_PUBLIC, 0);
                break;
            }
            case LifeformChatStatus::CHAT_STATUS_AFK:
            {
                base->BeginSendChatMesage(String::Concat(base->Cache->GetLifeform(sender->LifeFormId->Value)->Name, S" is away from keyboard."), ChatMessageType::CHAT_MESSAGE_PUBLIC, 0);
                break;
            }
        }
    }

    private: void __gc* GreeterBotExample_OnServerConnectResponse(ServerConnectResponseMessage __gc* sender, EventArgs __gc* e)
    {
        base->BeginAuthenticate(S"#######", S"###########");
    }

};
In C# (prefered language)

Code: Select all

public class GreeterBotExample : BaseBot
{
    // Methods
    public GreeterBotExample(ClientEngineInstanceConfiguration configuration) : base(configuration)
    {
        base.OnEnterWorldResponse += new ClientEngineInstance.EnterWorldResponseDelegate(this.GreeterBotExample_OnEnterWorldResponse);
        base.OnServerConnectResponse += new ClientEngineInstance.ServerConnectResponseDelegate(this.GreeterBotExample_OnServerConnectResponse);
        base.OnLifeformChatStatusChanged += new ClientEngineInstance.OnLifeformChatStatusChangedDelegate(this.GreeterBotExample_OnLifeformChatStatusChanged);
        base.Start();
    }

    private void GreeterBotExample_OnEnterWorldResponse(EnterWorldResponseMessage sender, EventArgs e)
    {
        if ((sender.LifeformId.Value != base.BotId) && (((WorldResponseCode) sender.EnumResponseCode) == WorldResponseCode.WORLD_LIFEFORM_ENTERED_SUCCESSFULLY))
        {
            base.BeginSendChatMesage(sender.LifeformName.Value + " enters...", ChatMessageRequestMessage.ChatMessageType.CHAT_MESSAGE_PUBLIC, 0);
            base.BeginSendSkyBox(sender.LifeformId.Value, "http://cube33.brinkster.net/media/skybox/zolsky4/zolsky04_lf.jpg", "http://cube33.brinkster.net/media/skybox/zolsky4/zolsky04_rt.jpg", "http://cube33.brinkster.net/media/skybox/zolsky4/zolsky04_up.jpg", "http://cube33.brinkster.net/media/skybox/zolsky4/zolsky04_dn.jpg", "http://cube33.brinkster.net/media/skybox/zolsky4/zolsky04_fr.jpg", "http://cube33.brinkster.net/media/skybox/zolsky4/zolsky04_bk.jpg");
        }
    }

    private void GreeterBotExample_OnLifeformChatStatusChanged(ChatStatusResponseMessage sender, EventArgs e)
    {
        switch (sender.ChatStatus)
        {
            case LifeformChatStatus.CHAT_STATUS_AVAILABLE:
                base.BeginSendChatMesage("Welcome back " + base.Cache.GetLifeform(sender.LifeFormId.Value).Name + ".", ChatMessageRequestMessage.ChatMessageType.CHAT_MESSAGE_PUBLIC, 0);
                break;

            case LifeformChatStatus.CHAT_STATUS_BE_RIGHT_BACK:
                base.BeginSendChatMesage(base.Cache.GetLifeform(sender.LifeFormId.Value).Name + " will be right back.", ChatMessageRequestMessage.ChatMessageType.CHAT_MESSAGE_PUBLIC, 0);
                break;

            case LifeformChatStatus.CHAT_STATUS_DO_NOT_DISTURB:
                base.BeginSendChatMesage(base.Cache.GetLifeform(sender.LifeFormId.Value).Name + " does not want to be more disturbed than this.", ChatMessageRequestMessage.ChatMessageType.CHAT_MESSAGE_PUBLIC, 0);
                break;

            case LifeformChatStatus.CHAT_STATUS_AFK:
                base.BeginSendChatMesage(base.Cache.GetLifeform(sender.LifeFormId.Value).Name + " is away from keyboard.", ChatMessageRequestMessage.ChatMessageType.CHAT_MESSAGE_PUBLIC, 0);
                break;
        }
    }

    private void GreeterBotExample_OnServerConnectResponse(ServerConnectResponseMessage sender, EventArgs e)
    {
        base.BeginAuthenticate("##########", "###########");
    }
}
Bot Extensions Diagram overview

Image
Post Reply