FBA The Creator
http://www.fbacreator.com/fbaforum/

tsr support
http://www.fbacreator.com/fbaforum/viewtopic.php?f=3&t=148
Page 1 of 1

Author:  barabanus [ Sat Feb 28, 2009 5:06 pm ]
Post subject:  tsr support

I'm going to create a windows mobile runner for interactive fiction games implementing the following algorithm:

1. creating local tcp server
2. waiting for incoming connections on port 1111
3. running "iexplorer" (or any browser) with "http://localhost:1111"
4. executing http requests of a browser

Would it be possible with future FBA Creator? I think it needs some features implemented:

- tsr profile of a project
- onmainloop() that would be called with lost focus
- return-to-os() function
- switch-task-button support
- sleep() function

The program below gave expected "Hello, world!" page to iexplorer, but it required many operations: switching to today screen (switch-task-button didn't work, I used special *cheat* key =), running iexplorer with "http://localhost:1111", switching back to fba, clicking on fba to close it.

Code:
local socket = require("socket")

local localhost = socket.tcp()
localhost:bind("*", 1111)
localhost:settimeout(1)
localhost:listen(1)

local client

local http = [[
HTTP/1.1 200 OK
Content-type: text/html
Content-length: %d

%s]]

local msg = [[
<html>
<head>
<title>Hello, world!</title>
</head>
<body>
<big>Hello, world!</big>
</body>
</html>
]]

function onmainloop()   
               
        local list = socket.select( { localhost }, { }, 0 )
        if #list == 1 then
                client = localhost:accept()
        end

        if client then
                list = socket.select( { client }, { }, 0 )
                if #list == 1 then
                        client:send (http:format(#msg, msg))
                        client:close()
                        client = nil
                end
        end       
       
        if (mousedown() > 0) then
                quit()
        end
end

Author:  evilmaio [ Sat Feb 28, 2009 7:18 pm ]
Post subject:  Re: tsr support

Well actually FBA apps/games are designed to run at fullscreen,
so I could exclude tsr features to be implemented directly in FBA ;)
For these programs, evc++ is better choise (faster and lighter).

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/