I already found a similar question on this website but the answers didn't really help. I'm creating a game on Solar2d /Corona sdk and I'm trying to create multiple objects that bounce around the screen and even collide with each other changing the direction (just like in real life). I'm having a few issues... I tried to create some walls but I just see white lines and my objects can go past them since they only cover half the width and half the height. here is the code I used (I found it somewhere on the internet):
local leftWall = display.newRect (0, 0, 1, display.contentHeight);
local rightWall = display.newRect (display.contentWidth, 0, 1, display.contentHeight);
local ceiling = display.newRect (0, 0, display.contentWidth, 1);
local bottom = display.newRect (0, display.contentHeight, display.contentWidth, 1);
How can I set the edges of the screen as boundaries? And since I want to create several copies of the same object should I create them individually or as a group?
I'm new to the website so if I made any mistake I'm sorry!