Using LOVE 2D

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Scriptoar
Prole
Posts: 13
Joined: Sun May 08, 2011 8:49 am

Using LOVE 2D

Post by Scriptoar »

Help Coding With LOVE

Hi, I recently downloaded LOVE, but as you can see I am new. How do I write my programs in LOVE? Like where?
moar tacos = better life

u liek?
User avatar
BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

Re: Using LOVE 2D

Post by BlackBulletIV »

Hi there!

The wiki should help you. You make games by programming them in a language called Lua and using the LOVE API (Application Programming Interface) in that language. You write the code in a text editor, saving it as files with the extension of .lua. But anyway, the wiki, particularly the Getting Started page, should help you out with getting started.
Scriptoar
Prole
Posts: 13
Joined: Sun May 08, 2011 8:49 am

Re: Using LOVE 2D

Post by Scriptoar »

Thank you very much!
moar tacos = better life

u liek?
User avatar
BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

Re: Using LOVE 2D

Post by BlackBulletIV »

No worries. Have fun!
Scriptoar
Prole
Posts: 13
Joined: Sun May 08, 2011 8:49 am

Re: Using LOVE 2D

Post by Scriptoar »

Hey, I have a little thing of code. It gets two images and loads them onto the game. The first is the level, and that loads fine, then I load a picture of the character but the level image disappears. Why?
moar tacos = better life

u liek?
User avatar
BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

Re: Using LOVE 2D

Post by BlackBulletIV »

Are all the images power of two (Po2) compliant? As in, do they have dimensions that are a power of two, like 8x8, 16x16, 32x32 .. 256x256, and so on?
Scriptoar
Prole
Posts: 13
Joined: Sun May 08, 2011 8:49 am

Re: Using LOVE 2D

Post by Scriptoar »

They're just 2D. Let me explain..

Image - Level
-- It's covers the whole screen and loads fine on its own.

Image - Character
-- When you load it, it covers everything for some reason. The size of the picture is the same as the level, but everything is transparent except the actual character. However, it still covers the whole screen even after.

The dimensions of both pictures are 800x600.
moar tacos = better life

u liek?
User avatar
BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

Re: Using LOVE 2D

Post by BlackBulletIV »

800x600 is not Po2 compliant. The next up from there would be 1024x1024. The wiki page "PO2 Syndrome" might help you there.

Also, there's no need to make the character the same dimensions as the screen. Just make it the width and height you need, and then add however many transparent pixels you need to make it Po2 compliant.
Scriptoar
Prole
Posts: 13
Joined: Sun May 08, 2011 8:49 am

Re: Using LOVE 2D

Post by Scriptoar »

Ok thanks!
moar tacos = better life

u liek?
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Using LOVE 2D

Post by Robin »

Scriptoar wrote:Hey, I have a little thing of code. It gets two images and loads them onto the game. The first is the level, and that loads fine, then I load a picture of the character but the level image disappears. Why?
I think you have a different problem than PO2 syndrome.

If you draw an image over another image, of course you cannot see the first image unless the second image is at least partly transparent. This can be done by making the things that should not be seen transparent in your image editor (Paint cannot handle transparency, if you're using that.)
Help us help you: attach a .love.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 8 guests