Why not use Rust for BT?

Request new features or present your ideas.
Post Reply
User avatar
SuperDupont
Dretch
Posts: 46
Joined: Sat Jun 26, 2021 10:21 pm UTC

Why not use Rust for BT?

Post by SuperDupont »

Why not use Rust language for BT (Behavior Tree)?

In Rust, an oriented objects (but not objects), we have:
- enum : https://doc.rust-lang.org/book/ch06-01- ... -enum.html
- controls flow : https://doc.rust-lang.org/book/ch03-05- ... -flow.html
- ...

I like how this language working, his compilator that is untolarable.

So, by adding Rust in Unvanquished we can make it more interesting and complex too.
And, needn't to code in C or C++.
And in fact, debuguing current BT language is a pain.

I know, it won't be easy to connect bots to another program.
If there is like an API or something like that, where data for each bot are exported, and command can be read too... will be good.
So, on some more powerfull server we can have more individual bots (and contributions).

Yes, it's a dream.

User avatar
SuperDupont
Dretch
Posts: 46
Joined: Sat Jun 26, 2021 10:21 pm UTC

Re: Why not use Rust for BT?

Post by SuperDupont »

Sure, I agree.

I don't say Rust must be in the Unvanquished at the end.

If we can have API or sockets or... something that devs knows, where :
- The server can send datas for each bots (what the bot see, what he has), like we already have for clients
- Something to give orders, like we already have as a client.

May be we should start from a new client without graphical computing.
So, we can have several tools for BT... (of course =, will only have one BT).

In this way, each "clients bots" can run on other threads/cpu, without doing something complex.
Of course, each "clients bots" must be lunched by something, like the server.

User avatar
Ingar
Mapper
Posts: 38
Joined: Thu Mar 22, 2012 3:09 pm UTC
Location: Belgium
Contact:

Re: Why not use Rust for BT?

Post by Ingar »

Why not Cobol, Pascal, Java, Haskell, C#, Go, perl, ruby, python, visual basic?
Oh wait, no visual basic please.

But in all seriousness, because the people who wrote the thing wrote it in C/C++.

User avatar
Gireen
Graphic Designer
Posts: 295
Joined: Wed Mar 07, 2012 1:26 pm UTC
Clan: [DoH]
Location: Germany
Contact:

Re: Why not use Rust for BT?

Post by Gireen »

Yes its possible to create third party programs to control bots.
In my case i did that with javascript and send commands to the server.
But this works only for high level control of bots, else you have to recreate and simulate more and more of the engines gamestate and rules.
And sooner or later you have recreated half the engine in another language. :grin:

fear ma engrish :granger:

Post Reply