Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
how to debug visual-scripting?

veganpete.
Registered User
Quote
2024-03-26 08:22:57

Thanks GUEST, your altruism is admirable.

That's great news; a key event handler will be fantastic! This set of plugins is ground-breaking for visual-coding in CC and it's versatile enough to suit any workflow.

One thing which would massively help visual-coding is the nesting/UI window problem which becomes immediately apparent for first-time users of CC, even with simple projects.

It could probably be fixed using a modified version of your condition-event handler - if, somehow, multiple CC conditional operators could be placed in the same box, separated with boolian..

In the example which you highlighted...

if "w" =0,
if "a" =0,
if "s" =0,
if "d" =0,
if "ground" =1,
if "walk" =0
if "crouch" =0,
if "jump" =0,
if "fall" =0,
if "climb" =0,
set "idle" =1.


It actually is one long string, rather than separate conditions. Llike this:

if "w" =0, and if "a" =0, and if "s" =0, and if "d" =0, and if "ground" =1, and if "walk" =0, and if "crouch" =0, and if "jump" =0, and if "fall" =0, and if "climb" =0, then set "idle" =1.


so, for example, to edit the last entry of: set variable "idle" =1
I need to open 11 separate action windows first. The obvious issue then is that: only the last window gets focus, so I cant scroll, move or edit any of the the on-screen data, without closing all the nested windows again. Once closed, I have to commit the previous data to memory.

Here's a quick example of just 4 nested actions using CC default visual coding - they take up the entire workspace...

🔎︎


*Note, the first window has multiple stacked actions, but it's impossible to see them all at once - you'd have to close all the windows of one nest first, and then open the next nest individually - and, quite quickly, the windows start to cover each other, so you can't even see the data.

An additional problem is that the Edit-Action windows only show 2 lines at a time, so scrolling is essential if there are multiple entries.. however, the scroll arrows only show-up if you hover over them (which requires window focus) - but you can't give focus to a nested window without closing all the other windows first. Catch-22 nightmare...

🔎︎


All the actions have the same title, so it's impossible to know -at a glance - how many entries are actually nested in each window or which-is-which, so I'm having to commit everything to memory and require a lot of patience when editing things visually, by opening and closing thousands of windows every day. Even though I have everything written down on paper, it's like a huge game of 'memory match', hoping I can randomly open the correct window, just to edit one variable.

Here's a link to my source/ccb file, so you can see how I structured the game so far...
https://veganpete.itch.io/2d-pla...

Having said all that, your plugin steps in and already successfully eliminates a tonne of clutter, by allowing simple scrolling through 100 actions - and allows each entry to be nested in-line.... If it can be made to also eliminate the need to nest multiple actions, by introducing boolian operators/separators, it would make visual scripting so much simpler.

eg:

Condition4: w = 0 , a = 0 , s = 0 , d = 0 , ground = 1 , walk = 0 , "crouch" = 0 , "jump" = 0 , "fall" = 0 , "climb" =0
Action4: Set Variable "idle" = 1
Else4: Set Variable "idle" =0



I do appreciate that coding a plugin to merge so many conditions, each with optional boolian operators, is not a simple task.

Thank you.


Guest
Guest
Quote
2024-03-26 19:54:31

Here's a version of the ConditionalActionExecutor that accommodates long chains of conditions:

https://files.catbox.moe/et8kgw....

A new property called Delimiter has been introduced, which is used to chop the string up into chunks for execution. I've used the "|" (pipe character) as the default delimiter to avoid conflicts with strings like "Hello, World!", but you can change the property to suit your needs, such as using commas.

All the existing functionality remains intact. You are not limited to using just Boolean values; it will work with any valid CC variables and CC's operators. For example: a = 0 | b <> 1 | c > 1 | d < "Hello, World!", etc. Each condition still needs to be in three parts, though.

I've tested it a couple of times on the default cube, so if you encounter any bugs, please let me know. Regarding the issue with your menus in CC only showing 2 behaviors/actions while mine show around 3.75, it might be related to your resolution. You might want to check some settings; my monitor is 1080p.

🔎︎


If you think of any other behaviors/actions that might be useful, feel free to suggest them. Programming is my jam. ????

Also, if you find these utilities useful, I'd appreciate it if you could post them on your Itch page for others to use. There's no need to credit me. Apparently, these forums aren't forever. Cheers!


Guest
Guest
Quote
2024-03-26 20:04:17

Haha. That ???? was supposed to be:

One final thing: I worked on the key event idea last night for a bit, but I've come to the conclusion that it's better to just set one key at time (but with actions for both down and up to cut the number of behaviors in half) and allow for toggling off the key repeat (optionally). The reason for this is so someone can hide the node with the input event to disable it. Ideally, for something like this, you'd use a parent folder node called Controls with children folder nodes for each each input (W, S, A, D, Space, LMB...). Anyway, I am still considering some things. I'll let you know if I find something agreeable.


VP
Guest
Quote
2024-03-27 19:28:21

That sounds great.

Thanks to your advice Guest, I too have now managed to get 3.5 lines of text per CC window - by manually overriding windows 11 app-scalling for high DPI screen, 120Hz@1920x1080. It's a slight real-estate gain on-screen but a decent improvement in workflow - I can see the scrollbar now at a glance.

I've downloaded the new version you made (with 100 events), that's more than enough for one instance and eradicates the need for an "+add more" button. Nice one.

'Delimiter', that's the one, I couldn't remember the name for it. Perfect! Thanks so much for that, very impressive solution.

I'll spend this weekend converting my game across to use this plugin.

Host the scripts? Absolutely, I'll proudly host the plugins on my itch.io page.

I'll have a think for anything else that may help the visual-coding side of CC. These 3 plugins (variable setter, conditional event handler, key-state manager) are a really solid set of tools. They pretty much cover my entire workflow.

I'll scour through my old/unfinished projects to see if there's anything else I pick up on which would be suitable for a plugin.

Thanks again, much appreciated!


veganpete.
Registered User
Quote
2024-03-27 22:26:56

Here are the itch.io pages for the 2 plugins...

🔎︎

https://veganpete.itch.io/copper...

🔎︎

https://veganpete.itch.io/copper...


luposian
Registered User
Quote
2024-03-28 21:30:34

Here's the music file, again, VP! Now you have TWO copies of it (one in each place)!

https://files.catbox.moe/gp1m7v....




Guest
Guest
Quote
2024-03-29 03:24:32

@luposian

Nice song!

@VP

Okay, I'm content with this code. I've named this behavior the KeyEventSetter. It requires a KeyCode (integer), which you can obtain by setting the Boolean value of the PrintKeyCodes property to true. The default KeyCode is for the 'A' key (65), as in CC. This means the code works with all keys (excluding the mouse, which I'll handle separately). You can then specify actions for both key down and key up events.

What sets this behavior apart from others is the inclusion of a KeyRepeats property, which can be toggled on or off. When it's off, the key triggers the down and up actions only once; it doesn't repeat. This feature can be beneficial for various purposes. If you leave the KeyRepeats property on, there's an additional property called IntervalMS underneath it. Its default value is 0.

With an IntervalMS of 0, the Acti repeats every frame, similar to the default CC key behavior. If you change it to 1000, for instance, it will fire every second. This essentially mimics the behavior of the Every Few Seconds behavior.

I didn't do much testing other than to get it up and working. I plan on making one for the mouse, too. Thanks for posting the other extensions; the page looks great! Feel free to post this one as well, if you wish. If you find any bugs or come up with anything else that might be handy for visual scripting, please let me know. Thanks!

Here's the link:

https://files.catbox.moe/ynu2vj....


luposian
Registered User
Quote
2024-03-29 04:19:28

Guest wrote:
@luposian

Nice song!


Thanks! Apple's GarageBand makes some music a lot easier to compose, since they have a lot of looped effects and samples. Most of my music was composed in iPiano for the Mac (long since abandoned by the dev), back in the days of MacOS X 10.2 (Jaguar) and 10.3 (Panther). It was abandoned right around the time of Tiger 10.4 (it didn't work quite right) and doesn't work at all in Leopard (10.5). I'd love to find someone willing to make a modern version of that software for macOS 11 and beyond or even Windows 10/11. But it would also have to be able to load/play the unique .XML files (which are kinda like MIDI files, but not the same)


VP
Guest
Quote
2024-03-30 13:15:36

Thanks for the music again @Luposian, I'll be sure to use it in the game. Appreciate it.

Fantastic. Thanks for making the key plugin @Guest. I'll check it out today and add it to an itch.io page.

This is another really handy plugin, it will save loads of time and make reviewing/editing much ore simple for visual-code.

The key-repeat feature will also be very handy for people, as it's a bit of an extra hassle to set up variables for each key-press, to prevent key-repeat - plus it's something which is regularly asked about in the forums. Using it as an auto-fire is a great adaptation with many applications.


luposian
Registered User
Quote
2024-04-01 05:06:36

@VP - I think you really need to decide which side of the fence you're going to stay on... like Yoda says: "Do... or do not... there is no try."

I just read (again) where you're throwing in the towel. But you also said that Nico Emailed you and said that he's too busy with other projects to work on CopperCube. If this is true, then we ALL need to know and need to encourage, by whatever means, Nico to release the source code... or sell it or something, so that it CAN continue to be worked on some someone (or a group of someones), instead of frustrating people (like you), because certain features simply aren't there.

I'd like to know if what you said about Nico Emailing you is actually true. I'll try Emailing him myself. Others (I'm assuming Just_In_Case is as close to Nico as one can get... at least that's the impression I got) must know or have heard something.

This won't change my plans, because I believe I can still complete my Luposian game (Stage 3). Just a matter of money mostly, right now. And I may be able to get the programmer of Lava Crew to help with the AI of the assailant, once I help finance a cheap, used PC/Windows 11 laptop for him. And, by cheap, I'm talking 300 Euros.

But we (as users) need to know where we stand concerning CopperCube. If further development by Nico is hamstrung indefinitely, then we need to see what we can do to get it continued. We can't just give up on it, because, quite frankly... CopperCube 6.6 is the EASIEST 3D game engine to work with, I've ever seen. There may be more powerful, more modern engines available, but nothing as EASY to use, as CopperCube.


vp
Guest
Quote
2024-04-02 15:23:10

"Pick a side of a fence?" That's quite a condescending thing to say.

I've been a coppercube user for around 5 or 6 years, I've DONE lots of projects (on my own, with no coding) but I do also find it very frustrating to use - so I frequently abandon my projects and move on to other things. That's not me being hypocritical, that's just honesty. I'm a hobbyist - not a pro. I give just as much help as I ask - sometimes I'm right/sometimes I'm wrong.

As you've decided to drag an itch.io convo onto here, yes, I did say I'm giving up on the Saboteur game because it was proving too difficult for my skills. I also announced that I'm giving up on Coppercube - so what? It's not for the lack of trying or doing, it's because it was becoming un-enjoyable.

Yes, Niko has responded to me by email to say that he's too busy with other projects to work on CopperCube at the moment. Not sure why you'd suspect I'm lying or why you assume you're the gold-standard but feel free to email him yourself if that will help to put your untrusting nature at ease. Niko was polite and respectful and explained that he's too busy to work on coppercube at the moment but maybe my requests will be added in the future.

It would be easy/quick for Niko to fix, as GUEST has proven with his recent plugins - but there have been thousands of requests from other users - it's Niko's baby, and he only has so much time to divide and which requests to prioritise.

CC updates which are slow and few-and-far-between. That's just the way it is - no point complaining - but it's enough to make me look elsewhere, albeit possibly just a temporary break. Many people have requested the source too, that's nothing new - it's not surprising to me that it's not been released publicly. If it ever does, that's great.

Thanks for your advice and recommendation that I shouldn't give up on coppercube - I already know that - but if I want to leave - or return, I shall - it's not a big issue, unless I get banned or asked to leave permanently by a mod or the regulars here.


vp
Guest
Quote
2024-04-02 15:47:27

..wait!... a dev says he can create stage 3 of your Luposian game for - but first, you need to buy him a computer, so he can code an a.i. assistant to help him use coppercube?

Tell your dev not to give up on coppercube, it's so easy to use without needing chat gpt.

Yoda says: "Need not a.i. assistant, for default coppercube scene."


luposian
Registered User
Quote
2024-04-03 01:23:17

vp wrote:
..wait!... a dev says he can create stage 3 of your Luposian game for - but first, you need to buy him a computer, so he can code an a.i. assistant to help him use coppercube?

Tell your dev not to give up on coppercube, it's so easy to use without needing chat gpt.

Yoda says: "Need not a.i. assistant, for default coppercube scene."

You're not reading carefully. I did not say he was creating the entire Stage 3. He is helping with the Assailant AI and anything else that comes up along the way that is in his skill set.

I also am not buying the entire computer. I am paying for half the computer. $150. He's a macOS/iOS developer and has avoided Windows for 20 years. But, given that my game is only working in Windows (I can't get it to work right in the macOS builds), he needs a Windows laptop in order to help me. He's just curious enough about my game (I've shown him images and videos and such) to be willing to pay for the other half of the laptop. I'll help him learn Windows 11. It's the least I can do.


Guest
Guest
Quote
2024-04-03 01:56:49

🔎︎



luposian
Registered User
Quote
2024-04-03 03:42:09

Guest wrote:
🔎︎

Thanks for the laugh... yeah, that video/song is pretty cool!



Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internat?onal" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact