Hey guys Im really kind of desparated with a bug that I ve found on my game, its absurd for me so far, and its even hard to explain, but I hope that with some screen shots you guys understand what I want.
1 - the system is simple, when I press the cube at the left (on the green or red face), it pulls the cubes of the center on X or Y directions.
2 - in order to make this happen I made the face object( the green or red faces) when I press the left mouse button over it, it send a message telling witch row that it should be pulled, and all the cubes on the corresponent row ll be pulled that way(the cubes on the center), that message trigger a parenting event on other objects that have an animation that moves them exactly 1 blender unit on the X or y.
3 - As you can see on the first images below it work the way it should with no problems.
4 - Now the problem starts. When I paint the cubes with any of the collors on the right ( just below the round thing you can see the collorset) instead of pull normally it distort the position of the cubes like on the image bellow.
5 - Terrible thing for my game… Aniway, I cant find out any reasonable explaination for that other than you got to be kidding me… On the image bellow you see the cubes that I use to change the collors of the cubes in the middle via replace a mesh actuator.
6 - The worst is that if I simply first pull all the cubes and then paint over it and then pull it again the problem dont happen, so it happens only if I paint the objects and then pull, why sutch a thing would happen???
I really need help on this one, for me this is a internal bug or something that are making me hate blender even more!!! My Demo is almost done, but with this thing going on, well…
Are you sure that all the cubes are correctly spaced from the center (they’re not offset any)? Also, when you replace the mesh and reparent, ensure that this process happens just once, and not more than once. I assume you’re doing this in logic bricks, right? It really should be done in Python since it can be complex and you need to ensure that, for example, all of the cubes are parented and move at the same time (which may not happen in logic bricks). I’m guessing that this is why the cubes don’t move together.
I ll not work with python, i made 99% of the game with logic bricks so far and I ll not waist time reprogramating it all I rather stop working on the game, the thing is, as I explained there, if I pull the cubes then paint them then pull it again the problem dont hapen, it only happen if I paint the cubes and the pull them when I start the puzzle, it is like the replace mesh is modificating something on the cubes but so far there is no reason for that.
Monster I cant upload the .blend its very big file and for now its too soon to post the blend, I ll probably post it latter when the game is done. I ll fallow your guesses and see if something changes.
About the offset, the offset is perfect I checked it and rechecked it because this is essential for the customization of the other stages, about the mesh change, it changes the mesh all the time if you try to paint it, so there is no minimum number of change meshes and parenting since the player needs this freedom to solve the puzzle, maybe I get what you ve said wrong, but I ll take a look at the parenting maybe is something with the states and its running the wrong state or something like that.
Solar Lune why move all the cubes at the same time dont work with logic bricks?
Thanks a lot so far I ll try what you guys told me and see if something changes and then I return here, thanks a lot again!
@leonn - Well, I was thinking that the current game frame might end before all of the cubes get a chance to move the same amount. It was absurd of me to suggest for you to program it in Python when you have (almost) all of it done in logic bricks, which is very admirable. I’m not really sure of what could be the problem. I’m sure that a blend file will help, though.
Monster I try what you ve said but it didnt worked yet, I m uploading a small video with what is happening, I think that with it, thing ll be more clear.
In you guys I trust on this forum so, I could send the version of the game that I have here for you two only if its needed.
On the video you can see exactly what I ve explained before, and on it there is another bug that may be related to this, pay attention on the cube at the left( the one with the collors) it starts with the collors insted of black and white, the idead was to make it start BW but it only change the collor when I move the mouse over it and then when i move the mouse away it should turn BW again.
Right now Im looking into it to try to understand why this is happening and maybe find out that this is related to the other problem.
Well if you guys want I can send you the whole .blend.
thanks again
Unfortunately I can’t see an obvious reason.
I notice
a slide offset along the motion path
the offset has just two levels lets say 0.0 and 0.1
My guess:
as solarlune supposed
some of the parenting happens before the animation starts
some of the parenting happens after the animation started
This might be a problem of the actuator execution order. But difficult to say.
Why it does not happen when the objects are not colored?
I think because when coloring the cubes play a scale animation. That might be the important difference.
Yes please send the blend. I will remove it after the investigation.
I really dont think so monster, why after I move the cubes it works properly then? i think that it should work like that all the times, Im far from an expert, but it s weird. I ll keep trying to find this out, the problem is that those collored faces ar e very complex to get the problem right.
I ll kee trying
You watched the whole video? the first time it works the second dont, If I make the way I made the first time I can make 20 scales animation and it works properly again after that, this bug happens only on that initial moment that I didnt moved the cubes yet like on the video. I dont think that this is the problem, but blender have so manny bugs and i think that there are few guys that tried to make a game with so many logic bricks like this, so we never know.
Yea, that’s the weird part here: it works fine the first time around.
Try to figure out what’s different from the initial game start, and starting a new game by returning to the main menu (that may be a little more difficult, since you’re almost exclusively using logic bricks).
You could also just use python (assuming you know python) - not to reprogram the whole game, but just to modify the position of the cubes collectively.
Also, I will echo Monster’s request for a simplified .blend that isolates the problem - emphasis on simplified - I don’t think we need/want your whole game (it’s too much trouble to look through everything that’s there).
PS:
I’m wondering about messages sent on one specific tick: Are they processed by their recipients as soon as those recipients are processed by the engine, or is there a tick delay?
Maybe this is happening:
Initial processing order for relevant objects:
[0] [1] [2]
[0] manages cube objects ([1] and [2] etc)
[0] sends messages to [1] and [2]
[1] and [2] process on the same tick
Processing order after scene restart:
[1] [0] [2]
[0] sends messages to [1] and [2]
[2] will process on the current tick
[1] will process on the next tick
I tried to to work with the delay hiphotesis, but it turn out that the problem isnt is the logick bricks delaying, I made the objects that pull the cubes delay 6 ticks and only then pull the cubes, what I got was the problem to happen even if I didnt even had painted the cubes.
but I also saw that when I parent the cubes to the objects that move them on Y axis for example, it never loses the parent, the same goes to the X, but since objects cant be parented to more than one object( or they can?) probably there is something wrong there.
I also tried to make the objects to be parented at the start of the game to the objects on Y and X and the problem didnt showed up. So the problem only appear if the cubes where never parented to nothing.
I just tested the idea about the size animation, I deleted all the animations and then tried it out, but it didnt work either.
Goran I have no idead about what are you talking about, sorry.
I just tested an old version( about a month ago version) and there it worked properly.
I ll study it and see if there is any difference, as soon as I have my answear I ll post it here, if I do, otherwise I can send the file.
Thanks so far.
This might be pointless, but maybe you could set up the game so that when it first starts you parent all the cubes to something (empty, adjacent cubes, invisible dummy object or something). Then when you reparent them there souldn’t be a problem. If this manages to work around this strange bug then you’re good to go, if not then I guess you’d have to try something else.
Earlier in this thread, Monster did say
parent all childs first. You can un-parent them at scene start. That solves some parenting issues.
and you yorself say the problem only exists when the cubes are never parented to anything so messing with the parenting might shed some more light on the problem.
Edit: This looks like a really interesting game. I hope you manage to find a solution or workaround for your problem.
Try to describe exactly how the move is made, something like this (speculation only as example).
The cubes that should move is parented to an empty with parent actuators.
The empty is moved with dloc by a motion actuator.
In this example the problem is that actuators are run in a basically random order - So some cubes may be parented before the empty move, and some after. As it is random the order can be influenced by anything else in the game in unpredictable ways. Solutions may in this case be ether:
a) Try to use the controller priority button to make sure parenting is done before move.
b) Try move with velocity - Then it probably not going to actually move until the physics step.
But - that’s just an example - with a good description of what going on it be easier to guess right.
Thanks funkywyrm, the problem is something new that I made but I didnt found out what exactly because the older version is fine, Im comparing the two now and I ll probably see what is wrong with it, I hope.
I just saw your post LaH, I think that is a bug or by looking to the old file I ll find something, but so far the only thing that Im seeing is that I used the button at the side of where you delete an actuator or sensor with it you can use the same actuator or sensor in multiple states, but I tought that this would not represent a problem, but who knows. I m keep on trying.
I found the problem and its ridiculous, its the sound actuator, If if use a sound to move the object it make that happen if I delete the actuator the problem disapier, this, a, well, somebody can explain that to me?
And yea, this is a truly bizarre bug, but it’s not really that surprising; How many people actually use the sound actuator? Even somewhat complete demos that use sound tend to rely on some external package (most usually pygame).