PDA

View Full Version : Pascal for webbrowsers and/or mobile devices



Ñuño Martínez
23-10-2011, 11:29 AM
Yesterday somebody asked me about to create games for webbrowsers and mobile devices.

I know that FreePascal can build iOS executables, but this wouldn't be enough. If I remember correctly, there is a compiler that translates Pascal programs to Adobe Action Script/Flash. Also I know there are a FPC fork that builds web applications using JavaScript. The problem is that I forgot the names. Also I don't know how much compatible they are. :(

Do you know about compilers, packages and/or engines that allow to use Pascal to create games for webbrowers and/or mobile devices?

chronozphere
23-10-2011, 01:34 PM
Perhaps Cooper can be used to create JAVA Applets? ;)

Stoney
23-10-2011, 02:44 PM
If you don't mind setting up your own server, you can use Morfik (http://www.morfik.com/) or ExtPascal (http://code.google.com/p/extpascal/) for example. Or you can start from scratch and make a FreePascal CGI application using fpweb (http://wiki.freepascal.org/fcl-web) or somthing similar.

The compiler compiling Pascal to Flash is called FlashPascal (http://flashpascal.sourceforge.net/), but it is quite alpha, hasn't been update in a while and therefore doesn't use any of the new features.

There is a quite interesting piece of software in the works called OP4JS (which basically translates Object Pascal code to JavaScript): http://op4js.optimalesystemer.no/

SilverWarior
23-10-2011, 08:07 PM
Another way would be to use special purpose components like IntraWeb http://www.atozed.com/intraweb/index.en.aspx
The main disadvantage of IntraWeb component suite is heavy dependancy with Indy component suite wich both have support only for Delphi but not for Free Pascal. Those who onws Delphi 7 or later are in luck, becouse IntraWeb components are shiped with Delphi as a bundeled third party components.
While older versions of IntraWeb have quite limited capability they could still be used for making of some simple browser games like Travian, Ikariam, and similar. New versions do have some more advanced fetures, but they still won't offer a game programer much more to use as theese components are oriented more to buisniess appliacations.
Another drawback is that web applications built with IntraWeb requres ISS server or atleast server with ISS support. And jet another drawback is so caled "Application mode" wich prevents of using a "Back button" like in normal web pages.

Daikrys
23-10-2011, 09:59 PM
hmm maybe you should take a html5 solution and wrap the stuff with PhoneGap (http://www.phonegap.com/start) to an native app

like morfik or extpascal + phonegap? oO

cairnswm
24-10-2011, 11:39 AM
What about midletPascal?

Ñuño Martínez
24-10-2011, 06:24 PM
Thank you all. :)


The compiler compiling Pascal to Flash is called FlashPascal (http://flashpascal.sourceforge.net/), but it is quite alpha, hasn't been update in a while and therefore doesn't use any of the new features. This is what I was talking about. I've seen that latest version is from April, so it isn't dead. And yes, it laks a lot of things, mostly the RTL and the fact that it "supports" until Flash8, but may be we can use it.


There is a quite interesting piece of software in the works called OP4JS (which basically translates Object Pascal code to JavaScript): http://op4js.optimalesystemer.no/ This would be useful if finally we use HTML5. :)


Another way would be to use special purpose components like IntraWeb http://www.atozed.com/intraweb/index.en.aspx (...) Useful for on-line play? The idea they have is more action games (shooters, platform, etc).


hmm maybe you should take a html5 solution and wrap the stuff with PhoneGap (http://www.phonegap.com/start) to an native app

like morfik or extpascal + phonegap? oO We talk about HTML5, but I think we will not use it now. May be in the future.


What about midletPascal? Yes, this is also what I was looking for.


Perhaps Cooper can be used to create JAVA Applets? ;) This will work on mobile?

I see we need to talk more about the project and the target, as we can use Java or flash.

WILL
25-10-2011, 12:10 AM
This will work on mobile?

I see we need to talk more about the project and the target, as we can use Java or flash.

See the thread I made about Oxygene... here (http://www.pascalgamedevelopment.com/showthread.php?11489-Article-Enter-the-Oxygene-Programming-Language&p=68508&viewfull=1#post68508). Has a couple of cool videos showing how Jim McKeeth creates/compiles a project for Android and Windows Phone 7 using Cooper(Java) and Prism(.NET) Both based off of RemObjects' Oxygene compiler engine.

cairnswm
25-10-2011, 11:11 AM
Yes, this is also what I was looking for.


I have just downloaded the newest MidletPascal as I want to create an android front end to an online (php) game I am working on. I am probably quite a long way away from really saying if it will work or not. Also my front end wont have heavy graphics requirements so might not really answer your questions.

Ñuño Martínez
30-10-2011, 07:02 PM
I have just downloaded the newest MidletPascal as I want to create an android front end to an online (php) game I am working on. I am probably quite a long way away from really saying if it will work or not. Also my front end wont have heavy graphics requirements so might not really answer your questions. Doh... :/

BTW I was playing with Flash Pascal. Yes, it's very unfinished but there are a lot of things that can be done.