Right now I'm just trying to get my tiles to animate but before I can do that my map has to load and well.. it's only showing 64X63, it's the exact same size as the desert_example map.
So does anyone have any ideas?
http://i56.tinypic.com/339t17a.png <-- view the image
Only showing 64X63 of my map
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Only showing 64X63 of my map
If you want people to help you, you need to help them. Showing a picture with no code is pretty unhelpful.
EDIT: I see it's not about code, sorry.
EDIT: I see it's not about code, sorry.
Re: Only showing 64X63 of my map
I basically just swapped maps with the desert_example.
Re: Only showing 64X63 of my map
I looked at this and it's actually a bug.
Goto map.lua and replace lines from 149 to 158 with this:
I really need to get Advanced Tiled Loader on github or something.
Goto map.lua and replace lines from 149 to 158 with this:
Code: Select all
-- Make sure that we stay within the boundry of the map
x1 = x1 > 1 and x1 or 1
y1 = y1 > 1 and y1 or 1
x2 = x2 < self.tilewidth and x2 or self.width
y2 = y2 < self.tileheight and y2 or self.height
else
-- If the drawing range isn't defined then we draw all the tiles
x1, y1, x2, y2 = 1, 1, self.width, self.height
end
Re: Only showing 64X63 of my map
Thanks man, but love2D seems to be a bit slow when the map is 2560X1600 in pixels.
192GB ram
12 core intel cpu(s)
12TB hdd
amd radeon 6970 2Gb GDDR5
so either my machines overkill or it's love2d which it certainly is.
192GB ram
12 core intel cpu(s)
12TB hdd
amd radeon 6970 2Gb GDDR5
so either my machines overkill or it's love2d which it certainly is.
Re: Only showing 64X63 of my map
Did you turn sprite batches on?
- slime
- Solid Snayke
- Posts: 3170
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Only showing 64X63 of my map
You'll need to use spritebatches or framebuffers (preferably spritebatches) for things like that. You could have the absolute best computer and video card that only blowjobs could buy, but that won't mean anything if you're creating a bottleneck sending redundant information from the CPU/RAM to the GPU over and over again because you aren't storing it on the GPU.
tl;dr you need to use spritebatches to take advantage of hardware made in the past ~8 years.
tl;dr you need to use spritebatches to take advantage of hardware made in the past ~8 years.
Re: Only showing 64X63 of my map
Yea, spritebatches fixed the problem.
I'm wondering if anyone knows how to only display the map? Display nothing else, like a black background when you get to the edge of map for example?
The adventure game did this perfectly but he/she used .map which seems to be from a custom editor I think his/her own.
I'm wondering if anyone knows how to only display the map? Display nothing else, like a black background when you get to the edge of map for example?
The adventure game did this perfectly but he/she used .map which seems to be from a custom editor I think his/her own.
Re: Only showing 64X63 of my map
You mean have the view stay within the boundary of the map? You'll just have to limit the view yourself.
You should be able to do it with something similar to this:
You should be able to do it with something similar to this:
Code: Select all
local mapWidthLimit = map.width * map.tilewidth - love.graphics.getWidth()
local mapHeightLimit = map.height * map.tileheight - love.graphics.getHeight()
if x > mapWidthLimit then x = mapWidthLimit end
if y > mapHeightLimit then y = mapHeightLimit end
if x < 0 then x = 0 end
if y < 0 then y = 0 end
Who is online
Users browsing this forum: Amazon [Bot], Bing [Bot] and 5 guests