Unable to Run Minimal Game

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.
Post Reply
Two Sheds
Prole
Posts: 2
Joined: Thu Nov 16, 2017 7:17 pm

Unable to Run Minimal Game

Post by Two Sheds »

Hello all, let me apologize for this very simple question. I feel as though I am missing something very basic.

I am following along with https://love2d.org/wiki/Getting_Started and am having problems.

I created a new folder containing a main.lua file containing the following code

Code: Select all

function love.draw()
    love.graphics.print("Hello World", 400, 300)
end
I receive the colorful Super Toast animated window when I attempt to run it using Sublime's build system LuaLove - Love2D or using the command

Code: Select all

love /Home/Documents/LoveTest
(LoveTest is where my main.lua is stored).

Like I said at the beginning of the post I feel like I'm missing something very simple. I appreciate any help I can get, and please allow me to apologize for posting something so basic. I look forward to being able to learn this wonder engine.

Cheers.
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: Unable to Run Minimal Game

Post by s-ol »

that doesn't look like a correct path on any major Operating System. If you are on Mac or Windows, try opening the directory options / properties / information window, it will show you the actual path there. Alternatively 'cd' into the directory in your terminal and start using 'love .'

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
Two Sheds
Prole
Posts: 2
Joined: Thu Nov 16, 2017 7:17 pm

Re: Unable to Run Minimal Game

Post by Two Sheds »

Thanks so much s-ol. I had the directory wrong. The directory was

Code: Select all

 /home/twosheds/Documents/LoveTest
Also in sublime I figure out I can run the code if i use the love-run build system in Sublime not the LuaLove - Love2D build system. Is there documentation on the wiki or somewhere else where I can find learn the differences and when to use the different build system? Such as
  • LuaLove
  • LuaLove
  • LuaLove - Run
  • LuaLove - Love2D
  • LuaLove - Idoc: File
  • LuaLove - Idoc: Project
  • love-run
User avatar
erasio
Party member
Posts: 118
Joined: Wed Mar 15, 2017 8:52 am
Location: Germany

Re: Unable to Run Minimal Game

Post by erasio »

Honestly. Look into those systems or ideally write your own.

A sublime build system is essentially a config file.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 0 guests