-
Notifications
You must be signed in to change notification settings - Fork 147
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
A bug of scrolling #354
Comments
missing '()' in 'new_position' is not used, should be 'new' ? hard to say |
Yes, new_position is new. I accidentally removed get_rect parentheses on Github. It's actually parentheses there. |
Please always use copy and paste from code as exercised to github issue to quote code, not free type it. The bytes in pyglet.gl.lib.GLException: You should provide a translation for that to see what error is diagnosing openGL.
Anyway, I suspect there's not enough context here to diagnose the problem. |
When I change set_focus(new.x, 0) or set_focus(0, new.y), the window didn't crashed. I also tried set_focus(new.x, new.y / 2) and This is my complete code:
actor:
Thank you for your help. |
|
The Role context is added in the last comment now.
Can I know how to fix it? Thank you. |
No, that was the python traceback. The openGL error is b'\xce\xde\xd0\xa7\xd6\xb5', which is text in some encoding. Being so short it is probably writed in some ideogram / pictorial language. To see as text you must decode it; if it were Greek you would try It is not Greek. Well, try with decoders that will suit your Windows 's language, look available decoders at Anyway, your code does multiple inheritance and composition with complex classes, it will be hard to debug. As a vague guess I suspect some missing initialization, methods name colission, problems related to inheritance of properties, ... |
I really appreciate your help.
But when I try to move, the window crashed just like before.
Now I know it's not Actor's and Role's problem, but I still don't know why there's a bug. |
Lets see:
|
Hi @ccanepa , sorry to reply so late. I first tried to add the code in RectMap.get_in_region, then I did nothing and the window has crashed. There's the bug:
May I know how to fix it? Thank you. |
I download a project which with a tilemap can load well. But when I use the map in my project, it still crashed. the cocos is the same version, I think it's the code's problem, not the tliemap. May I know how to fix it? Thank you. |
Hi @ccanepa , may I know whether you get chance to check my comment? Thanks. |
When I use set_focus to scrolling the layer, A bug emerged:
and the window crashed.
This is my code:
`vx = (self.keys[key.D] - self.keys[key.A]) * self.MOVE_SPEED
vy = (self.keys[key.W] - self.keys[key.S]) * self.MOVE_SPEED
dx = vx * dt
dy = vy * dt
new = self.get_rect()
new.x += dx
new.y += dy
self.scroller.set_focus(new.x, new.y)`
Can I know how to fix it?
Thank you in advance.
The text was updated successfully, but these errors were encountered: