Results 1 to 10 of 37

Thread: Nickel Iron / HTML5 game written in... Object Pascal!

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Quote Originally Posted by Eric View Post
    My small pet/test game project of an HTML5 / Canvas game written in Object Pascal

    It is built with OP4JS (currently in Alpha), which is using DWScript as compiler to generate JavaScript from a Object Pascal source code (so you get strong typing, compile-time syntax checks, virtual methods, etc.)
    The output runs in iPad, iPhone, Android 2.3+, Chrome, etc.
    Great job.

    So you wrote the program in Object Pascal and translated it to JavaScript... But DWScript website says it's a "scripting engine for Delphi". Does it do the translation? Does it work on Linux? Does it work on WineHQ?
    Last edited by Ñuño Martínez; 26-01-2012 at 01:26 PM.
    No signature provided yet.

  2. #2
    Quote Originally Posted by ?ëu?±o Mart??nez View Post
    But DWScript website says it's a "scripting engine for Delphi". Does it do the translation?
    It also says "Scripts can be executed from Delphi applications [...] or compiled into JavaScript that can be run client-side in a browser or any Javascript-capable engine"
    So yes, it takes Object Pascal source, and spits out JavaScript.
    Does it work on Linux? Does it work on WineHQ?
    The JavaScript runs as long as you have a compatible web browser, anything not too ancient should be okay. For game stuff you need at least Canvas support, and the game is primarily tested/profiled for WebKit-based browser, ie. iOS, Android, Chrome & Safari.
    FireFox, IE9 & Opera are okay except for some graphical glitches on the menu buttons (they aren't done in Canvas, but in HTML, and lack some specific CSS).

    As for the compiler, at the latest news, DWScript compiles under FreePascal, but execution is problematic due to bugs in the FreePascal compiler/runtime wrt to Variants & Unicode Strings.

  3. #3
    Sorry, I read it too fast... I'll try to use the compiler in WineHQ.
    No signature provided yet.

  4. #4
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    Have you updated your OP4JS source to Smart Mobile Studio yet? Or does it need much updating at this point?
    Jason McMillen
    Pascal Game Development
    Co-Founder





  5. #5
    Wow, I didn't even know that this was feasible to do. I'm very curious about some benchmarks, that show the quality of the compiler. It would be a shame if the pascal version would be significantly slower.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  6. #6
    I thought this game was on the android market now, but I can't find it!

  7. #7
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    Quote Originally Posted by paul_nicholls View Post
    I thought this game was on the android market now, but I can't find it!
    That depends on how it's packaged for distribution. I'm assuming that the tool developers will be leaving it open for maximum flexability for the individual developers to decide; strapped on JavaScript run-time engine, pages to be loaded on a web server and so on...

    The end result would be 100% web compatible so I think that the end product's form will depend on those that use it to make HTML5 apps and games.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  8. #8
    Quote Originally Posted by paul_nicholls View Post
    I thought this game was on the android market now, but I can't find it!
    Not yet, I'm still adding stuff, and cleaning up the Java wrapper.
    There is not much Java (less than 50 lines, including blanks & lines with only a squigly), but I've been tweaking the Android WebView option. PhoneGap doesn't really cut it for a game on Android, due to bugs in the Android 2.x browsers: things like scrolling & pinch-to-zoom can only be disabled on the Java side (for iOS, the viewport meta works perfectly AFAICT).

    Performance is more complicated as there is a wild variety of devices, it runs at 30FPS on my HTC Desire, but I've add some issues on older phones and tablets (apparently some Android tablets don't have the hardware acceleration enabled). And need to find time to package the app (make the icon, marketplace graphics, etc.).

    But it's coming

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •