The search engine could search for a particular script in folders and blends.Then it can append it if you click the button append.When it does this it will combine the two scripts automatically or make them work with one another automatically.I think this is a good idea for the blender game engine.What do you think?Would it be better than the hive system?
So what you’re thinking, is a system that can take two completely different scripts, made using different object and property setups, and make it all magically work in your project?
I think this, at the least, would either be nearly impossible to do, or be very impractical due to it potentially taking years of research and adding a ton of code (I don’t know if even an AI like IBM’s Watson can do that).
Is this still about the fact that you’d rather not learn how to read and write scripts and instead want the game engine to do everything for you (at least with the help of some nominal input)? I and others told you that your idea about a full-fledged planetary exploration game with alien civilization AI was way above your skill level and would likely lead to frustration and you ignored it.
Think about it we already can copy logic bricks from one mesh to another.I think it is doable because of that reason.We already have search engines why can’t they be adapted to search for python scripts on our computers.How about the name for it to be python scripts search engine?
When logic bricks are copied to other objects, they completely replace the bricks that were there before, there’s no option to mesh two setups together and I don’t think they automatically use the other object’s properties if that set is completely different.
And a tool to search for Python files among your .blends is doable, it’s just that all it will do it place a list of entries in the file browser where you then append them and edit them by hand to make it work in your project.
As for the combining part, simple combining could perhaps be done through line comparisons and the like, but you would need to go in and make edits to make sure it will work like you want it to. I also don’t think .diff file technology (used with compilers) will help here in any way as that concerns an edit of a portion or area of code of an existing project and not an entirely new script from a different project.
An IDE allows you that. They usually come with a project view (like the outliner in Blender) that you can navigate your Python files.
In that way Blender provides a simple IDE. It manages text blocks only. Text blocks are in a flat structure. If that limits you too much, you can turn the text blocks to external files. Then you can even use the search engine of your OS to look through the files.
You can easily append text blocks from another blend file.
You can even load external python files into the text editor.
This makes no sense:
A) Python scripts have a single entry point only, which means if you “merge” them you loose one
B) Python code is not necessary compatible with each other.
C) It is the programmers job to maintain the code and reorganize them (have a look at the book “clean code”). There are tools to support that (e.g. refactoring tools). Usually they are available in according IDEs.
Hive is a different approach to describe behavior. There is not much relationship to organizing Python code. I’m sure you will discover own problems with this.
The Hive system is, in fact, a framework to organize Python code (including property setup). It allows you to define Python components with multiple entry points. The Hive system calls these components “bees”, the colloquial (but somewhat inaccurate) name is “nodes”.
The Hive system defines several protocols for bees talking to each other. One of these protocols is antenna/output (“node sockets”), this is the only protocol that can be controlled both in a GUI and from Python. There are other protocols as well, that can only be controlled at the Python level.
Of course, to make it work, you will have to use such protocols in the first place. You will have to wrap your existing Python scripts in something smarter (a bee, or some other kind of smart component). As Ace Dragon points out, a magic engine that can do such wrapping automatically is out of the question.
EDIT: If this sounds pedantic or condescending, I apologize. It is not meant like that, just clarifying.
Save the scripts as text files and use windows search. Besides anything novice BGE users have is copied online so you can just use google.
When it does this it will combine the two scripts automatically or make them work with one another automatically.
I don’t know what to say. There are a multiple ways you can combine 2 or more scripts. Even if you were fully adept human programmer there is no telling which way is what the user might want the scripts to interact.
I think this is a good idea for the blender game engine. What do you think?
It is something that is impossible by definition and shows how little you understand about programming.
I don’t want to go “ad hominem” but every time I see your post I read the same subtext. You want to do complex things beyond simple logic bricks but refuse to accept you need to actually learn programming for that. Here you are looking for workaround to the fact that you have to learn programming to use python written by other people. That path will not lead you anywhere.
There are no shortcuts and you trying to come up with these threads does no good to anybody. You want to program, learn how to program.
After you know programming you can begin to think about how Blender could be improved because that’s when you know what is actually possible and what isn’t.
Would it be better than the hive system?
What does Hive have to do with it? No, it is nothing like the Hive system. You can’t compare the two because they do very different things.
Besides Hive system already works in practice and your idea about something impossible by definition can be considered a “brain fart” at best.
more over need some tool to manage and organize code , (something as windows explorer, but internal) .
a system that “pop up” the code of the zombie obj when you click on the box of the zombie (exactly what happen for brick)
and some way to speed-up script , (avoiding to convert all code in a string or make it only one time).
modules here abused