Hello World Problem

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
amir
Prole
Posts: 9
Joined: Wed May 24, 2017 7:28 am

Hello World Problem

Post by amir »

I have just started to learn Love. running the following example (main.lua) with
love main.lua
doesn't show the Hello World! screen, but results in the following screen and causes a CPU usage of over 200%! What am i doing wrong? Any help is appreciated.

This code:

Code: Select all

function love.draw()
    love.graphics.print('Hello World!', 400, 300)
end
shows this screen:

https://github.com/amirteymuri/Love-Pro ... _scrot.png
Lucyy
Citizen
Posts: 51
Joined: Thu Oct 15, 2015 6:57 am
Contact:

Re: Hello World Problem

Post by Lucyy »

You have to call

Code: Select all

love path/to/source/
it will automatically execute main.lua :3
MasterLee
Party member
Posts: 141
Joined: Tue Mar 07, 2017 4:03 pm
Contact:

Re: Hello World Problem

Post by MasterLee »

When in the same directory as main.lua simply call

Code: Select all

love .
amir
Prole
Posts: 9
Joined: Wed May 24, 2017 7:28 am

Re: Hello World Problem

Post by amir »

Thanks for your replies, the CPU usage of love is still about 70%, i guess it might have something to do with the framerate (which i should find out how to control at ca. 30 fps). Am i right?
User avatar
zorg
Party member
Posts: 3465
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Hello World Problem

Post by zorg »

You should really use 0.10.2 instead of 0.9; that's an old version.
No idea why you have so high cpu usage though.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
amir
Prole
Posts: 9
Joined: Wed May 24, 2017 7:28 am

Re: Hello World Problem

Post by amir »

zorg wrote: Wed May 24, 2017 12:25 pm You should really use 0.10.2 instead of 0.9; that's an old version.
No idea why you have so high cpu usage though.
I have downloaded the Linux Package of the newest version. But in the platform/unix/ directora there is no automagic executable. Is this site where i should install automagic from?:

https://sourceforge.net/projects/automagic/
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Hello World Problem

Post by raidho36 »

You wouldn't need one unless you're building from source code. In which case you should download full source code from bitbucket page, then automagic is guaranteed to be there.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests