Results 1 to 8 of 8

Thread: Game Demo

  1. #1

    Game Demo

    When I picked up Delphi 2 many many years ago my main goal was to program games. Purely as a hobby as I never intended to program for a living.

    For many years I made games using DelphiX and later DanJetX and OmegaDX9. Smart Mobile Studio represents an awesome opportunity to create games and animated graphics for browsers, tablets and phones.

    When I decide to make a game is SMS I ran into a few hurdles. So I put together a game demo that solves a number of the challenges that I had.

    I have a full report written up here http://forums.smartmobilestudio.com/...4399-game-demo

    However, if you are just wanting to have a quick look then here is live link

    http://numberworksnwords.com/cloud/temp/www/index.html
    The views expressed on this programme are bloody good ones. - Fred Dagg

  2. #2
    PGDCE Developer de_jean_7777's Avatar
    Join Date
    Nov 2006
    Location
    Bosnia and Herzegovina (Herzegovina)
    Posts
    243
    - Ran it and there is an issue in Firefox that don't exist in Chrome. There seems to be an invisible wall around the player controlled object and I can't move or shoot farther than it.
    - There are only two enemies altogether, but I guess this is by design.
    In defeat we learn.

  3. #3
    HI De Jean, I was not able to replicate the problem in Firefox - to be certain I updated the build version and made a few other changes - like ship facing down at the start so that I know I am looking at the new application.
    All seems to work as expected in chrome and firefox.

    The two enemies are hardly enemies they just fly off at an angle - the game demo was purely to have a go at Smart Mobile Studio and see if I can use it to make games - and I can. I have made a couple since this demo - they are both not quite finished but I am loving working with SMS. The familiarity of Pascal with some awesome new features and also the power of css and the canvas. I would highly recommend checking it out.
    The views expressed on this programme are bloody good ones. - Fred Dagg

  4. #4
    PGDCE Developer de_jean_7777's Avatar
    Join Date
    Nov 2006
    Location
    Bosnia and Herzegovina (Herzegovina)
    Posts
    243
    At my work PC it works properly in Firefox. I'll be sure to check out SMS.
    In defeat we learn.

  5. #5
    Just tested it out and I experienced the same problem of invisible borders being very close to starting position (not the whole window) same as de_jean_7777 reported. I'm using Google Chrome. But when I refreshed the web page using F5 key the invisible borders disappeared and I could move across the entire window.

    After some further testing I noticed that I if I open your link using right click and "Open in new tab" I always end up with invisible borders. But if I open your link normally with left click (still opens a new tab for me) there aren't any invisible borders present.
    So I'm assuming that when you open some link in new tab Chrome actually does some re sizing of web window area which then results in smaller game area being set as the web window dimensions are retrieved to quickly.

  6. #6
    Thanks for the feedback

    I think it has to do with the resizing and when that takes place. I will see about fixing the demo.
    The views expressed on this programme are bloody good ones. - Fred Dagg

  7. #7
    PGD Staff / News Reporter phibermon's Avatar
    Join Date
    Sep 2009
    Location
    England
    Posts
    524
    Resizing and window dimensions can be handled well across all the main browsers but it's my understanding that it still requires some javascript stub code in order to have predictable/repeatable behaviour across most browsers.

    SMS I assume generates Javascript from pascal code - I'm also assuming that it has at least a rudimentary, static Javascript API - an ideal fix might come from altering the javascript API rather than coding around it in the pre-translation pascal code.

    for a simple solution, you may want to run a timer that fires every second or so that manually queries and compares the screen dimensions. This way if they're not updated correctly in the normal chain of events on a given browser - it will 'correct' a moment later - this technique is evident on many sites that have elements that seem to be delayed in their re-positioning after a resize.

    It's not problematically ideal - but it works - if you delay initial rendering (just black out the window) for a couple of seconds on load - then any 'ugly' snapping of dimensions will be hidden.
    When the moon hits your eye like a big pizza pie - that's an extinction level impact event.

  8. #8
    The bug was my mistake not SMS. I set the width initially when the form object hadn't been finalized yet. I have moved on. I am converting some of our software to see what works and what is challenging.

    Here is a conversion of a game I wrote in 2001 - I have updated it with some newer graphics. The gameplay still needs a bit of tweaking. Typically our games are designed to be completed in about 60-70 seconds.

    http://numberworksnwords.com/cloud/j...aos/index.html
    The views expressed on this programme are bloody good ones. - Fred Dagg

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
  •  
Comodo SSL