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

15
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

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

Page 1: LUA FÜR 2D S YSTEME Universität zu Köln Re-usable Content in 3D und Simulationssystemen Pr. Dr. Manfred Thaller SoSe 2013 Barbara von Hunnius.

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

Page 2: LUA FÜR 2D S YSTEME 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 ✘

Page 3: LUA FÜR 2D S YSTEME Universität zu Köln Re-usable Content in 3D und Simulationssystemen Pr. Dr. Manfred Thaller SoSe 2013 Barbara von Hunnius.

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/

Page 4: LUA FÜR 2D S YSTEME Universität zu Köln Re-usable Content in 3D und Simulationssystemen Pr. Dr. Manfred Thaller SoSe 2013 Barbara von Hunnius.

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

Page 5: LUA FÜR 2D S YSTEME Universität zu Köln Re-usable Content in 3D und Simulationssystemen Pr. Dr. Manfred Thaller SoSe 2013 Barbara von Hunnius.
Page 6: LUA FÜR 2D S YSTEME Universität zu Köln Re-usable Content in 3D und Simulationssystemen Pr. Dr. Manfred Thaller SoSe 2013 Barbara von Hunnius.
Page 7: LUA FÜR 2D S YSTEME Universität zu Köln Re-usable Content in 3D und Simulationssystemen Pr. Dr. Manfred Thaller SoSe 2013 Barbara von Hunnius.
Page 8: LUA FÜR 2D S YSTEME Universität zu Köln Re-usable Content in 3D und Simulationssystemen Pr. Dr. Manfred Thaller SoSe 2013 Barbara von Hunnius.

LÖVE

Page 9: LUA FÜR 2D S YSTEME Universität zu Köln Re-usable Content in 3D und Simulationssystemen Pr. Dr. Manfred Thaller SoSe 2013 Barbara von Hunnius.

HELLO WORLD

Hello World in Lua

Hello World für Löve

Page 10: LUA FÜR 2D S YSTEME Universität zu Köln Re-usable Content in 3D und Simulationssystemen Pr. Dr. Manfred Thaller SoSe 2013 Barbara von Hunnius.

PROGRAMMIERSCHNITTSTELLE - API

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

Page 11: LUA FÜR 2D S YSTEME Universität zu Köln Re-usable Content in 3D und Simulationssystemen Pr. Dr. Manfred Thaller SoSe 2013 Barbara von Hunnius.

WICHTIGE FUNKTIONEN

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

Page 12: LUA FÜR 2D S YSTEME Universität zu Köln Re-usable Content in 3D und Simulationssystemen Pr. Dr. Manfred Thaller SoSe 2013 Barbara von Hunnius.
Page 13: LUA FÜR 2D S YSTEME Universität zu Köln Re-usable Content in 3D und Simulationssystemen Pr. Dr. Manfred Thaller SoSe 2013 Barbara von Hunnius.

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

Page 14: LUA FÜR 2D S YSTEME Universität zu Köln Re-usable Content in 3D und Simulationssystemen Pr. Dr. Manfred Thaller SoSe 2013 Barbara von Hunnius.

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/

Page 15: LUA FÜR 2D S YSTEME Universität zu Köln Re-usable Content in 3D und Simulationssystemen Pr. Dr. Manfred Thaller SoSe 2013 Barbara von Hunnius.

VIELEN DANK FÜR DIE AUFMERKSAMKEIT!