Results 1 to 8 of 8

Thread: Delphi's "Meteors" sample running in Chrome

  1. #1

    Delphi's "Meteors" sample running in Chrome



    Just for the fun of it I adapted the "Meteors" Delphi sample to SmartMobileStudio, compiled to JavaScript, ran it in Chrome.

    Code changes are quite limited:
    - changed TCanvas methods to TW3Canvas
    - dropped the FreeAndNils
    - changed Point() to w3_Point()
    - declared TSize record
    - change Random() to RandomInt()

    That was about it. Not playable just yet (bug with the keyboard events), but otherwise it's alive!

    Anybody knows who originally wrote that game? I would like to know about licensing issues before posting anything online.

    PS: 19 FPS is the fixed frame-rate for DMeteors, in Delphi it's enforced by a timer, and the game code doesn't have any provision for variable frame-rate
    Attached Images Attached Images

  2. #2
    Taking a break from PGD Challenge, I've revisited the thing, added some centering and clipping, but otherwise left everything untouched.

    Try it there: Delphi Meteors running Web-side

    Controls are unchanged: arrow keys to accelerate & turn, space bar to fire.

  3. #3
    Senior Member de_jean_7777's Avatar
    Join Date
    Nov 2006
    Location
    Bosnia and Herzegovina (Herzegovina)
    Posts
    186
    Tried it in Firefox and Chrome, works. I'm not sure if the original Delphi sample behaves the same, but the acceleration of the ship is too high, unlike the original Asteroids.

  4. #4
    It runs here on my shiny new iPad (3rd generation) but I can't move or fire of course as I guess you have not implemented the touch routines

  5. #5
    Quote Originally Posted by de_jean_7777 View Post
    Tried it in Firefox and Chrome, works. I'm not sure if the original Delphi sample behaves the same, but the acceleration of the ship is too high, unlike the original Asteroids.
    The Delphi version is rather unplayable too, and even has more asteroids, so it's usually insta-death as you often spawn right on top of a meteor....

    It runs here on my shiny new iPad (3rd generation)
    I might revisit it for the iPad as an experiment on implementing multi-touch left hand/right hand controls (mimicking a gamepad, like many games seem to do)

    That said http://bit.ly/nickeliron and http://bit.ly/wartrail should run just fine on your new iPad, they're both Object Pascal compiled to JS/HTML5 (but they ain't retina-ready, I have only an iPad 2 )

    Nickel-Iron was my first attempt, I'll probably revisit it with the things I've learned doing WarTrail, to add more visual effects, leader-boards & such. Once that's done, I'll probably have experimented and have enough existing code to wrap everything into a Pascal mini-gamedev library for HTML5.
    Last edited by Eric; 24-04-2012 at 09:57 AM.

  6. #6
    I tried it in IE9. It works. I also do have to complain about to fast acceleration.
    Also I noticed that asteroids move only trough the middle part of the gamefield and not on sides. So you can just move on one side and stay there forever.

  7. #7
    They can even be motionless if you're lucky: the Delphi code doesn't have a minimal or even a set speed for them, every time you refresh (or restart in the Delphi version), they get a new random speed.

  8. #8
    I gues you are correct.

Posting Permissions

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