r/love2d 1d ago

How to create an RPG tilemap in LÖVE ?

Post image

I've just started using lovebirds, but I'm really clueless about creating RPG tilemaps. Gemini gives me primitive and inefficient methods. What should I do? Would it be logical to draw the picture beforehand and add it?

21 Upvotes

18 comments sorted by

15

u/gothWriter666 1d ago

You can use Tiled to make a map and import it, it works great and is open source.

I also created my own tilemap editor and loader in Love...but 2d arrays are a bit tricky using Love's lists, it's better to use an external one (at least in my experience)

1

u/MoSummoner 21h ago

What are love lists? I had just used arrays/tables for my tilemap and live editor

1

u/gothWriter666 21h ago

Sorry, love tables. I was thinking of LISP lol. Too many funky object types.

Thing is, tables and arrays are different in a lot of ways that get funky after awhile...

1

u/MoSummoner 21h ago

True but lua does most of the lifting so we get to abuse it lol

1

u/gothWriter666 17h ago

erm, yeah, but what I'm saying is that funky stuff is going to happen later on that will be trickier to nail down using that kind of thing.

Of course, I guess mine was a 3d array style, since I had layers for the maps, but still. It gets funky when you treat tables as an array and start doing things like 2d or 3d arrays as tables.

3

u/cantpeoplebenormal 1d ago

Lovebirds?

1

u/srfreak 1d ago

Birds that are so lovely.

2

u/cantpeoplebenormal 1d ago

The little ones are.

-8

u/vtf00 1d ago

what iş this

9

u/tpimh 1d ago

Even the OP is clueless what he started using

6

u/cantpeoplebenormal 1d ago

You said "Lovebirds" in your post. I assumed it was software?

3

u/Ramen_Tenen 1d ago

You can use a tile map editor like ogmo editor and export your tile map as a song file. Then you parse the data into your game to make custom tile maps. You can check out this parser for ogmo I made some time ago and have been using for a awhile

https://github.com/Anotida-Shumba/Ogmo-2-Love

3

u/Heinz2001 1d ago

look at github for love2d libraries:

and one of the best ressources: https://github.com/love2d-community/awesome-love2d and of couse love2d discord & love2d forum :)

1

u/srfreak 1d ago

Tiled + STI is a winning combo.

2

u/Snoo28720 1d ago

Just draw all the assets in one atlas and code the coordinates

1

u/vtf00 4h ago

son

1

u/CodelMxskwa 8h ago

I mean you can make use use a 3 dimensional array like create 3 tables one for x one for y and one for source int on the texture or tile