Smart Mobile Studio
  • News
  • Forums
  • Download
  • Store
  • Showcases
    • Featured demos
    • The Smart Contest 2013, Round 1 – Graphics
  • Documentation
    • Get the book
    • System requirements
    • Prerequisites
    • Getting started
      • Introduction
      • Application architecture
      • The application object
      • Forms and navigation
      • Message dialogs
      • Themes and styles
    • Project types
      • Visual project
      • Game project
      • Console project
    • Layout manager
    • Networking
      • TW3HttpRequest
      • TW3JSONP
      • Loading files
  • About

Console and gaming applications under OP4JS

Posted on 10.11.2011 by Jon Lennart Posted in Developers log 5 Comments
A simple console app

A simple console app

OP4JS is getting near to completion for each day that passes. We are currently implementing the final project types which are: console and gaming. Yes you read right – console.

Console

A console application under OP4JS is basically a visual project, but where an instance of TW3Console occupies the majority of the screen. It is meant for testing purposes (for now) where you want a quick and easy project type just to test out theories and play around with routines that doesn’t require forms.

We do have more plans for the console in future versions of OP4JS:

  • Command registration (think TActions but with params)
  • Built in REST command for testing http services
  • Pipe output to email

At present the console application supports WriteLn() which outputs both to the screen and to the actual console javascript object. This is handy because it means you can use XCode to see the output “live” if you want to (or any other remote debugger).

Gaming

The generic gaming project type is very simple, basically it puts safari mobile into full-screen, plasters a canvas in the view-port and uses a high-speed timer to force maximum redraw-rate. It is up to you to load in pictures and draw them using the methods in the canvas object.

Since i have coded a lot of 2d platform games earlier, you can expect to see a game library coming out as soon as the product has shipped. In fact it’s one of the things i’m eagerly looking forward to working on.

 

Console HTTP Log OP4JS REST
« Hardware accelerated webkit animations
Asm sections? You betcha! »

5 thoughts on “Console and gaming applications under OP4JS”

  1. avra says:
    11.11.2011 at 08:21

    Is this going to cover just iOS or multiplatform? What about Android and latest Windows Mobile? What about Windows Vista/7 Desktop Widgets? If it is going to be multiplatform, can we target different platforms from the same project? What about database support? Local mobile device database, remote server database, ability to sync local with remote? Implemented in first public version, some version in the future, or no intention to implement it? What I saw so far looks nice, but it would be nice to get answers to these questions to have more clear picture about OP4JS.

    • Jon Lennart Aasenden says:
      11.11.2011 at 17:24

      Well we have to start somewhere:

      1. Our first release is webkit only, with focus on iOS (iphone etc) but compatible with Android.

      2. Second release will target Android more clearly, with custom controls that have pure android look & feel

      As for the rest, YES.
      The first release will not have a database framework, but that is scheduled for SP1.

      Most of what you are asking about is actually quite simple. The hard stuff is writing the RTL and IDE (which is growing better for each day).

      We have no plans for Internet explorer support but focus on mobile exclusively. Although windows widgets might be supported if it catches on.

  2. A. Bouchez says:
    11.11.2011 at 11:46

    What about the input of the console?
    Is there some basic ReadLn() support?
    This would be very interesting for debugging purpose.
    But perhaps a simple GUI with buttons will do it better…

    • Jon Lennart Aasenden says:
      11.11.2011 at 17:26

      Examples for readLn() is included 🙂

  3. Jon Lennart Aasenden says:
    11.11.2011 at 17:32

    Regarding ReadLn();
    On iOS (and android) there is no concurrent way of invoking the keyboard. So what you do is to create an edit-box on the fly (when someone clicks Execute or some other input source):

    FEdit:=TW3EditBox.Create(Screen);
    FEdit.OnChange:=HandleChange;

    And then you dispose of the edit box (hiding the keyboard) again when you are done:

    Procedure TMyApplication.HandleChange(Sender:TObject);
    Begin
    FReadtext:=TW3EditBox(Sender).text;
    TW3EditBox(sender).free;
    ExecuteCommand(FReadText);
    end;

    You have pretty much the same freedom here as you would have under Delphi. All visual objects decend from TCustomControl (or TGraphicControl if they are rendered) – and you can add objects, remove them, change parent etc. just like you do in Delphi.

    The project types are just there to help you get started. In theory you can create whatever you like.

Comments are closed.

Pages

  • About
  • Feature Matrix
  • Forums
  • News
  • Release History
  • Download
  • Showcases
    • The Smart Contest 2013, Round 1 – Graphics
  • Store
  • Documentation
    • Creating your own controls
    • Debugging, exceptions and error handling
    • Differences between Delphi and Smart
    • Get the book
    • Getting started
      • Introduction
      • Local storage, session storage and global storage
      • Application architecture
      • The application object
      • Forms and navigation
      • Message dialogs
      • pmSmart Box Model
      • Themes and styles
    • Layout manager
    • Networking
      • Loading files
      • TW3HttpRequest
      • TW3JSONP
    • Prerequisites
    • Real data, talking to sqLite
    • System requirements
    • Project types
      • Visual project
      • Game project
      • Console project

Archives

  • December 2019
  • December 2018
  • November 2018
  • July 2018
  • June 2018
  • February 2018
  • September 2017
  • April 2017
  • November 2016
  • October 2016
  • September 2016
  • April 2016
  • March 2016
  • January 2016
  • October 2015
  • September 2015
  • July 2015
  • April 2015
  • January 2015
  • December 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • March 2014
  • February 2014
  • January 2014
  • December 2013
  • November 2013
  • October 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • August 2012
  • July 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • November 2011
  • October 2011
  • September 2011

Categories

  • Announcements (25)
  • Developers log (119)
  • Documentation (26)
  • News (104)
  • News and articles (16)

WordPress

  • Register
  • Log in
  • WordPress

Subscribe

  • Entries (RSS)
  • Comments (RSS)
© Optimale Systemer AS