Seneral / Node_Editor_Framework

A flexible and modular Node Editor Framework for creating node based displays and editors in Unity
https://nodeeditor.seneral.dev
MIT License
2.01k stars 414 forks source link

Dialog System with example #84

Closed ChicK00o closed 8 years ago

ChicK00o commented 8 years ago

It has a working dialog system example. Have a look and let me know if you need any changes to it as such

Seneral commented 8 years ago

Sorry, somehow missed to check it out once again:/

That looks really nice, you have an interesting new concept of different canavs types there. So as far as I understand, some node types (here dialogue nodes) are limited to specific canvas types (Dialogue canvas)? That's really cool! But I won't merge it right now, would be nice if we could seperate that system from the dialogue in specific and put the dialogue extension in a seperate branch. Because right now there seems to be some duplicate classes and I want to avoid that. Also, I've yet to test it out, checking back as soon as I have! Seneral

ChicK00o commented 8 years ago

Sure Sereal,

I would love work it out. Its just that it would more helpful if you could define some of your requirements for restructuring in more of a concrete manner

Well sorry for being lazy and not explaining the whole of the commit changes -> I have removed the concepts of List of nodesknobs inside nodecanvas, and now have serialized Inputs and Outputs, as i had to traverse them, and very late in changes did i understand the concept of Compress and UnCompress Functionality, but just removed it, later down the line when i went with serializing the nodecanvas -> I specifically created a Dialog node class deriving the original nodecanvas class, because i wanted to make the node canvas a bit intelligent. The added functionality of "saving startnode" in this case of the example, i have a lot of other functionality there in the real implementation, but i kept minimalistic stuff for the example. I call that added functionality implementer function just before saving the Node canvas -> I used your dropdown idea to display the multiple canvas types during creation. -> The added Dialog node was only relevant and useful in Dialog node canvas, so had gone ahead and put those limitations, so they were visible only on the right canvas type, to keep it straightforward for the designer -> I removed and kept the minimalistic changes and code example to showcase the dialog node idea, as i believed it to be most sought out functionality for our Node editor Tool kit

I would write something down for using the nodeeditor for dialog too, when i do get down to it, but i think, it's self explanatory, but then im the one who programmed it, so best i dont be the judge of it being "self explanatory" :D

Do let me know, how you would like me to organize and restructure to better fit the project Take Care Rohit

Seneral commented 8 years ago

No problem, thanks for the sum-up Rohit. Wasn't to hard to figure most of it by a quick glance at the code;)

First off, maybe you could make it so that your changed files overwrite the default ones (currently you've put them in a seperate folder) so I can see the changes;) And also remove the added saves (last session and stuff), it's actually lagging trying to view the whole commit log lol

Regarding your first point, we decided to keep all NodeKnobs in one list for drawing and other purposes in order to make them more generic/abstract and not limited to Inputs/Outputs. But in order to keep the convenience of directly accessing Inputs/Outputs, we created duplicate entries in those lists. That resulted in me having the bad idea of 'compression' and clearing Inputs/Outputs on saving - and this is definitely good to remove. But the generic List nodeKnobs, this is a useful thing actually;) So please add it in again... I've removed compression locally just now but in a way that doesn't break old saves so I'd be best if we merge my version.

Other than that, your concept and implementations of different canvas types and specific nodes is really cool. I'd be happy to merge it but as I said I need to see the exact changes first to check for problems:)

Seneral commented 8 years ago

Also, please first remove the complete dialogue-addon example. It seems like a huge addon which will be very useful as an example but first need to merge the base system that makes it possible in the first place, Helps keeping everything tidy;)

ChicK00o commented 8 years ago

Okay I will look this up, and you also want the whole addon into another branch is it??

Seneral commented 8 years ago

Thanks for the update, I'll take a look. I don't know yet, maybe it is better, as it seems like a lot of files for an example... Of coruse the base system behind will be merged, it is really cool and can be used universally;)

Seneral commented 8 years ago

Wait, you simply reversed everything lol was that intentional and you're committing the new changes right now? :D

ChicK00o commented 8 years ago

Yeah i was just working on getting the organisation right and looking up the past changes i did for removing the nodeknob list, it was then that i saw the repeated classes you mentioned, man i should have thoroughly checked the code before committing :D will take around an hour or might be two to get it right. will commit it then might even take till tommorow morning, it's getting late here

Seneral commented 8 years ago

No problem, don't stress yourself:)

ChicK00o commented 8 years ago

Have you committed your changes for the removal of compression? Because for me to remove, all the nodeknobs list, i had to change all the return functions and drawing as well as saving, and i started adding Inputs and Output knobs as subassest to save them. So i need to think it through of how i will be enabling the generic list back, If i kept my current code intact and just enabled the list again by uncommeting, it i seem to be creating a hell lot of sub assets at the moment how about you push your local changes of removing compression, that would allow me to think more on how i will be saving the input and output correctly

Seneral commented 8 years ago

