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

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

    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.



    Below are a couple videos captured in the Android emulator.

    Very very first version:


    Some sprites later:

  2. #2
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    Neat.

    I was wondering when someone was going to make a game with OP4JS. Are you planning something bigger for the next game project?

    I don't dare say 3D.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  3. #3
    Currently I'm planning to mostly add to it, things like achievements, global high-scores, more levels, etc. to test the tech.

    Maybe make other small games, I've noticed I tend to get swamped by the need for art in larger projects (sprites, textures, models, music...), placeholders graphics only go so far, and I'm just not time-efficient at doing any kind of art myself, quick PaintShop hacks are okay, but anything more complex and I'm doomed ;-)

    3D may or may not be too far removed, it'll depend on how fast the W3C settles on a 3D standard (be it WebGL or something else).

  4. #4
    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.

  5. #5
    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.

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

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
  •