Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 34

Thread: Experimenting with WebGL...

  1. #11
    PGD Staff / News Reporter phibermon's Avatar
    Join Date
    Sep 2009
    Location
    England
    Posts
    524
    Quote Originally Posted by Eric View Post
    Well that's changing, Google ChromeOS, MS Metro, node.js, that FireFox mobile OS and the direction of new Html5 specs, they are step by step being pitted against native code.
    It's all a matter of processing power and economics. HTML5 browsers are just slow, buggy virtual machines for a computing platform that never existed.

    Drivers tend to be written in C/ASM because every cycle counts when your hitting the limits of a bus. Nobody wants JavaScript Nvidia drivers.

    Game engines, same reason again, it takes more work in a lower level language but what you gain is performance.

    Which of course, is totally obvious however, this isn't my point.

    A web-browser running some javascript code providing access to a HTML5 DOM, is no less capable in terms of coding efficiency than any object-orientated language and a suitable framework/engine to work in.

    And the only reason we are seeing the proliferation of HTML5 as a gaming platform now is because of one un-important reason, and two important ones.

    The unimportant reason : That the code is portable across multiple platforms.
    Why it's unimportant : Good engine code is portable on those same platforms, for native compilation in C etc.

    Now the two important reasons we're seeing the proliferation :

    A) Certain vendors don't let you release or even write native code, you're forced (will be forced) to use HTML5/Javascript (because it protects their investment, not because it's better for the consumer)
    B) Every man and his dog gets into web-development, fancies themselves as a game developer and sticks with the language they know.

    --

    Now if a game is fun, then people arn't going to care if you coded it in machine code or javascript. (They'd care even less if it wasn't fun)

    But if you're on some mobile device, then it does matter because for now, the devices are still fairly restrictive when compared to desktop computers. So coding in a native language for the device or coding in HTML5 is the difference between some laggy version of solitare or some fast and detailed 3D world. (I know that's an exaggeration but the margin is still signifigant, especially when it comes to latency bound operations such as realtime sound processing)

    One day it won't matter, the gap between native and interpreted performance will be nothing compared to the upper capabilities of the device.

    But for now, anybody looking to get into web-development who also would like to write games, HTML5/Javascript is an excellent choice.

    However if you want to be a professional game developer or indeed, are a hobbiest that wants to really understand game development? don't waste your time with a markup language that's more suited to a newspaper layout and a scripting language that was designed for flexibility, not speed.

    And yes, I know the goolge JS engine (V8 or whatever) is fast, optimized with JIT style capabilities etc

    But do you care? honestly? I mean what kind of claim is that? "Our new javascript engine is only 3% slower than native code!"

    So it's still slower than native code? and I've gained absolutley nothing but some exotic language features that are useful in the abstract but of no use when it comes to mathematical algorithms. My language is already turing complete thanks and I'm a game developer, I need to be next to the hardware, not waving at it from across a river.
    Last edited by phibermon; 20-01-2013 at 11:52 PM.
    When the moon hits your eye like a big pizza pie - that's an extinction level impact event.

  2. #12
    So how do you guys use WebGL in SMS? Last time I looked I couldn't find any support for it. Are you basically just using a lot of javascript or have they added support for WebGL?
    Imagine I've written something clever here inspiring you to make something awesome. If that happens give me credits

  3. #13
    as far as I can tell sms has everything you need to work with webgl, a header file (an import unit is what they call it) that connects all the webgl calls, typed arrays, though a bit buggy right now but usable. they even have a demo which should cover most of the basics. and where sms just doesn't work for you, you can always make a patch with inline javascript.

  4. #14
    Thanks Dan.
    I downloaded the latest beta and found Eric's demo. It was missing two custom units, so I had to download the demo from Eric's site to get it working.
    Maybe I'm just not looking at the right places, but I sure miss some documentation when looking at SMS. Where can I for instance see all the units that follow with SMS? I would never have found the w3c.webgl unit if it wasn't used in the demo.
    Imagine I've written something clever here inspiring you to make something awesome. If that happens give me credits

  5. #15
    you can find all the units included with sms in the installation folder in rtl. but yes the documentation is one of the weakest points of sms. you can find a small documentation on their website and they also sell a book that may cover a few more aspects of the ide. btw, a new beta is out, hopefully it fixes that operator overloading bug.

  6. #16
    I have partially ported one of my older games to sms. there is still no sound and the profile saving/loading doesn’t work so the game progress will reset when you close the game. but otherwise it’s quite playable, even on opera which is generally slower than chrome and firefox.

    http://gen2gdk.com/g2mp/gemmaster/

    the game was made for the mobile devices so some of the buttons may seem huge in the browser.

  7. #17
    alright, now the sound and saving/loading the profile works.

  8. #18
    Dan, the game you posted is quite nice, but I didn't work on my iPhone, nor on Samsung Galaxy. I thought mobile Chrome browser would support WebGL?

    And what you guys mean by SMS?

  9. #19
    the sms is short for smart mobile studio, it's a tool that basically compiles object pascal into javascript, you can find more info here: http://op4js.optimalesystemer.no/
    I do not use sms to make apps for mobile devices, I use fpc for that: https://play.google.com/store/apps/d....gemmasterdemo
    on android only opera and firefox support webgl (with opera having the edge), but the performance is still very poor. as far as I know iphone does not support webgl.

  10. #20
    When you see SMS here on PGD it is meant as Smart Mobile Sutido (http://smartmobilestudio.com/) and not Short Message System as wee know it from mobile phones.

    BTW I think it would be best for PGD users to not refer to Smart Mobile Studio as SMS as it is just creating confusion amongs oters especially becouse SMS is often used in todays lives but as I sad before stands for Short Message System.

Page 2 of 4 FirstFirst 1234 LastLast

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
  •