LUA FÜR 2D S YSTEME Universität zu Köln Re-usable Content in 3D und Simulationssystemen Pr. Dr....

Post on 05-Apr-2015

111 views 0 download

Transcript of LUA FÜR 2D S YSTEME Universität zu Köln Re-usable Content in 3D und Simulationssystemen Pr. Dr....

LUA FÜR 2D SYSTEME

Universität zu Köln

Re-usable Content in 3D und Simulationssystemen

Pr. Dr. Manfred Thaller

SoSe 2013

Barbara von Hunnius

WAS BRAUCHEN WIR?

Programmiersprache ✔

Grafik ✘

Sound ✘

Interaktion ✘

DIE LÖSUNG

LuaCheia Distribution von Lua AddOn Bibliotheken u.a. SDL (Simple DirectMedia Layer)

Löve Framework speziell für Spiele in Lua Opensource Privat sowie komerziell nutzbar

http://luacheia.lua-users.org/ https://love2d.org/

LUACHEIA 1. Download 2. Unter Systemsteuerung\System und Sicherheit\

System auf „Erweiterte Systemeinstellungen“ 3. Umgebungsvariablen, dort die Variable „Path“

bearbeiten 4. Programmpfad von LuaCheia

anhängen

LÖVE

HELLO WORLD

Hello World in Lua

Hello World für Löve

PROGRAMMIERSCHNITTSTELLE - API

Unterteilt in Module, die wiederum dem Modul love untergeordnet sind, u.a.: love.graphics love.filesystem love.mouse love.audio love.physics

WICHTIGE FUNKTIONEN

love.load love.update love.draw love.mousepressed love.mousereleased love.keypressed love.keyreleased love.focus love.quit

VON DEN EINZELTEILEN ZUR EXE

main.lua und alle weiteren Dateien zu einer .zip-Datei zusammen fassen

-> main.lua auf oberster Ebene!

Game.zip umbenennen in Game.love -> Durch Doppelklick spielbar

In Konsole: copy /b love.exe+game.love game.exe Love.exe -> Dateipfad von Love-Installation Game.love -> Dateipfad des Spiels Game.exe -> Gewünschter Zielpfad für Spiel

Game.exe zusammen mit .dll-Dateien von Love in einen Ordner

HILFREICHE LINKS/QUELLEN

https://www.love2d.org/ https://www.love2d.org/wiki/Main_Page https://www.love2d.org/wiki/Tutorials https://www.love2d.org/wiki/

Tutorial:Hamster_Ball http://nova-fusion.com/2011/06/14/a-guide-

to-getting-started-with-love2d/

VIELEN DANK FÜR DIE AUFMERKSAMKEIT!