Getting Started (Türkçe)
Contents
LÖVE'yi Edinmek
LÖVE'nin internet sitesinden en güncel sürümünü indirip kurun. Eğer Windows kullanıyor ve LÖVE'yi kurmak istemiyorsanız, ziplenmiş çalıştırılabilir dosyaları herhangi bir yere çıkarabilirsiniz.
Hangi LÖVE sürümünün kurulu olduğunu görmek için şu komutu çalıştırın:
love --version
Unutmayın, LÖVE'yi komut satırından çalıştırabilmek için LÖVE'nin bulunduğu klasörü sisteminizin PATH değişkenine eklemeniz gerekebilir.
Oyun Yapmak
Küçük bir oyun yapmak için yeni bir klasör oluşturup istediğiniz metin düzenleyicisini açın. Sublime Text güzeldir, kendinden Lua'yı destekler ve çoğu işletim sisteminde çalışır. Klasörünüzde main.lua
adlı bir dosya oluşturup içerisine şu kodu yerleştirin ve kaydedin:
function love.draw()
love.graphics.print("Merhaba dünya!", 400, 300)
end
Oyunları Çalıştırmak
LÖVE oyunları iki şekilde başlatabilir:
main.lua
dosyasını içeren bir klasörden.- En üstteki (yani kök) dizininde
main.lua
bulunan bir .love dosyasından.
\.love dosyalarını oluşturmak için bkz.: Oyun Dağıtımı
Windows
ZeroBrane Studio, Sublime Text, Notepad++, ve SciTE; oyunu kod editörünün içinden başlatmanıza izin verir.
Onun dışında oyunu çalıştırmanın en kolay yolu oyunu love.exe veya love.exe'ye giden bir kısayola sürüklemektir. main.lua
'nın kendisini değil, main.lua
'yı içeren klasörü sürüklemeniz gerektiğini unutmayın.
Oyunu komut satırından da çalıştırabilirsiniz:
"C:\Program Files\LOVE\love.exe" "C:\oyunlar\oyunum"
"C:\Program Files\LOVE\love.exe" "C:\oyunlar\paketlenmişoyun.love"
Bunu yapmak için kısayol oluşturabilirsiniz. love.exe için kısayol oluşturun, sağ tıklayın ve "Özellikler"i seçin, daha sonra istediğiniz komut satırını "Hedef" kısmına yerleştirin.
Windowsta pencereye bir konsol iliştirerek print
çağrısının sonucunu görmenizi sağlayan özel bir komut satırı seçeneği vardır (conf.lua'da t.console=true
yapmak veya (0.10.2'den beri) lovec.exe
'yi çalıştırmak ile eşdeğer):
"C:\Program Files\LOVE\love.exe" --console
Linux
Linux'ta bu komut satırlarından birini kullanabilirsiniz:
love /home/dosya/yolu/oyundizini
love /home/dosya/yolu/paketlenmisoyun.love
Ayrıca LÖVE'yi sistem genelinde kurduysanız dosya yöneticinizde .love dosyalarına çift tıklayabilirsiniz.
macOS
macOS'te bir klasör veya .love dosyası love uygulama paketine sürüklenebilir. Mac terminalinde (komut satırı) love'yi bu şekilde kullanabilirsiniz (Uygulamalar dizinine kurulu olması gerekir):
open -n -a love "~/dosya/yolu/oyunum"
Ancak yukarıdaki yöntem print
edilen yazıları terminal penceresine çıkarmaz. Bunu yapmak için uygulama paketindeki love çalıştırılabilir dosyasını doğrudan çalıştırmanız gerekir:
/Applications/love.app/Contents/MacOS/love ~/dosya/yolu/oyunum
love
adıyla çalıştırılabilir dosyayı çağırmak için ~/.zshrc
dosyanıza (Z shell yapılandırma dosyası) "alias" ekleyerek terminal oturumunuzda "alias" kurabilirsiniz.
Dosyayı şununla açın:
open -a TextEdit ~/.zshrc
Eğer dosya henüz mevcut değilse ilk önce
touch ~/.zshrc
komutunu çalıştırmanız gerekebilir.
Sonra şu kodu yapıştırıp dosyayı kaydedin:
# alias to love
alias love="/Applications/love.app/Contents/MacOS/love"
Artık love'yi Linux ve Windows'taki gibi komut satırından çağırabilirsiniz:
love ~/dosya/yolu/oyunum
Eğer bu işe yaramıyorsa .zshrc dosyasını şu şekilde yenilemeli:
source ~/.zshrc
ve yeniden denemelisiniz.
Android
Android için LÖVE APK'sını resmî siteden yüklemiş olduğunuz sürece aşağıdaki yöntemler çalışacaktır:
- Oyun klasörünüzü
/sdcard/Android/data/org.love2d.android/files/games/lovegame
dizinine taşıyın (Android Pie ve daha öncekilerde/sdcard/lovegame
de çalışır).main.lua
'un/sdcard/Android/data/org.love2d.android/files/games/loveoyunu/main.lua
konumunda bulunduğundan emin olun. Android 11 ve öncekilerde bu dizinler yalnızca bilgisayardan MTP aracılığıyla erişilebilir. Ardından Android için LÖVE'yi çalıştırın.
- Oyununuzun .love dosyasını cihazınıza indirin/taşıyın ve dosyaya tıklayın. Bazı dosya yöneticileri .love'yi Android için LÖVE kullanarak çalıştıracak. Eğer çalıştırmazsa ES File Explorer'ı kurabilirsiniz. Eğer Dropbox kullanıyorsanız .love dosyalarını açmak için onu kullanabilirsiniz. Eğer işe yaramazsa LÖVE Loader'ı kullanarak .love dosyasını seçebilirsiniz.
If you have more questions, consider reading Android-specific FAQ. If your question is not listed, then feel free to ask in the forums or the Discord.
iOS
In order to run LÖVE for iOS, it must first be compiled and installed. To do that, you’ll need macOS, Xcode 7 or newer, and the LÖVE for iOS source code downloadable from the home page.
- If the
libraries
folder isn't present in thelove/platform/xcode/ios
folder, download the iOS libraries from the homepage, and place theiOS/libraries
folder from the zip there. They contain the third-party library dependencies used by LÖVE.
- Open the Xcode project found at
love/platform/xcode/love.xcodeproj
and select thelove-ios
target in the dropdown menu at the top of the window.
- You may want to change the Build Configuration from Debug to Release for better performance, by opening the "Edit Scheme..." menu from the same dropdown selection.
- Choose either an iOS Simulator device or your plugged-in iOS device in the dropdown selection to the right of the previous one, and click the Build-and-Run ▶︎ button to the left, which will install LÖVE on the target device after compiling it.
LÖVE on iOS includes a simple list interface of games that are installed (until you fuse a .love to it for distribution.)
- To put a .love file on the iOS Simulator after LÖVE is installed, drag the file onto the iOS Simulator’s window while it’s open. LÖVE will launch if it’s not running already. If another game is currently active you may need to quit LÖVE for the new game to show up (press Shift-Command-H twice to open the App Switcher menu on the iOS Simulator.)
- To put a .love file or game folder on your iOS device after LÖVE is installed, you can either download it with the Safari, or transfer it from your computer through iTunes when your device is connected: open iTunes, go to the iOS device which has LÖVE installed, go to the ‘Apps’ section and scroll down and find LÖVE, and add the .love file or game folder to LÖVE’s Documents section. On more recent iOS and Mac versions, you can use Airdrop to transfer your .love file from your Mac to where LÖVE is installed.
See the Game Distribution page for creating Fused LÖVE games on iOS and distributing them.
Note: for those interested in creating a LÖVE game directly on iOS, the Textastic app (available on the Apple App Store for purchase) can utilize SublimeText's packages-- one of which is a LÖVE package. You can follow these instructions to load that LÖVE package into the Textastic app on your iOS device to author LÖVE code directly on your iOS device. You'll then need to follow the earlier instructions on how to zip up that code into a .love file but then can either export that .love file to a LÖVE app running on your iOS device or an external device running a LÖVE application.
Instructions:
- Purchase the iOS Textastic app on the App Store
- Create a folder in Textastic (while inside the Textastic app "Local Files" section or in the iOS Files app under the Textastic folder) called "#Textastic"
- go to https://github.com/szensk/subllualove in Safari on your iPad
- tap the green "Code" button and select "Download ZIP"
- Unzip the file in the Files app. This will create a folder called "subllualove-master"
- Move or copy that folder into the folder "On my iPad/Textastic/#Textastic/". This is equivalent to this folder in Textastic: "Local Files/#Textastic/".
- In Textastic, go to Settings (gear wheel on the bottom left portion of the app) -> Other and tap "Reload Customizations"
- In File Properties (document looking icon on top right portion of the app) -> Syntax Definition, there is now a new item "LOVE (*.lua)" that you can select after opening a .lua file.
If you have any questions on this process, please contact the Textastic developer (very responsive by email support)
Next steps
- Tutorial:Callback_Functions will teach you the basic structure of a love game.
- Category:Tutorials are the next piece of reading.
- Wiki The LÖVE wiki.
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info