Tilemap Flicker - for Scott Shaver
BlitzMax Forums/BlitzMax Programming/Tilemap Flicker - for Scott Shaver
| ||
Hi Scott, I implemented the tilemap from your site into my program and I seem to be experiencing a fair amount of flickering? I was wondering if this is normal or if you can suggest anything that would clear up the flickering? Thanks |
| ||
Hi Scot, It appears that if I modify the following code is demo 1 flickering will start to occur: ' handle moving the map around with the cursor keys If KeyDown(KEY_A) or KeyDown(KEY_LEFT) Then map.SetPosition(map.GetX()+.1,map.GetY()) If KeyDown(KEY_D) or KeyDown(KEY_RIGHT) Then map.SetPosition(map.GetX()-.1,map.GetY()) Just alternate between the left and right cursor key to see the flicker. It is much worse of the increment is not fixed. PRobably an issue with the flocting point? Thanks |
| ||
Hi Scott, I managed to work around the issue with floating point and I tried your tile editor. One question: is there a way to use tiles larger than 64 by 64 in the tile editor? Thanks |
| ||
Hey Sean, I'm sure the flickering has to do with the floating point stuff. On my video cards the problem doesn't show up unfortunatley. I can change the upper limit on the tile size if you need it. I just thought 64x64 was as large as anyone would want to use. Are you running Mac or Windows? I've got another update that makes saving/loading very large map much faster that the version on the site. Let me know if you would like a new version. |
| ||
One other question, is the flicker occuring on the edges of the tiles? if so then that is the floating point problem. If not, is it happening inside the little grid on the light gray tile? If so then that is a combination of the floating point issue and the way I drew that tile. Single pixel checker boards look awful when scrolling. |
| ||
Scott, I have to modify the demo to reproduce the issue. I do remember that if I set the movment at 0.9 there was an issue with the center and the sides of the tile. Also, the tile would only move a bit and stop. I am not sure what other people thing, but some people might use large tiles for space scenes? I was planning to use 256 by 256 tiles for a space scene. That said, people might want to use even larger tiles for this sort of thing. As for features, it would be cool to have a buttom to randomly generate the tilemap based on the tileset. I think this might be a good option for creating space tilemap; you can randonly generate the tilemap and then just fix the repeated tiles. Also, are there any tools that will allow you to create a large bigmap out of a bunch of tiles? Thanks |
| ||
Sean did you want me to create a new version that allows larger tile sizes? |
| ||
Yes, Thanks Scott. That would be great! The large the size the better. Maybe the tilemap images could simple be scaled to a smaller image to work in the environmen. Just a thought. |
| ||
Okay I'll do it this weekend. |
| ||
http://www.scottshaver2000.com/forum/viewtopic.php?p=382 Version: 0.4.1 (Alpha) Release Date: 12/4/2005 Changes: Allow tiles of up to 512x512 in size now. Made loading and saving large maps much faster. Version: 0.4.1 (Alpha) |
| ||
Thanks Scott |
| ||
Scott, I am getting an error trying to load the tile map in your editor. 1) I create a tile map 10 by 10 with only 1 texture 2) Texture size is 256 by 256 3) Add a couple of tiles to the map 4) Save the Map to a directory on C drive 4) Exit the application 5) Restart the applicaiton 6) Load the map and crash? |
| ||
This problem appears to occur if the map and the tile map images are not in the same directory? |
| ||
Yep when creating the map they can be in different places but after that they have to be in the same directory. |