Background

Hello, I see a lot of information about downloading .png images, but I can’t seem to find info on how I would make my own image.  Say I want to make a simple background image, like a pale blue background is that possible or do I have to download all the images from corona?

Thanks.

I don’t know what you mean by “downloading images from Corona” but you can create a rectangle and use setFillColor to paint it.

Normally you would use a tool like Adobe Photoshop, Autodesk’s Sketchbook Pro, the GIMP, Adobe Illustrator, InkScape or similar to create artwork. Then you would from that tool, save the image to your project folder. Then you have the .png file in your project and can use display.newImageRect() to load the image.

While Corona has features to create images via screen capture, you send a lot of time programming a screen to save it as an image, isn’t a practical way to make art for your app.  

Adobe Photoshop used to be very expensive, but can be had for $10/month subscription with a 1 year commitment. Sketchbook Pro is like $5 / month or $30/year.  That said, Sketchbook Pro is a great tool to draw and paint in, but there are things that I still need Photoshop for.  I tend to use them in tandem. The GIMP is free. I’ve not used it in years, but previously I found the User Interface antiquated. But it’s free.  All three of these are known as “raster” art programs. You are drawing and painting in pixels. 

The other type of drawing is called “vector” drawing and this is where Adobe Illustrator and InkScape come into play. They allow you to draw shapes that can be resized without pixelating. They produce a different feel for art, but are very common tools for this. Illustrator is part of Adobe’s Creative Cloud suite which costs more like $50 a month, but you get every Adobe product that make including Photoshop in the deal.  InkScape is free, but for some reason I can’t get it to run on my Mac. I think I have something else installed that’s conflicting with it.

Most of the paid versions offer free trials for 15-30 days.

Rob

I know it’s different, but I started learning code from khan academy and this is one of the projects: 

//background color

background(0, 51, 255);

// The ground

fill(48, 209, 16);

rect(0, 300, 400, 100);  

How would you could something like this or would I have to create a photoshop picture then added to my code? 

Sorry for the dumb questions, but I’m kind of stumbling in the dark trying to learn lua.

Thanks.

Have you looked at Corona guides? It would be far better if you learn Corona from those guides instead of Khan Academy. Here:

https://docs.coronalabs.com/guide/index.html

https://docs.coronalabs.com/guide/programming/index.html

For your question. Can you try this to see how this works for you?

local background = display.newRect( display.contentCenterX, display.contentCenterY, display.contentWidth, display.contentHeight ) background:setFillColor( 0, 0, 0 )

Here are the docs for what I’ve used above.

https://docs.coronalabs.com/api/library/display/index.html

https://docs.coronalabs.com/api/type/ShapeObject/setFillColor.html

Thanks to both of you, I really have a much better understanding of what I’m suppose to do and I really appreciate the help you both gave me.

Thanks again.

I don’t know what you mean by “downloading images from Corona” but you can create a rectangle and use setFillColor to paint it.

Normally you would use a tool like Adobe Photoshop, Autodesk’s Sketchbook Pro, the GIMP, Adobe Illustrator, InkScape or similar to create artwork. Then you would from that tool, save the image to your project folder. Then you have the .png file in your project and can use display.newImageRect() to load the image.

While Corona has features to create images via screen capture, you send a lot of time programming a screen to save it as an image, isn’t a practical way to make art for your app.  

Adobe Photoshop used to be very expensive, but can be had for $10/month subscription with a 1 year commitment. Sketchbook Pro is like $5 / month or $30/year.  That said, Sketchbook Pro is a great tool to draw and paint in, but there are things that I still need Photoshop for.  I tend to use them in tandem. The GIMP is free. I’ve not used it in years, but previously I found the User Interface antiquated. But it’s free.  All three of these are known as “raster” art programs. You are drawing and painting in pixels. 

The other type of drawing is called “vector” drawing and this is where Adobe Illustrator and InkScape come into play. They allow you to draw shapes that can be resized without pixelating. They produce a different feel for art, but are very common tools for this. Illustrator is part of Adobe’s Creative Cloud suite which costs more like $50 a month, but you get every Adobe product that make including Photoshop in the deal.  InkScape is free, but for some reason I can’t get it to run on my Mac. I think I have something else installed that’s conflicting with it.

Most of the paid versions offer free trials for 15-30 days.

Rob

I know it’s different, but I started learning code from khan academy and this is one of the projects: 

//background color

background(0, 51, 255);

// The ground

fill(48, 209, 16);

rect(0, 300, 400, 100);  

How would you could something like this or would I have to create a photoshop picture then added to my code? 

Sorry for the dumb questions, but I’m kind of stumbling in the dark trying to learn lua.

Thanks.

Have you looked at Corona guides? It would be far better if you learn Corona from those guides instead of Khan Academy. Here:

https://docs.coronalabs.com/guide/index.html

https://docs.coronalabs.com/guide/programming/index.html

For your question. Can you try this to see how this works for you?

local background = display.newRect( display.contentCenterX, display.contentCenterY, display.contentWidth, display.contentHeight ) background:setFillColor( 0, 0, 0 )

Here are the docs for what I’ve used above.

https://docs.coronalabs.com/api/library/display/index.html

https://docs.coronalabs.com/api/type/ShapeObject/setFillColor.html

Thanks to both of you, I really have a much better understanding of what I’m suppose to do and I really appreciate the help you both gave me.

Thanks again.