can do

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
2dmk
Prole
Posts: 19
Joined: Fri Aug 11, 2017 12:25 am

can do

Post by 2dmk »

For example, I did game in windows.But I want to send to iphone.Can do? Game that was made in windows ,which can directly send to iphone to play? Or only ios system can do it?
Thanks.
User avatar
HDPLocust
Citizen
Posts: 65
Joined: Thu Feb 19, 2015 10:56 pm
Location: Swamp
Contact:

Re: can do

Post by HDPLocust »

You can create game-loader.
Like redefined 'require' function, for loading lua-scripts from web-server, images and other sources etc. And open web-serwer with you'r love sources.

Or write something like ftp/smb on lua, and 'mount' network directory with sources.

Of course, main.lua can looks like this:

Code: Select all

local oldreq = require

function require(file) -- web loader
    local url = 'www.myweb.com/mygamesources/'
    local http = oldreq 'socket.http'
    local source = http.request(url..(file):gsub('.', '/')..'.lua')
    local f = loadstring(source)
    return f()
end
-- 

function love.load()
   game = require'engine.core' -- 'create request to www.myweb.com/mygamesources/engine/core.lua' and load it as code
   game:load() -- if core returns object, of course
end

Science and violence
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 169 guests