Hi Ashley, the letterbox scale will also enlarge the GUI which I don't want.
I'm using crop mode and have code to shrink the GUI if the window is smaller than a certain size. But with the use High DPI the code doesn't work and the GUI is not shrunk down enough.
I'm trying to make my GUI scale correctly for Android devices, but I need to know the DPI since if use "High DPI DIsplay" is checked everything is rendered larger that it is.
So, is there a way to detect the DPI?
Well, yeah that's what it'll do. Take a folder of txt files that are a list of the pixel and their colors. And convert each txt file to a tilemap JSON then save each as a key in a master dictionary. Then I can take THAT dictionary.AsJSON put it in my game, a set the tile map to "hull1", or "hull2"
I use a dictionary so if the token at X = (255,255,255,0) then the tile is -1, (255,0,255,1) = 1, so forth. I actually have it made now I guess I can upload the capx later.
I'm going to have about one hundred ~6 color PNGs that I can convert to TXT files with ImageMagik, giving me something like this:
# ImageMagick pixel enumeration: 54,30,255,srgba 14,0: (255,255,255,0) #FFFFFF00 srgba(255,255,255,0) 15,0: (255,255,255,0) #FFFFFF00 srgba(255,255,255,0) 16,0: (255,255,255,0) #FFFFFF00 srgba(255,255,255,0) 17,0: (255,0,255,1) #FF00FF magenta 18,0: (255,0,255,1) #FF00FF magenta 19,0: (255,0,255,1) #FF00FF magenta[/code:3ezv28hx] So I can take these outputs and convert them to a tilemap based on the pixel color.
Develop games in your browser. Powerful, performant & highly capable.
I got it. I found this: https://www.scirra.com/blog/ashley/3/te ... ap-tidbits
Can someone explain/breakdown what you see when you get the tilemap.AsJSON?
Sample: {"c2tilemap":true,"width":4,"height":4,"data":"0,4x-1,1,3x-1,2,6x-1"}
I'm thinking of writing a converter for my project.
You're right, I just told the tilemap to set 100x100 of the same tiles and there was no noticeable performance usage. Thanks, I'll just have to change the way I'm doing it.
Hey Ashley,
Here's a capx for it https://www.dropbox.com/s/gc1zy56gaweucg9/marines%20test%20for%20cpu%20spike.capx?dl=0
I wasn't sure if it was something I was doing or not. Anyway, the way it is you'll see the CPU usage spike when the green circles are moving (In the task manager on my computer it maxes out a core) and if you click the button it'll make the tilemap invisible and you can see the CPU usage go down to practically nothing.
I hope it's either a simple fix or that I'm doing something stupid!
Thanks
Hi, I'm just starting to mess around with the tilemap, and I was wondering, right now my tilemap is about 80X60 tiles (@ 8px/tile) and if I move sprites on top of the tilemap the CPU usage spikes incredibly,.
This can be fixed by making the tilemap invisible and no other changes. Is this the normal performance?
I should say I have tried seamless mode off and it helps, but not much.
That's Okay, I found other people asking for this feature also.
https://www.scirra.com/forum/feature-request-layer-offset_t123235?&start=10
I'm in for it also! I could use it immediately and it could make for some very interesting features.
Yeah sorry, I want a camera to follow an object on layer A while another camera is scrolling layer B independently.
So instead of using the scroll to action which will scroll all layers (depending on their parallax setting) to the position, I need a scroll layer A to position(1) and scroll layer B to position(2)
Probably a long shot, but...
I want to scroll everything on layer A to an object on layer A and then everything on layer B to an object on Layer B (The two layer don't interact with each out, they are just happening at the same time.
Any ideas?
Yeah, that looks like it'll work, but is there anyway to take a snapshot of just an area? instead of the whole canvas?
Also, why should ALL layers be transparent?
Thanks!