Results 1 to 10 of 34

Thread: Experimenting with WebGL...

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Quote Originally Posted by phibermon View Post
    I'd recommend anybody writing games using this software make the effort to make as much as the code compilable in Delphi/FPC as possible
    as I have mentioned before this is exactly what I did. I only use smart mobile studio to port my games to html5.
    I do not use sms to make apps for mobile devices, I use fpc for that: https://play.google.com/store/apps/d....gemmasterdemo

  2. #2
    PGD Staff / News Reporter phibermon's Avatar
    Join Date
    Sep 2009
    Location
    England
    Posts
    524
    Oh my apologies Dan, I already know you're an experienced developer, I only mean to try and present more views for any budding developer learning about game development, I should imagine there's more than a few OOP coders looking to create games for mobile devices and SMS offers such a reliable and easy way to target the platform, with the added benefit that SMS can help them deliver a wide range of web apps.

    I simply wished to express the opposing view so that those making long term decisions are armed with all the pros and cons, It's important to consider the future of a project in relation to the limitations of your target platform, it's somthing we all learn and I wished to decrease the size of folders titled 'abandoned projects'

    --

    I will re-itterate in the interest of balance that SMS can be used to make a wide range of game styles that'll run brilliantly on many mobile devices. It's very well made and has an intuitive interface that many IDE's could learn from. Hopefully it'll continue to get better and better as web standards evolve, I am of course utterly thrilled to have any representation of Object Pascal in this world.

    Oh and your demos are pretty sweet btw, skinning running well on my system. I've not had time to examine your shaders (I'm gearing up for a release of Jink, previously JenJin, previously VFA, in the next few months) are you using per-vertex/mesh animation, or bone/armature animation? if bones are you using matrices, quaternions or double quaternions for the translation/rotation? particle system runs well too, Are you rendering your billboards from a list of vertices in system memory or are you ping-ponging a VBO between frames?
    Last edited by phibermon; 30-01-2013 at 06:10 PM.
    When the moon hits your eye like a big pizza pie - that's an extinction level impact event.

  3. #3
    the first two demos I posted are actually made with pure javascript, and it was quite a while ago. I mainly wanted to see how advanced webgl was (and it was pretty buggy at the time).
    the skinned meshes are done using bone animations with matrix transformations. the billboards are done using a shader pseudo instancing so there are no changes to the vbo at all.

    I also agree that for any serious projects for mobile devices, javascript is just not fast enough. so it's best to be able to do both the javascript and the native binary.

  4. #4
    It is all about the right tool for the job. We initially looked at Smart Mobile Studio to create an online education product that would also work with iPad and Android. We thought of SMS so we could leverage our pascal coding skills. We then decided to go with HTML5 instead (HTML/javascript/css3). This too would have been ok, however, we are now using contruct 2 which still compiles to HTML5 (WebGL etc) but doesn't require much in the way of coding. I estimate project that would take us 4-5 weeks to complete using standard coding only take a week to do with Construct 2. Our current project looks like it will be completed under budget and under time by a fair amount which means we can afford to invest more money in extra art assets.

    To get back to the point Javascript and WebGL works well for some projects. Personally HTML 5 has so many big plusses it makes it very attractive to use. Wether it is business apps or casual gaming/ educational software the idea that you can write once and then more or less distribute to pc/mac/ipad/android etc is very nice.
    Last edited by czar; 01-02-2013 at 07:11 PM.
    The views expressed on this programme are bloody good ones. - Fred Dagg

  5. #5
    I have ported the 3d capabilities of the engine: http://gen2gdk.com/g2mp/demo1
    I bet that's something that construct 2 cannot do

  6. #6
    That last WebGL is cool in many ways!

    Quote Originally Posted by Dan View Post
    I also agree that for any serious projects for mobile devices, javascript is just not fast enough. so it's best to be able to do both the javascript and the native binary.
    It's a mixed bag TBH.

    On the desktop, Chrome V8 can run right up there with .Net, Java and Delphi in most scenarios, and I've occasionally seen it pull some stunts that required use of ASM to beat with Delphi or FreePascal, especially on floating point tasks. FireFox SpiderMonkey has nice tricks, but is often lagging behind V8.

    On mobile platforms, the king is iOS Safari, for some reason Chrome for Android's V8 doesn't seem to be in the same league as its desktop brother, and Chrome for Android generally isn't quite up to iOS standards in the web graphics department.
    When graphics are involved, Safari can really push the pixels, pity Apple still hasn't enabled WebGL... Given what I've seen with CSS 3D demos, guess having WebGL in Safari would get the browser competitive with most apps, with only special cases out of reach.

    Also node-webkit really shines on the desktop, it starts instantaneously and performance is as good as, if not better, than regular Chrome (they don't have the overhead a proper browser has). They have plans for mobile versions, I'd really like to see if their Android one could run better than the classic PhoneGap approach or Chrome for Android.

    I currently have a non-game related project underway, a plant floor scheduling Gantt chart, being developed in SmartPascal. The graphics are 2D, but involve a lot of under-the-hood trees, hashes, lists and other high-level structures, light on maths but heavy on graph logic, and so far HTML+JS holds its own at least as well as Delphi would IME, and better in the graphics department. Tendering is all anti-aliased Canvas, with paths, brushes, gradients... and everything is properly hardware accelerated AFAICT on the usual suspects. And it runs everywhere "out of the box", which is mighty comfortable.

  7. #7
    In my case the main point of interest is high performance game development, so I have to use direct3d, opengl, gles, webgl for the graphics. unfortunately, webgl is basically nonexistent on ios platforms so there's nothing to even talk about here. on the android you can compare the performance of the latest demo I posted and its binary equivalent http://gen2gdk.com/files/g2mp_demo0.apk. so I am convinced that for the mobile game development the native code has an edge over html5. however, html5 is still an awesome platform since it works in the browser, and on the desktops the difference in performance is negligible. personally, by using my game engine, I get the advantage of being able to compile both the native executables (fpc + lazarus) and the html5 javascript (smart mobile studio).
    Last edited by Dan; 06-02-2013 at 02:38 PM.

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
  •