Don't worry, even though there are duplicate entries in nodeKnobs and Inputs/Outputs they are not saved twice, only referenced twice! Still only one subasset for each! So it is not a hacky mess that it may seem, actually we decided it would be the best solution to keep the other code simple while allowing anyone to add nodeKnobs that are unrelated;)

ChicK00o commented 8 years ago

Well i have committed the base framework changes into this branch, and created a new feature branch for dialog system example.

ChicK00o commented 8 years ago

Okay i looked up the web, seems like there is no easy way, to give you a pull request of the feature/DialogSystem branch from my repo. I think you will have to pull it yourself, or you could guide me also on how to do it Cheers!

Seneral commented 8 years ago

Ok seems to be good now, just two things I've noted above. Also, I did some changes to the save system, especially concerning scene saving, which also fixes the things you adressed in this patch. I think I'll simply adapt mine to this as soon as it is merged;) Well Githubs change detection is a bit messed up there but it's ok. Thanks for your contribution and taking the time to adapt it:)

ChicK00o commented 8 years ago

Hey no need to thank me, the base project was an immense head start and help to me in creating the dialog system we needed. Thanks to you, and this project i could quickly build something robust to work with Anyway, let me know if you need any further changes. I believe you will have to manually pull the branch to your repository, i was unable to create a new pull request for a branch that does not exist in your repository

And a suggestion, Only after "branch" being mentioned in our conversation somewhere did i check out that there is a State-Machine implementation too. It would be good if you added or mentioned these in the front page readme somewhere too, as you have mentioned about the "develop" branch

Seneral commented 8 years ago

Also, can you set your code editor to not replace the tabs with single spaces? It somehow breaks the code change detection of GitHub, as seen in NodeEdtiorWindow. Sorry again for being so picky sometimes;)

Also, I won't be able to reply too fast anymore, I drowned my phone saturday while kayaking:( It notified me basically instantly about new messages previously, now I have to check manually all the time:(

Seneral commented 8 years ago

Ok I just now received all notifications from you. Yes, I'd have to create the branch myself, I'll do it right now! The statemachine branch is a WIP which hasn't been updated in a long time unfortunately... It is based of a very old version as you can see in the branching diagram. Doesn't mean it's abandoned, but developement is currently stopped for that:/

Seneral commented 8 years ago

Branch is up: https://github.com/Baste-RainGames/Node_Editor/tree/example/Dialogue-System It's based upon develop so you would need to clear everything in a first commit and only then commit the example, because it is intended to run on the latest develop version, not as a standalone/complete new system, right?

ChicK00o commented 8 years ago

Best would be to just delete the new branch for now, once we have merges the develop branch, then you create a new branch from develop that would allow me to push changes into it, this would keep the branching information good and clean, even now, basically merge and push the develop branch onto the example after we have merged it together, that would just add one extra merge commit to the current branch, and even that would not be much of a problem :D

All files look fine in the IDE, but could be an issue with the merge tool i had used to lookup changes, I will again go through all the files through the ide and push changes in encoding, and the tab conversion

Seneral commented 8 years ago

Well there is an option in most IDEs turned on by default to replace all tabs with spaces automatically:/

Seneral commented 8 years ago

And branch is deleted again. Might be cleaner indeed even thought it would basically be a replacement;)

Seneral commented 8 years ago

Wow I think that made it even worse :'D Now EVERYTHING is changed to spaces lol

ChicK00o commented 8 years ago

okay wow, well let me try again

Seneral commented 8 years ago

What I think might be the simplest is to take the original code (with tabs), turn off to replace with spaces in your IDE and then manually add in all the changes in again as discussed. I think that might be the cleanest and fastest in the end;)

ChicK00o commented 8 years ago

Now check and let me know, had to individually open and set tabify to all files

ChicK00o commented 8 years ago

If it's okay, then create a new branch

Seneral commented 8 years ago

Sorry, the changelog is somehow still cluttered with lots of formatting changes, I can't merge it when you can't see what was done in the end (the log is lagging because of so many lines changed:/) See: https://github.com/Baste-RainGames/Node_Editor/pull/84/files

ChicK00o commented 8 years ago

Okay How is it now??

ohh man, who keeps a space in the function name and parenthesis.... let me know if its understandable, else i will setup my environment to match yours first then do the changes and commit. Resharper "intelligently" eats the space between the function name and parenthesis

Seneral commented 8 years ago

Thats much better:D Atleast we can now view it without stuttering:P Yeah I know everyone has a different coding style - I've not a problem with others 'correcting' it to their liking but if it clutters the change log and 'hides' the real changes it's a bit annoying, I hope you understand;) I think I'll now merge and then I'll push my changes;)

Seneral commented 8 years ago

Did a sqash-merge for a better overview, also I hope I summarized the change log alright:) Also, I'm going to create a seperate branch for the Dialogue example now! Thanks alot for your efforts! :)

ChicK00o commented 8 years ago

Wow i wasn't aware of squash-merge! Thre is something new always to learn in Git :D

Now the commit feels good, else committing then reverting and all, that would have been so my noob style :D