Code center > Darwinbots3

Architecture expension while keeping the program object orianted.

<< < (2/2)

Testlund:
I will test it tonight. I'll start a new thread about it later.

Numsgil:

--- Quote from: Botsareus on March 31, 2016, 03:39:12 PM ---How would I program something like this in DB3 so the DB3 architecture play nice with it?

--- End quote ---

In the distant future, probably stuff like this would go in a script (lua or C# or python or maybe the DNA language itself) that you'd load up that would control the flow of things and modify the simulation state after certain conditions.  Basically a lot like how mods work for a lot of modern games: they sort of stomp over the scripts that ship with the base game, injecting their changes in directly.  At the simplest a straight replace of the entire file, but you could also do diff based merging so you could merge different changes to the same file as long as they don't overlap.

In the slightly less distant future, you'd have to add some code to wherever the simulation loop would be to grab all the robots and do something to them.  The more of these sorts of features you add, the longer the simulation loop code gets, so it doesn't scale very well as you add more features.

But none of that code is written yet, so the answer might very well change as things flesh out.  But top level features like this aren't that hard to figure out.  Harder stuff would be like pausing the simulation to debug the DNA execution of a robot line-by-line, because then you have to figure out how to sync up the simulation thread with the UI thread without creating a hard dependency between them, which means things like async handlers holding on to closures, and keeping all that from becoming a ripe mess.  It's always the harder to do subtler features than to do straightforward ones, because the subtle features touch a lot of systems at the same time.

Botsareus:

--- Quote ---they sort of stomp over the scripts that ship with the base game, injecting their changes in directly.
--- End quote ---

I do not think we have to go that far. If anything if a person wants to mod the game they should just go get the source code since it is an open source project. But cool idea anyway.

spike43884:

--- Quote from: Botsareus on April 01, 2016, 05:18:54 PM ---
--- Quote ---they sort of stomp over the scripts that ship with the base game, injecting their changes in directly.
--- End quote ---

I do not think we have to go that far. If anything if a person wants to mod the game they should just go get the source code since it is an open source project. But cool idea anyway.

--- End quote ---
But then again, I've played an open source >game< which had plugins...which was quite nice because it meant I didn't have to do complete reinstall and I could install any variety I liked without technical know-how

Navigation

[0] Message Index

[*] Previous page

Go to full version