On Sun, 7 Jan 2018, Ingemar Ragnemalm wrote:
An update on my tests with pas2js:
I have overcome most problems now and am quite a bit happier with what I
see - and what I did see before was good!
Reimar Grabowski asked for interactivity. Done!
Myself, I wanted to reduce the amount of information, like file
references in the HTML file, because, yes, it does matter! And I wanted
to load sounds, and of course I, too, wanted interactivity! Done! Adding
missing methods, interfacing to more APIs (like audio), no problem! It
was surprisingly easy.
Here is an updated version of the Santa animation:
http://ragnemalm.se/images/santa/santa2.html
and here is an (almost) fully working snake game:
http://ragnemalm.se/images/santa/snake/snake.html
Nice :)
I really enjoyed making these! My code gets more and more comfortable,
there is no problem hiding the JS libraries. Will I do that in the long
run? Well, I don't know but doing that can help me making the code portable.
I also made some minor additions to Lightweight IDE, so now I edit,
compile and run directly from the IDE. "Run" passes the HTML to a web
browser.
Lazarus already has this too.
I have implemented a different way to run animations, but still don't
know if it flickers on other platforms. On my Mac, there is no flicker
at all.
For gaming and similar purposes, all I miss now is the ability to save
scores on file. For a wider range of applications, I want the ability to
download data to my local drive. I havn't considered the case of
communicating directly with some server.
For being a preliminary "0." version, pas2js works wonderfully well!
Yes, the codebase that compiles with it is very large.
We're hoping to have it self-compiling someday.
Michael.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal