Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Feature requests and bug reports
All myBugs fixed with same solution

Registered User
2022-02-08 10:00:30

OKAY! - finally solved it. ALL my problems with recent bugs were related to the default "fade screen" plugin.

I had used the "fade screen" plugin with "before first draw" on all my scenes (because I liked the fade transition) I assumed it had always worked well - but it doesn't!

If I add any commands in the "Action When Finished" box of the fade action, it (randomly?) introduces problems with the following actions:

Restart Scene
Do something Later
Change Position of Node
Stop Sound
Change a variable

By going back and removing the fade screen plugin from all my projects with bugs, it appears to have fixed them all!

The sounds now stop as expected, the scenes restart properly, variables are only set once (and not repeated over and over again), nodes are positioned correctly etc.

There must be something in the way the fade-screen plugin is coded which interferes with the timing of other events. The first time I noticed it was with the Anubis Death animation I made, a very simple scene with the fade screen at the beginning - sometimes it would work perfectly, other times, the scene would restart over and over and sometimes the animation would simply fail, it would just be static. i found a workaround by introducing many variables - but all along it was the fade screen plugin.

I do really like the fade effect but obviously i wont be using it any more - so I've managed a workaround - just a simple transparent-alpha-to-black gradient.png, which I can apply to a billboard and move in front of the camera. At the start of the scene, I'll move the billboard down over 1000ms and the gradient will create a nice fade-effect from black to transparent.

So pleased this is finally fixed, it was affecting almost everything I did. Boom

2022-02-08 11:32:38

Ahaan, Glad that you are able to fix all your issues, so it was just a scripted action that was causing all the issues, that can be another reason why only you are facing those issues, cause it seems like nobody else was using the action on before first drawing do something.

I am happy, that you have finally figured out the root of all your problems :)

2022-02-08 13:48:44

Yes, exactly. It was literally driving me insane trying to figure it out. I feel genuinely relieved it's fixed, lol.

2022-02-12 11:35:56

I also removed any default fade screen Actions a few months back as it didn't work so great.
I made my own one using 2D overlay instead which is way better for both fading in and out again....the default one just isn't good when doing both....pretty much like all default Actions/Behaviors in CopperCube - I hardly use any of them these days as I need so much more in my game.

2022-02-12 17:04:28

Thanks Robo, I'm starting to reach the same conclusion; I had always trusted the built-in plugins but this is the second game I've tried to make which is been broken by the built-in Coppercube actions/behaviours.

In the past Sven had said there was a mistake in my coding - I pointed out that I don't code anything - the code was an official plugin from the Coppercube site.

I really feel these bugs should be fixed as a priority because one of the main things that appeals to me about coppercube is the "no coding skills" required. But for that to be true, the engine needs to be rock-solid.

I really believe it's possible to create great things with Coppercube (as it is) without codiing but it's been a difficult task for me to fault-find things when they don't work - especially when it's the engine itself is causing the problems.

People here are a great help and inspiration but quite a few of the default features should just either be fixed/removed/disabled to prevent people encountering these problems over and over. Some of the plugins need an overhaul too, this would be quick to do and resolve quite a few major issues.

It's taken around year of frustration and back and forth on the forums, only to realise its the fade plugin which was introducing all sorts of problems. Same thing happened in the past with (If I remember correctly) "do something later" when used with "on first draw". I'm still getting issues I can't quite figure out why or how to work-around them.

I love Coppercube and don't want to give up on it - but it does really make me feel like cracking my skull open sometimes. lol.

I really should learn how to code - but then again, if I could code, I'd almost certainly switch to a different engine. I love Coppercube's approach "Visual Coding". I suppose eventually, all the issues will be ironed out.

Registered User
2022-02-12 22:11:06

@ veganpete
I'm glad for you that you were able to find the cause of the errors and that feels great to hear, inadvertently your errors help me make other decisions while I'm developing my projects after experimenting with similar situations...
that's why my long way in this game development process is

Blender 3d - CopperCube Game Engine - Javascript

2022-02-13 16:19:35

Yeah VP, I have had to deal with over a dozen serious issues with my game to date where each one could have been a game breaking issue. If I cant fix it, then I try a workaround far been fairly successful in that if I keep working at it...a solution has always come after a bit...

I full know just how trouble different bugs can be... when unknown issues come up, best to take it one step and at a time to isolate the problem.

Using a backup copy I would cut stuff out you think is causing issues to confirm what's going on...until the problem goes away.. its all trial and error mostly (even for coders)...some things may not really be a bug but a potential issue nonetheless like do later behaviour's will still run even when switching scenes as an example so you can stop issues like that just with another variable check before running the do later behaviour (just an example only).

Most behaviors and actions I have found work as expected - I just need more than most default things ones in my game so I do my own instead these days... if you keep at it you will succeed - like anything in life really..

2022-02-21 10:25:18

Thanks Robo! yes, I guess if we can workaround the problems and get there eventually, that's part of the fun and will also help us to get better. Some good tips in your comment for me too, appreciate your help and feedback.

2022-02-21 13:14:41

