-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kode for Unity(In game editor) #1597
Comments
This issue is missing any introductory explanation of what you're trying to do. |
My bad. I'm working on adding compilation capability to Kode, And so I need to integrate the kOS compilation function into my code. I think I have it worked out, Just had those few questions I wanted to ask before I spent any significant amount of time getting it working in case I was looking at the wrong bit. |
Your two assumptions are correct, plus I'd like to mention that RunProgramOn() is probably broken. It hasn't been updated in a long time and we're not really using it. Once there was a system to run programs on a "foreign" CPU and it was really messy so we backed off. |
Also, there's a chance that you might have to slightly change a bit of the code when we get the new subdirectories PR merged in, so just be on the lookout for that one. It's #1567 . |
Yay, I like it when things are simple. |
I'd also like to point out that I have a pending PR that works on a number of these similar issues: #1552. I would recommend you hold off on a major change until after that PR gets updated and merged, or that you work with that branch as well. I know it currently has conflicts, but it hasn't been a huge priority for me with 1.1 looming so I haven't bothered to update it to the current develop branch.
It looks to me like the code you are referencing above is from the Lines 280 to 295 in d547422
After #1552 is finished though, it should provide you a clean and easy path for running the compiler, as well as a small test shell within your IDE. To "properly" compile with true support for built in functions you'll need these changes. Technically trying to call a built in function should still work even if the compiler does not recognize the function. My PR includes the ability to add "dummy" function stubs so that built in functions are still recognized, even though they cannot be executed in the stand alone console program. |
#1552 looks really interesting. I think I may just hold off on the compilation update until that is ready. Do you have any rough timeframe on when it will be done?
About this quote, If you would like I will offer up Kode as being that future graphical interface. Kill 2 birds with one stone, You get your tool and I get my compiler. |
It won't be ready in the initial 1.1 compatibility release, but I think I'd like to have it in the v1.0.0 release if possible. So within a couple of weeks of 1.1 dropping. |
On the issue of integrating Kode into kOS, what \was actually being looked for in that quote was something that runs inside the game (so that means the whole GUI has to be done through Unity, and the editor class would be an instance of |
@hvacengi, Thats not so bad. Just swap this release with the next and that should make up the time. Ah I see. |
@TN-1 , while I really like the idea of having a nice in-game editor partnered in with kOS like that, I also don't want to impose if it turns into a lot of work for you. Architecturally if we do end up doing it, it would probably be a good idea to still keep the two as separate projects with their own DLL's and their own github repos, but maybe we can provide some externally call-able hooks into our DLL for you, and visa versa with you for us to call, to make the two talk to each other but not in a way that ends up requiring one to exist for the other to exist. When it comes to the architecture of C# and .NET itself in order to pull that off, @erendrake is a much better expert than either @hvacengi or myself. |
Wouldn't be anymore work for me than Kode already is. I would most likely fork off my current code base, then replace all the Windows specific UI code with Unity controls. Most of the non-UI related code should be easily ported over. Using the existing kOS terminal code as a start point and I only then really need to come up with a Unity based TreeView and the rest of the UI elements which I should just be able to use stock Unity controls. Once I have done the initial transition I don't see it being too hard to port over new features as I implement them into Kode(Prime) where appropriate. |
Thanks to Dunbaratu's tip about the compiler I think I have a basic understand of how it goes but I just want to clarify a few assumptions I have made.
For the most part, I think I can ignore the majority of the function for kOS(run) and so I am left with this bit which obviously does all the work:
For my purposes, I won't need line 1(I will have the filepath already worked out and can just use that)
Assumption 1: shared.ProcessorMgr.RunProgramOn(), Thats the command that runs the just compiled script on the VM? If so, I can get rid of it.
Assumption 2: Script.ksm is a file with extension .ksm that is filled with the contents of List program. If so, After that line I would then have a File.Save(file.ksm, program.ToString(Id need to parse it myself most likely)
Thanks!
The text was updated successfully, but these errors were encountered: