Tilemap collision
Tilemap collision
You know how you make a tilemap by taking a part of a picture and placing it on a quad and drawing it? Pff, thats easy. Now theres only one problem. How can i detect a collision with a certain tile? Im using a character which can move (obviously). I havent made the tilemap yet.
I can't come up with a good signature!
Re: Tilemap collision
This is pretty simple to do with Object Orientation. I would explain it but I'm not sure it would be beneficial. I think you should create something more simple than a tile-engine. Not that I'm discouraging you. I just think that, based on your other posts, you aren't ready for this yet.
But, that's just my humble opinion. Credits to you for trying and going ahead with this, but I reckon it would be a good move for you to try creating something simple and returning to this once you have a better grasp of Lua/Löve.
Oh, and this page may be of interest to you regarding tilemaps: http://info.sonicretro.org/SPG:Solid_Tiles
But, that's just my humble opinion. Credits to you for trying and going ahead with this, but I reckon it would be a good move for you to try creating something simple and returning to this once you have a better grasp of Lua/Löve.
Oh, and this page may be of interest to you regarding tilemaps: http://info.sonicretro.org/SPG:Solid_Tiles
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: Tilemap collision
Well, what would be the more simple way, rather that tilemap?
And im learning all the time
And im learning all the time
I can't come up with a good signature!
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Tilemap collision
A tilesheet + quads is typically a good solution, personally, I'd put the static part of the map in a spritebatch, so you can draw that in one go.
Re: Tilemap collision
Thats, basically what im trying to do. I just want to do it BIG size (http://love2d.org/forums/viewtopic.php?f=3&t=2857)bartbes wrote:A tilesheet + quads is typically a good solution, personally, I'd put the static part of the map in a spritebatch, so you can draw that in one go.
I can't come up with a good signature!
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Tilemap collision
So what's the problem?
Re: Tilemap collision
As i said, i want to make it big. Right now im using a table fileld with numbers, since thats the only thing i can do.
I can't come up with a good signature!
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Tilemap collision
I still don't understand the problem?
EDIT: this sort of reads like: "I want to do X." "Then why don't you do X?" "No no, you don't understand. I want to do X."
EDIT: this sort of reads like: "I want to do X." "Then why don't you do X?" "No no, you don't understand. I want to do X."
Help us help you: attach a .love.
- tentus
- Inner party member
- Posts: 1060
- Joined: Sun Oct 31, 2010 7:56 pm
- Location: Appalachia
- Contact:
Re: Tilemap collision
It sounds like he wants to make one big render of a level map, assign that as a tilemap, and then draw it out like a normal tilemap-based game.
If that's the case,
If that's the case,
Kurosuke needs beta testers
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Tilemap collision
Anxiety, repeating "I want to make it big" is not an explanation, it's a ... repetition. Tell us why "making it big" is an issue for you with more detail. Help us help you.
I'm going to make some hypothesis and give you some answers. I could go into more detail once I know what your problem is, exactly.
I'm going to make some hypothesis and give you some answers. I could go into more detail once I know what your problem is, exactly.
- You are complaining that you have to type lots of tiles manually (100x100 tiles by hand can be lots of commas, apostrophes, etc). On that case, using a multi-line string instead of an array helps. See my tile tutorial
- You don't know how to do scroll. In that case, the easiest thing to do is drawing everything on each frame and just translate with love.graphics.translate
- You are complaining that drawing a big map is too slow. The simplest approach here is dividing the map into smaller maps - instead of 1 big map of 100x100, you have several smaller maps of 10x10. You only draw the maps that are visible. This can be made even faster if you use one Framebuffer per sub-map.
When I write def I mean function.
Who is online
Users browsing this forum: Amazon [Bot], Google [Bot] and 4 guests