Hi everyone. I’m new to Corona and this is my first topic.
I come from GlBasic. I made several games like kwirk:
https://play.google.com/store/apps/details?id=com.galiksoft.kwirk
https://play.google.com/store/apps/details?id=com.galiksoft.kwirk2
I want to make a free version of kwirk, suported by ads, but GlBasic doesn’t suport ads. So I’m trying to convert the project to corona.
I’ve read the corona documentation, but I have some problems.
kwirk uses the entire screen, whatever the resolution.
In GlBasic there is a command like:
drawimage( #image, x, y, x_width, y_height)
where we can specifically say what will be the width and height of the image in the device screen.
As you can see, the game area is a 20x20 matrix. The walls are blue squares. So a wall height (y_height) is screen_height/20 and a wall width (x_width) is equal ( screen_height/20 ).
In glbasic project I use a single 512x512 wall image and it stretch and is drawn like I explained.
How to do that in Corona?!
I’ve read about the file “config.lua” with parameter screen, but nothing works.
I advice again that I want to use the entire screen. I use relative positions for everyting. Let’s say that all the game area is filled with wall squares. So, in glbasic I do something like that:
…
wall_size = screen_height / 20
for i=0 to 19
for j=0 to 19
drawimage( #1, wall_size * i , wall_size * j, wall_size, wall_size)
end
end
…
What is the equivalent in corona?
Please, help me.
Thanks