How to spawn a random boundary?

I am creating an endless runner in which our character has to navigate through a tunnel while dodging the boundary of tunnel which is supposed to be random like it gets bigger and then smaller and so on but in a random manner. I am new so i can’t figure out how to do it. Any kind of help will be highly appreciated :slight_smile:

Is the boundary just one side, two sides, or is it all the sides? For one side its easy, just do:

math.randomseed(os.time()) local function changePlace() boundary.x = math.random(10, 100) boundary.y = math.random(100, 200) end Runtime:addEventListener("enterFrame", changePlace)

For more than one just make a table, insert them, and then do the same thing. 

Here is some documentation:

https://docs.coronalabs.com/api/library/table/

Is the boundary just one side, two sides, or is it all the sides? For one side its easy, just do:

math.randomseed(os.time()) local function changePlace() boundary.x = math.random(10, 100) boundary.y = math.random(100, 200) end Runtime:addEventListener("enterFrame", changePlace)

For more than one just make a table, insert them, and then do the same thing. 

Here is some documentation:

https://docs.coronalabs.com/api/library/table/