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
tcod.tileset won't update already set tiles. #81
Comments
The Once you add |
This was explained better for the |
Thanks! What is the best place to ask question about the library (without opening issues)? My experiment with tileset allowed me to change a tile (by altering a color table) after the console was initiated (using SDL2 renderer) but only before the tile was first used. After it was used any further modification with the same method did not do anything. I'am aware that this functionality is not meant for animations or layer stacking but I was wondering if it could be. Here is how I tried doing it:
then altering a player_tile and after that:
the following I tried as a last resort, but it didn't help:
|
You could continue talking on this issue, contact me directly, or discuss on the roguelikedev Discord or IRC channel. Sometimes people ask questions on Reddit. https://discord.gg/jEgZtqB I don't mind trivial issues being opened here, so that isn't a problem.
This could be an actual issue. There's an optimization in the SDL2 renderer that skips redrawing characters. It's supposed to be aware that tiles could be altered in a tileset but that might not be triggering. |
Thanks! That could explain it. Unfortunately OPENGL2 gives exactly the same result and all other renders give me all sorts of other problems that testing this particular thing does not make sense. I that something that can be fixed on the python-tcod side or rather on the SDL2 side? Well anyway, I only finished the tutorial so far so I shouldn't be thinking about adding animation of layer stacking to a "skeleton" that has only a tutorial style core implemented. |
I assumed that OPENGL2 would fix it. If it didn't then this issue is narrowed down to the tileset implementation rather than any of libtcod's renderers. Renderers outside of SDL2/OPENGL2 don't support these tilesets. |
Tilesets should be fixed in python-tcod |
That's great! Thank you! |
I've already released that version. It should be finished deploying around now. |
A very quick test during a coffee break shows that it works! Thank you! I will have to test it more in my usual environment at home to verify few things from a quick test: I will test it more at home. |
|
I've tested it a bit more on my home computer The slow opening window was clearly a problem with that other environment. I don't have such behavior on this one. As for the "artifact" it only appears in OPENGL2 renderer and SDL2 works fine, here is an example of how it looks like. (Of course changing a color is not the point here, but but being able to modify tiles pixels is) |
I've been unable to reproduce any artifacts. It could be graphics card specific or something else. Is it possible for me to see your repository? |
My repo should be public now. I have a bit non-standard graphics card setup so I wouldn't be surprised if that would be the reason, although it rarely gives me any problems like that. |
Thanks for uploading that. With it I was able to reproduce and fix the issue. |
Great! I'm glad I could help |
Hello,
I wanted to experiment with tcod.tileset even though its API is provisional.
I am getting "module 'tcod' has no attribute 'tileset'" error when trying to use tcod.tileset.get_default(). Neither my IDE nor dir(tcod) show tileset attribute.
Am I using it the wrong way (with a bitmap font) or is it no longer available in version 11.1.0 ?
The text was updated successfully, but these errors were encountered: