As I work my way through the various Defold tutorials I am trying to extend the Movement tutorial code so the satellite bounces of the edges of the window. To do that I need the viewport dimensions. I assumed that window.get_size would return an array that I could use. However what I see being returned via
print(window.get_size())
is the text DEBUG:SCRIPT: 1280 720. I have done some coding in Lua but not of late. Perhaps I am misunderstanding something here? How do I get the viewport width & height into a couple of object attributes, e.g.
self.maxX = ...
self.maxY = ...