Pages

Se afișează postările cu eticheta lua. Afișați toate postările
Se afișează postările cu eticheta lua. Afișați toate postările

duminică, 10 decembrie 2017

The Roblox game with lua scripting .

The Roblox game is a massively is a multiplayer online game.
This game platform that allows users to design their own games and play a wide variety of different types of games created by the developer or other users.
The programming issues for this game can be solved with lua scripting language.
In this tutorial I will show you how to start programming this game.
First yo need to install the game, make one account and take from web the Studio.
This allow you to make game and changes into your account .
You can start with your place or create a new place .
The Roblox Studio use Workspace with many objects like: bricks , materials, etc.
The next image show you how to select command Bar (1) and Output (2) windows for testing lua commands and see the outputs of this commands from VIEW menu:

Into the next image you can see how I used the lua scripting to print to output:

Use the blue cross from Explorer to add your lua script to the object or part of object:

When all of your changes are done then you can publish to Roblox from File menu.
I preferred not to introduce a classic example script because you can do a lot of useful scripts in the roblox game: effects, automation, animations, music and video, character creation and objects, scripts for online.
You can learn more about this issue if you take a look at this official roblox channel for scripting.

vineri, 17 noiembrie 2017

Love2d - the most simple game engine with Lua programming language .

The development team tell us about this software:
Hi there! LÖVE is an *awesome* framework you can use to make 2D games in Lua. It's free, open-source, and works on Windows, Mac OS X, Linux, Android and iOS.
Even if they say it is a framework, most of them who use it already consider it a game engine. You can download it and read about this game engine on the official website After download you need to create a project folder and put the lua scripts for love .
I named this folder test.
I add to this folder one transparent image from internet with the filename: oldpaper.png, see next image:

I create a file named main.lua and I add this lua script:
local imageFile

function love.load()

    imageFile = love.graphics.newImage("oldpaper.png")
end

function love.grid_text()
local gx = 0 
local gy = 0
local g = 0
 while g ~= 100 do
    love.graphics.line( gx, 0, gx, 10)
    love.graphics.setColor( 111, 255, 255 )
    love.graphics.line( 0, gy, 10, gy)
    love.graphics.setColor( 111, 255, 255)
    gx=gx+50 
    gy=gy+50 
    g=g+1
 end
    love.graphics.setColor( 16, 5, 255)
    love.graphics.print("Hello world ! Lua and Love 2D for games !", 290,400)
    love.graphics.setColor(0, 0, 0)
end

function love.draw()
    love.graphics.setBackgroundColor(0, 0, 0)
    love.grid_text()
 -- this displays the normally colored image
    love.graphics.setColor(255, 255, 255, 255)
    love.graphics.draw(imageFile,250,100)
end

Run it outside of test folder with:
 love.exe test
The result of this code is this screenshot.

miercuri, 5 octombrie 2016

Defold Engine with editor and lua scripting.

The new game engine come from Defold Engine and was released 31. May 2016.

The Defold is a cross platform 2D focused Lua powered game engine created by King and available for free. If you want to learn Lua programming language or you know this programming language, then is great.
About Lua:  is a powerful, efficient, lightweight, embeddable scripting language. It supports procedural programming, object-oriented programming, functional programming, data-driven programming, and data description.
This game engine brings improved editor performance on OSX, Windows, Linux 32 and 64 with  GUI layer counts. It's working with your google account.
You can also have online tutorials.
This improved account management options, including the ability to delete your account if required. You can see the official playlist with some video tutorials: