Primitive "Tiled" map loader and 2D game lighting

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
adrix89
Party member
Posts: 135
Joined: Fri Oct 15, 2010 10:58 am

Re: Primitive "Tiled" map loader and 2D game lighting

Post by adrix89 »

Added rez independent collisions(and sane/insane coordinates)
Also added spritebatch
I'll play with frame buffer when the final ver of love 0.7 is released
PlanetCute_miab2.love
(793.28 KiB) Downloaded 395 times
I use Workflowy but you can check out Dynalist as its the better offer.
User avatar
nevon
Commander of the Circuloids
Posts: 938
Joined: Thu Feb 14, 2008 8:25 pm
Location: Stockholm, Sweden
Contact:

Re: Primitive "Tiled" map loader and 2D game lighting

Post by nevon »

How nice of you to have it go full screen and not have a way to exit.
User avatar
adrix89
Party member
Posts: 135
Joined: Fri Oct 15, 2010 10:58 am

Re: Primitive "Tiled" map loader and 2D game lighting

Post by adrix89 »

nevon wrote:How nice of you to have it go full screen and not have a way to exit.
q

damn should have set the fullscreen to false
i'm using fullscreen because of vsync problems
I use Workflowy but you can check out Dynalist as its the better offer.
User avatar
nevon
Commander of the Circuloids
Posts: 938
Joined: Thu Feb 14, 2008 8:25 pm
Location: Stockholm, Sweden
Contact:

Re: Primitive "Tiled" map loader and 2D game lighting

Post by nevon »

adrix89 wrote:
nevon wrote:How nice of you to have it go full screen and not have a way to exit.
q
Lol. I mashed on the keyboard to try to find a quit key. That must have been one of the few keys I never tried. :ultrashocked:
User avatar
adrix89
Party member
Posts: 135
Joined: Fri Oct 15, 2010 10:58 am

Re: Primitive "Tiled" map loader and 2D game lighting

Post by adrix89 »

nevon wrote:
adrix89 wrote:
nevon wrote:How nice of you to have it go full screen and not have a way to exit.
q
Lol. I mashed on the keyboard to try to find a quit key. That must have been one of the few keys I never tried. :ultrashocked:
I do agree that q isn't the most intuitive,the alternative is however to look at the keyboard constants to be sure what value it has
Also the event push to quit is q so it wouldn't surprise me if more games have q as the quit button
I use Workflowy but you can check out Dynalist as its the better offer.
User avatar
headchant
Party member
Posts: 105
Joined: Fri Sep 03, 2010 12:39 pm
Contact:

Re: Primitive "Tiled" map loader and 2D game lighting

Post by headchant »

Don't know what adrix did but here is my version of tiledMap.lua

this is an enhanced version of the "Tiled Map Loader" from ninwa

problems:
underscore _ in filenames break the loading of the tileset image
collision check is still off
changes:
removed middleclass and instead used hump
now compatible with more tilesets(only vertically lined up tilesets were allowed in the original version)
faster drawing with spritebatch
draw layers seperatly(for z-stuff)

I noticed that the parser only recognizes .tmx files in the standard "XML" format which is the worst(and biggest) format available . Love 0.7 supports some kind of base64(http://love2d.org/wiki/FileDecoder) so this obviously would be the better choice. The default format for the .tmx files in "Tiled" is base64(gzip compressed). I don't know if that is supported by love?
Attachments
tiledMap.lua
(5.76 KiB) Downloaded 245 times
User avatar
adrix89
Party member
Posts: 135
Joined: Fri Oct 15, 2010 10:58 am

Re: Primitive "Tiled" map loader and 2D game lighting

Post by adrix89 »

The best format for Tiled probably is CSV as it can be far easier to parse

Wait you have spriteBatch = love.graphics.newSpriteBatch( self.tileset.src, self.layers * self.data.width*self.data.height
in draw,be careful as it might gobble insane amounts of memory
Also can you post a .love? as I have no idea what resource you are using for the tileset

Underscores don't work because you don't have the right string pattern in the parase phase
You have to offset collision by the screen resolution(lot of headache as the coordinate system is not sane,better just use my results)
I use Workflowy but you can check out Dynalist as its the better offer.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 2 guests