-1

I am starting a New project where i need to implement a terrain or like a map to the game. I want it to be curved :).

Cant add an image :c. But i want it like the image from this thread: Terrain curve to array of points Sorry for linking to another thread...

So the thing is that i dont want to use any game engine with that. The game will have a car which is driving up the "hills". So i will need the implementation of both map and collision to do. But i dont really know where to Start...

I would be really gratefull if someone could help me out! ~Jakob

Community
  • 1
  • 1
Jakob
  • 1
  • 2

1 Answers1

0

If you're creating a game you'l need some way to render your world. I recommend you think about this first.

Depending on your skills in math, a natural spline would be really good. This will generate a line. You can then set all the pixels below that line to green or black.

To do Collision detection, if you only want Collision with the ground, you can compare the y-coordinate of the car to the y-coordinate of the ground at a given x-value.

Note that a regular spline Will only work if the ground can be described as a function.

Thijs Steel
  • 1,190
  • 7
  • 16