Based on work from Ninwa http://love2d.org/forums/viewtopic.php?f=5&t=2097
I present you the super modified version
Features:
My very own inefficient .tmx parser
Camera
Buckets(Damn you feature I hate you!)
Spritebatches
Support for multiple tilesets
Arbitrary layer drawing(so you can you can draw over your sprites)
Your very own 512x512 map so you can claw your eyes when yous see the framerate(press m to change to map 2)
And lots of obsolete files and comments as well as test functions so you can see how messy I code
The engine is still WIP and is generally intended for those who like to tinker with things
Also since its intended for a game don't expect it to be any less quirky then it is
http://dl.dropbox.com/u/1027218/gamesource.love
Warning: Do not export from Tiled maps with other encoding other then CVS,that includes the default xml encoding which is shit
Update: Added y collision offset as well as change the image directory so you can load .tmx files in tiled
Updated!: Retarded performance edition
Update: Fixed image initializing, added some smart garbage collection, cron.lua FTW!
Tiled Drawer
- Franc[e]sco
- Prole
- Posts: 19
- Joined: Sun May 08, 2011 9:09 am
Re: Tiled Drawer
erm, could you Include the profiler module or add a link to it?
- Franc[e]sco
- Prole
- Posts: 19
- Joined: Sun May 08, 2011 9:09 am
Re: Tiled Drawer
The chests drawing order is a bit messed up but it's pretty nice
- tentus
- Inner party member
- Posts: 1060
- Joined: Sun Oct 31, 2010 7:56 pm
- Location: Appalachia
- Contact:
Re: Tiled Drawer
Maybe it's because the render was larger than my screen, but collision detection seemed way off, and a little nonsensical. Also, I could see tiles at the top of the screen get clipped at some points.
Kurosuke needs beta testers
Re: Tiled Drawer
The top of the screen is because the rate is 80 while the sprites are 170,it wouldn't happen if the rate was the same, you can fix it by adding -2 to the selector for loop y variabletentus wrote:Maybe it's because the render was larger than my screen, but collision detection seemed way off, and a little nonsensical. Also, I could see tiles at the top of the screen get clipped at some points.
I wanted people to know about it since its a limitation of the engine
As for collision it should be screen independent,can you post your screen dimensions?
The collisions on y should aligned perfectly the front edge of the chest with the white dot
As for x you can see it between the two chests
As for the quirkiness it should be because of the collision map not the engine,since again the rate is 80 not the whole sprites
If it really is nonsensical can you post a screen with the problem collisions?
There is no drawing order,it renders layer 1 then sprites then layer 2Franc[e]sco wrote:The chests drawing order is a bit messed up but it's pretty nice
The good thing with this is that you can script it when to draw and when not to draw
Re: Tiled Drawer
Yeah... I could walk under the chests and bridges. Plus I could walk over the water tiles, and could not walk along the path that leads from the starting area to outside - I had to walk to the bridge and go all the way around.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
Re: Tiled Drawer
Check the tiled map collision layer and tell me if its accurate with the collisions in gameLafolie wrote:Yeah... I could walk under the chests and bridges. Plus I could walk over the water tiles, and could not walk along the path that leads from the starting area to outside - I had to walk to the bridge and go all the way around.
Re: Tiled Drawer
Will do when I get the chance.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
Re: Tiled Drawer
Updated it for massive performance increase!
Basically I just check if we a are in a new bucket and if we are not use the previous calculated spritebatches
There is also allot less memory consumption and pretty much disregards the layer penalty
Also updated the maps, now the first map is a layer test with 7 layers, while the second is a mind boggling 512x512 map
Remember to press lshift to traverse faster
Basically I just check if we a are in a new bucket and if we are not use the previous calculated spritebatches
There is also allot less memory consumption and pretty much disregards the layer penalty
Also updated the maps, now the first map is a layer test with 7 layers, while the second is a mind boggling 512x512 map
Remember to press lshift to traverse faster
Who is online
Users browsing this forum: Google [Bot] and 2 guests