Should i use the tile mapping for my game :(?

hii! i was trying to code my first game"flappy bird" nd i have to use the sdl ; so i started by makig a fonction that moves the pipes
then i make a second fonction that moves the bird but when i tried to combine those two functions it wasn’t like i have expected :disappointed_relieved: it seams hard to combine those two function
so i thought it would be better to use the tile mapping like that i can block the pipes nd move them nd move the bird at the same time? i really need ur help nd thanks in advance

You can use tile mapping for your game, but I doubt it will solve your problem of combining bird movement with pipe movement since it hasn’t really got anything to do with that. However, using Tiled will definitely make it easier for you to make the maps more interesting later.

For solving your problem, I think it would be easier to imagine if you didn’t have a function that moves the pipes, because they’re actually standing still. The reason they move is because there’s a camera viewport sliding along, moving at the same speed as the bird. Implementing things that way (having well-defined coordinate systems like “world” and “camera” and a mapping between them) also makes it easier to add other moving things later.

1 Like

aaaa it’s like the background is fixed but the camera moves!
what about the function that moves the bird should i keep it ?
we need a very long map i really dont have any idea about the tile mapping so is it possible to use a downloaded map or to create my own map ?

Probably. You expect the bird to move, right? Though it should not only move the bird up and down, but probably also forward to stay inside the camera viewport (or to make sure the camera moves at all, if the camera position is based on the position of the bird).

You can’t generally download ready made Tiled maps apart from some examples, so you would just create your own.

okk thnx a lot :smile: i’ll try it!