Difference between revisions of "Getting Started (Romanian)"

(Linux)
Line 51: Line 51:
 
===Linux===
 
===Linux===
  
On Linux, you can use one of these command lines:
+
Pe Linux, poți folosi una din următoarele linii de comandă:
  
 
<source lang="bash">
 
<source lang="bash">
love /home/path/to/gamedir/
+
love /home/cale/către/director-joc/
love /home/path/to/packagedgame.love
+
love /home/cale/către/joc-împachetat.love
 
</source>
 
</source>
  
If you installed LÖVE system-wide, you can double click on .love files in your file manager as well.
+
Dacă ai instalat LÖVE la nivel de sistem, poți și să dai dublu-click pe fișierele .love din managerul de fișiere.
  
 
----
 
----
 +
 
=== Mac OS X ===
 
=== Mac OS X ===
  

Revision as of 14:10, 25 June 2017

Obținerea LÖVE

Descarcă ultima versiune a framework-ului LÖVE de pe site, și instaleaz-o. Dacă ești pe Windows și nu vrei să „instalezi” LÖVE, poți pur și simplu să descarci executabilele arhivate și să le dezarhivezi oriunde vrei.

Pentru a afla ce versiune LÖVE este instalată, rulează următoarea comandă:

love --version

Crearea unui Joc

Pentru a crea un joc simplu, crează un director oriunde, și deschide editorul tău de text preferat. Sublime Text este unul destul de bun pentru toate sistemele de operare, și are suport integrat pentru Lua. Crează un nou fișier în directorul pe care l-ai creat și numește-l main.lua. Pune următorul cod în fișier și salvează-l.

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

Rularea Jocurilor

LÖVE poate porni un joc în două feluri:

  • Dintr-un director care conține un fișier main.lua.
  • Dintr-un fișier fișier .love care are un fișier main.lua în directorul rădăcină

Pentru a crea fișiere .love vezi Distribuirea Jocurilor.


Windows

ZeroBrane Studio, Sublime Text 2, Notepad++, și SciTE permit rularea jocurilor dinăuntrul editoarelor lor.

Altfel, cea mai ușoară cale de a rula jocul este să trasați directorul pe love.exe sau o scurtătură a lui love.exe. Țineți minte să trasați directorul care conține fișierul main.lua și nu fișierul main.lua în sine.

Poți să rulezi jocul și din linia de comandă:

"C:\Program Files\LOVE\love.exe" "C:\games\mygame"
"C:\Program Files\LOVE\love.exe" "C:\games\joc-împachetat.love"

Poți crea și o scurtătură pentru asta; crează o simplă scurtătură către love.exe, click stânga pe ea și selectează „Proprietăți”(Properties), iar apoi pune linia de comandă pe care o vrei în câmpul „Țintă”(Target) pentru scurtătură.

Pe Windows, există o opțiune a liniei de comandă care va atașa o consolă ferestrei, ceea ce îți permite să vezi rezultatele apelurilor print (echivalent cu setarea t.console=true în conf.lua):

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

Linux

Pe Linux, poți folosi una din următoarele linii de comandă:

love /home/cale/către/director-joc/
love /home/cale/către/joc-împachetat.love

Dacă ai instalat LÖVE la nivel de sistem, poți și să dai dublu-click pe fișierele .love din managerul de fișiere.


Mac OS X

On Mac OS X, a folder or .love file can be dropped onto the love application bundle. On the Mac Terminal (command line), you can use love like this (assuming it's installed to the Applications directory):

open -n -a love "~/path/to/mygame"

However, the above method will not output printed text to the terminal window. To do that, you will need to execute the love binary inside the application bundle directly:

/Applications/love.app/Contents/MacOS/love ~/path/to/mygame

You can set up an alias in your Terminal session to call the binary when you use love by adding an alias to your ~/.bash_profile.

Open the file with

open -a TextEdit ~/.bash_profile

You may have to run

touch ~/.bash_profile

first if the file does not yet exist.

Then paste in the following code and save the file:

# alias to love
alias love="/Applications/love.app/Contents/MacOS/love"

Now you can call love from the command line like Linux and Windows:

love ~/path/to/mygame

Android

As long as you have the love app installed from the playstore or another source the following methods will work:

  • Method 1 Transfer your game folder to /sdcard/lovegame where main.lua is found at /sdcard/lovegame/main.lua. Then run the app.
  • Method 2 Transfer a .love of your game to the device and click on it. Most file explorers will run the .love using the love app. If it does not you can install ES File Explorer which will. If you use Dropbox, you can use that to open .love files.



iOS

In order to run LÖVE for iOS, it must first be compiled and installed. To do that, you’ll need Mac OS X, Xcode 7 or newer, and the LÖVE for iOS source code downloadable from the home page.

  • If the include and libraries folders are not present in the love/platform/xcode/ios folder, download them and place them 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 the love-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.

See the Game Distribution page for creating Fused LÖVE games on iOS and distributing them.

Next steps

Other Languages