Got a question. I've made a map picture with Inkscape. Now I want to ask you, how should i make the thing to be able to walk on.
It is a side scroll map, near to Maple Story's design.
Lets say we got 2 images. One is the white/violet one, the other one is the full map image, with mixed colors. If I would put the white/violet image behind the full map one, would it be possible to make the violet color something like not passable(able to walk on)? It saves a lot of work i think.
It would take a lot of time to do it with boxes and make their locations on the right spots imo... or?
While it's possible to do that, calculating collision based on a mask (the white/violet image) would be quite slow unless you used a few crafty tricks (which I can suggest, if you like). It would be a lot faster if you made a list of line segments (which describe the shape of your terrain) and checked against them, instead. It'd be possible to automatically generate such a list of line segments from the mask image (say, when loading the level, or better yet, before distributing your game), but it'd require some rather cunning code (presumably, something along the lines of turning the mask into a point cloud, then running a convex hull algorithm over it). I guess if you didn't want to make your own physics, you could use Box2D (Love's built-in physics system) and make a complex body which has a similar shape to your terrain.
TL;DR: It's doable, but tricky.
Oh, and welcome to the forums.
EDIT) Also, it looks like Maple Story uses tiles, not a fully drawn level. Using a tile-based system is a very good idea, but it does mean your terrain can't be an arbitrary shape.
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit! Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
How to make them to be able to walk on? The player should be able to jump from line to line.
That's my code for the rectangle shaped part of the ground, which is on the bottom of the map. I just don't have any idea, how i should do it for lines
I see you're going the Box2D route. I'm not too well-versed with it, but if I'm not mistaken, what you need to do is create a shape that has the same size and location as each of your platforms. Then you'll need some code that moves your circle around when you press the arrow keys (or WADS, or whatever you want your controls to be). This tutorial should help you with that.
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit! Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.