Love Game Engine

From TRCCompSci - AQA Computer Science
Revision as of 13:34, 4 June 2019 by Admin (talk | contribs) (Love Main Site)
Jump to: navigation, search

Download

Go to the main site for the Love engine:

love2d.org

The above site is not available in college so you can also download from here:

Love 64 Bit Zip

Love 32 Bit Zip

You should be able to extract these zip files into your compiled storage folder.

Getting Started

The Love game engine uses Lua, so make sure you catch up and learn the language. The link below is to the Lua wiki section, it covers all of the basics of Lua:

Lua

Making a Game

To make a minimal game:

  1. Create a folder for your game
  2. Open up your favorite text editor. Sublime Text is a pretty good one for all operating systems, and it has Lua support built in.
  3. Create a new file in the folder you just created, and name it main.lua.
  4. Put the following code in the 'main.lua' file, and save it:
function love.load()
    -- use to set up your game
end

function love.update(dt)
    -- dt is the elapsed time since last call
end

function love.draw()
    love.graphics.print("Hello World", 400, 300)
end

You can obviously add more functions, classes, variables to make your own game. But the key sections are 'love.load()', 'love.update(dt)', and 'love.draw()'.

Running Games

Within Windows software such as ZeroBrane Studio, Sublime Text 2, Notepad++, and SciTE allow you to launch the game from within their code editors.

Otherwise, the easiest way to run the game is to drag the folder onto either love.exe or a shortcut to love.exe. Remember to drag the folder containing main.lua, and not main.lua itself.

You can create a shortcut to do this; simply make a shortcut to love.exe, right-click on it and select 'Send to Destop' to create a shortcut:

Love shortcut.gif

On Windows, there is a special command-line option which will attach a console to the window, allowing you to see the result of print calls. So right click your shortcut, choose 'properties', and edit the target to include '--console' eg:

"C:\Program Files\LOVE\love.exe" --console

Tutorials

TRC

Love - Drawing shapes

Love - Drawing an Image

Love - Moving an object

External

Love Main Site

Here is the linke for the Love Wiki:

Love Wiki Site

The above site is not available in college, but try this site instead (it seems to be a copy of parts of the Love wiki):

Love wiki alternative

Here is the link for just the tutorials on the Love wiki site:

Love tutorials

The above site is not available in college, but try this site instead (it seems to be a copy of the Love wiki):

Love wiki alternative

Awesome Love2d

Awesome Love2d

Learn 2 Love

Learn 2 Love

Lua Breakout/Arkanoid

Breakout/Arkanoid

Simple Game Tutorials

Simple Game Tutorials

Harvard CS50

Games Development Course

YouTube playlist for this course: Harvard CS50 Games Development Tutorials

GitHub for this course: GitHub for these tutorials

Using Tiled in Love

Using Tiled in Love

You Tube

You Tube playlists:

Game Development in Love2D [Beginner Series!]

Lets make a platformer in love2d

Game Development for Complete Beginners Tutorial Series (Using Lua and Love2d)

How to (make games with) LÖVE

You Tube Videos:

Simple coin collection game

Love Tiled Maps

Mario type platformer

Love Game in 8 Minutes