yeah, there is always a way if there is a will. as the old saying goes. Best of luck for your games.

2022-02-21 16:49:30

Thanks aiming_bullets, exactly! :)

2022-02-28 12:09:46

Same problem is back again even though I've removed all references of "fade screen". So while fade screen can (not always) trigger it, it's not the sole culprit.

I think the same looping bug is also possibly related to having "If" statements in the "Before First Draw" or it may be that I just have too many things going on at once for coppercube to handle.

Out of the blue, the "on first draw" commands are now either repeating over and over or not triggering at all. Have spent a week trying to fix it but not able to.

If I can't fix it by the end of the week, I'm just going to scrap all my Coppercube projects and find a new hobby.

2022-02-28 12:32:27

I am sorry that you are having issues with your project again. I myself have encountered the same looping bug, which is on the first draw do something, and do something later.
I was thinking that it is the same bug you have been encountering.

but soon, I realized why this bug is occurring, If you are using the do something later action, and have provided an action that has been already running on the first drawing, then it will repeat itself over and over again, but if you provide an action which is not running on the first frame drawing then there will be no issue.

For example, I am fading an object before the first drawing and after "1000 ms" I was fading it again but with a different value. but if I put any other action, not the fading one, cause we are already using fading on the first drawing then there will be no loop sequence.
So, I inserted a dissolve shader action instead of a fade action, and the bugs didn't appear anymore.

at least this was the case for me, and based on my understanding I got to the conclusion that the action to execute should be different than the action that has been already executed on the first drawing.

So for example, if you are scaling your object to some value on the first drawing and then want to scale it back to normal or to something else after a few seconds, then it will be going to loop over and over again. Instead set a variable after a few seconds, and then scale the object in another behavior according to the variable.

Hope this is what you are experiencing right now, and it will fix all your issue of before the first drawing behavior.

2022-02-28 13:14:42

Thanks man, yes - it does sound like it could be the same issue. I'll give it a try this week. I have so many things with problems now, just in the last day or so. I think it's going to be hard to fix without tearing it apart. I successfully made the character move across the map when each round is won but I think I've pretty much trashed the project, trying to fix the bugs it created. I can go back to my backups - but that will undo my latest work and I've no doubt that I'll encounter the same problems in the future as the game progresses again.

Basically, the issues I'm facing now are: sounds repeating hundreds? of times per millisecond (despite having variables to try to control it), objects not changing absolute position when the scene starts, objects not changing position over time, animations not switching, variables not changing at the correct time, "do later" events not being triggered in the correct sequence. The whole thing is broken at the moment (unplayable) and the scenes work differently depending whether they are "started", "restarted" or "switched from another scene" and I can;t figure out why.

Also, events from a previous scene seem to influence how the bug works - I noticed if I delete a "change scale" of "tile1" event (in the map screen), the "Fight.ogg" sound wont play at when I switch to the "battle" scene. However, if I change the scale of the map tile before switching to the battle scene, the sound works.

These should be completely unrelated events but they consistently trigger each other.

I wouldn't mind if it was something I was doing wrong - but it just seems to be a minefield of random bugs which get triggered by seemingly unrelated events. I just can't stay on top of it all.

I'll keep trying but I'm feeling sad to say, unfortunately if I can;t fix it, I think I'll probably just give up for now. Not really enjoying it any more but I'll probably come back in the future.

One thing I can try is to get rid of the "before first draw" completely and make my own version of "before first draw" by using variables and "every few seconds". It'll be a lot of work but it should be a solid fix. I really don't want to give up, but I don't want to end up stabbing my eyes with pencils either, lol. I've just got to make sure I keep my finger away from the "shift+delete" buttons - because I have a tendency to destroy months of art/music/modelling/gaming projects whenever I get too stressed.

Registered User
2022-02-28 16:23:28

If you can share simple project file with bug then we may check it out and find a problem.

I had some problems with doLater script but i was able to fix it and problem was always my own fault.
(my problem was.. when doLater was running and i was switching the scene while it was active then CurrentSceneNode not specified and i got BUG instead of DOOR that supposed to be rotated (closed) rotates my camera.

2022-02-28 18:28:12

Thanks Sven , I'd really appreciate it if you wouldn't mind checking for me.

If I can't fix it myself this week, I'll upload the entire ccb.

Its frustrating because everything I had in the "before first draw" was working perfectly. Then all of a sudden it was not working. Funny thing is, I didn't change any of the "before first draw" entries.

All I changed when it broke was the position of one of the game-characters, depending on a variable set by the scene before. It was all working until I deleted a "do something later>change scale" action which shouldn't have affected anything else because it wasn't even part of the "Before First Draw".

Thanks for the tips.

I've currently removed all references to "Before First Draw" to see if I can bypass it or at least figure out what's making it break. Fairly confident I can get it to work without using the "Before First Draw" options.


Create reply:

Posted by: (you are not logged in)

Enter the missing letter in: "I?ternational" (you are not logged in)




Possible Codes

Feature Code
Link [url] [/url]
Bold [b]bold text[/b]
Image [img][/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]



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