I’m new to SDL. Please forgive me if I’m asking the obvious or so.
I’ve been reading tutorials on SDL and made some characters, moved them, animated them … everything went smoothly.
I’m trying to make per pixel collision. But first I wanna draw some ground for the characters to stand on. I have something like this on my mind:
I want to be able to create hills (think I need to draw arc?), but I have no idea how to fill the ground (the white area on the image) with a texture? I want to be able to tile my texture image on the ground. But the ground is not a rectangle. It can be any shape. How can I do this?
I edited my first post, uploaded the image somewhere else.
I’m not using openGL I guess. I’ve loaded sprites and clipped them and used SDL_BlitSurface() and SDL_Flip();
I have no idea how to fill inside of ANY shape with a texture. Also I want to move the character on those hills, so I g otta know the pixels of those arcs, right?
I’m new to SDL. Please forgive me if I’m asking the obvious or so.
I’ve been reading tutorials on SDL and made some characters, moved
them, animated them … everything went smoothly.
I’m trying to make per pixel collision. But first I wanna draw some
ground for the characters to stand on. I have something like this on
my mind:
I want to be able to create hills (think I need to draw arc?), but I
have no idea how to fill the ground (the white area on the image) with
a texture? I want to be able to tile my texture image on the ground.
But the ground is not a rectangle. It can be any shape. How can I do this?