Author Topic: Windows 8  (Read 12018 times)

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Windows 8
« on: 2013-07-29, 05:08:54 AM »
The cost of Windows 8 isn't what's preventing me from getting Windows 8. I just don't see the point. It seems to be flopping, especially Metro. Microsoft has been doing all kinds of things to try to artificially prop it up like offering rewards to developers who make content for the platform, but I'm suspicious. If the platform was truly worthwhile and popular, it wouldn't need such gimmicks propping it up. As for Metro, since that seems primarily designed as a mobile platform, I wouldn't be surprised if the Mobile (Html5-based) template in SGDK2 was the best way to target that platform. Rather than getting the old mechanism (OpenGL) to work for the newest platforms, would it be worthwhile to figure out how to get the new mechanism (HTML5) to work? What are the obstacles to using HTML5 to target Metro?

The most persuasive thing I've seen done to promote Metro, BTW, is that ad with Dell's Windows tablet next to an iPad showing all the things that make the Dell tablet better, and then showing that it's about half the price. I wonder what Apple's response to that is.

v6v

  • Clever
  • Fanatic
  • ***
  • Posts: 500
  • Has renamed his project to Galaxy!
    • View Profile
    • My Developer Page!
    • Email
Windows 8
« Reply #1 on: 2013-07-29, 11:43:55 AM »
The most persuasive thing I've seen done to promote Metro, BTW, is that ad with Dell's Windows tablet next to an iPad showing all the things that make the Dell tablet better, and then showing that it's about half the price. I wonder what Apple's response to that is.

Heh, it's interesting when they go directly for each others' throats.

The cost of Windows 8 isn't what's preventing me from getting Windows 8. I just don't see the point. It seems to be flopping, especially Metro. Microsoft has been doing all kinds of things to try to artificially prop it up like offering rewards to developers who make content for the platform, but I'm suspicious. If the platform was truly worthwhile and popular, it wouldn't need such gimmicks propping it up. As for Metro, since that seems primarily designed as a mobile platform, I wouldn't be surprised if the Mobile (Html5-based) template in SGDK2 was the best way to target that platform. Rather than getting the old mechanism (OpenGL) to work for the newest platforms, would it be worthwhile to figure out how to get the new mechanism (HTML5) to work? What are the obstacles to using HTML5 to target Metro?

What rewards? I'm interested. Incentives are always nice. I understand in a way- it never seemed as if Windows 8 would last this long, with the radical new metro interface. But it seems to be holding it's own as a nascent competitor in the operating systems world. As developers, do we really get a choice? Most Best Buys and Circuit City's are pressure pots bursting with Windows 8 preloaded devices today.

I've been reading that Windows does a terrible job promoting games in their store. It's rumored that even popular apps won't sell as well in the Windows 8 Market than any other Marketplace.

The main barrier to HTML5 in Metro? None unless your game has a good amount of sprites on screen or graphics and whatnot that make it lag. Otherwise, there seem to be no barriers.

Not including the screen scaling, which seems to create stretch lines betwixt the tiles. So Windows offers me the chance to use C# with DirectX instead. Hopefully that will give me greater access to an internal method that would let me change from Nearest to Linear, fixing the issue, some browsers allow this to be changed, like Firefox, but I can't seem to find much documentation on Windows's aptly named, "WinJS".

After that it's a simple job of copy/pasting your code and resources into your HTML5 file in Visual Studio/Blend.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email

v6v

  • Clever
  • Fanatic
  • ***
  • Posts: 500
  • Has renamed his project to Galaxy!
    • View Profile
    • My Developer Page!
    • Email
Windows 8
« Reply #3 on: 2013-07-29, 03:45:28 PM »
Darn! June 30 was the cutoff.

I think this topic should be moved to a new thread, this is officially a Windows 8 thread.  :)

Hey, maybe there will be more rewards, right? I'll keep optimistic. Microsoft representatives visit the school occasionally to get devs interested in Surface. Do you think that could be the opportunity to get recognized?

(I've been working on something quietly since 2010 in Android and porting it to SGDK2's HTML5)

Do you have any plans to increase support to Windows 8? I'm not much of a programmer but I can help wherever I can..

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Windows 8
« Reply #4 on: 2013-07-30, 06:25:46 AM »
Yeah, I was tempted to split the topic before, but now that two of us think so, that was enough to make me actually split it.

There may be other Windows 8 developer promotions. I just posted the first Google result I found.

Surface doesn't seem to me personally like something that's going to get developers recognized unless they find something truly unique and applicable to that platform. But what do I know about getting noticed; SGDK 2 has gone relatively unnoticed for years. :-)

I don't have many more specific plans for SGDK2. I'm mostly intending to react rather than act on it while I begin work on some projects in Blender and Unity. I think my thought for future expansion of SGDK2, though, was entirely based on expanding HTML5 support, which is why I asked what obstacles existed to using HTML5 to target Metro. Do you think the HTML5 solution could be sufficiently optimized to support all future target platforms? In other words, do you see specific shortcomings in the HTML5 code that would be worth improving (or better yet, that you know how to improve)?

v6v

  • Clever
  • Fanatic
  • ***
  • Posts: 500
  • Has renamed his project to Galaxy!
    • View Profile
    • My Developer Page!
    • Email
Re: Windows 8
« Reply #5 on: 2013-07-30, 11:33:13 AM »
Well, I've been scrambling around stackoverflow to see if I can squeeze any small performance differences from any functions.

http://stackoverflow.com/questions/441893/which-is-faster-math-absvalue-or-value-1

Minute differences for commonly used functions in my code.

I've written a neat little custom code object, calculate.js, that attempts to find fast ways to solve problems. But that's all I've done scripting wise.

To answer your question:

I would love to find out why it is exactly that my game performs so slowly under HTML5 using the Metro Interface, yet I can overclock (;-)) to about 40 FPS in any browser that isn't Firefox. The lag is terrible... I wonder, should I not attempt to embed everything into one single file? Or would SGDK2 still attempt to load everything at runtime. I'll look into my code.

I'm not sure why exactly it is that the code lags. I'm sure I can eventually get to the scaling issue using the ViewBox property Windows offers (Without butchering mouse input recognition by scaling). C# seemed appealing because it offered me a chance to set the resolution of the display device. HTML5 does not allow this.

The modulates could probably become supported using CSS wizardry, but even that wouldn't do anything necessarily for performance.... It would probably further cripple rendering time.

Code: [Select]
img {
image-rendering: optimizeSpeed;        
  image-rendering: -moz-crisp-edges;          /* Firefox                        */
  image-rendering: -o-crisp-edges;            /* Opera                          */
  image-rendering: -webkit-optimize-contrast; /* Chrome (and eventually Safari) */
  image-rendering: optimize-contrast;         /* CSS3 Proposed                  */
  -ms-interpolation-mode: nearest-neighbor;   /* IE8+                           */
      }

This is something that I used to use in my style for my webpages. It increased rendering time by a factor of 1.5 (Self calculation?). It removes Anti Aliasing and allows graphics to be rendered with pixelated edges (Similar to the Nearest/Linear hotfix I mentioned in C#)

It sadly only transforms images rendered outside of <canvas> I'm trying to find a way to get this line of code running inside of <canvas> It might help just a little

Profilers are telling me that ExecuteRules is the most executed function in JavaScript. Does it execute even for sprites without any rules?

(Off Topic: There were quite a few developers who re-released games on Windows 8 with slightly changed graphics each time, Pizza Guy and Taco Man, it's interesting, someone profited 200 dollars from this)

EDIT: Come to think of it, it I can get the above snippet working, then I can manually scale up and down mouse input per device. Nearest would theoretically remove the scale lines.
« Last Edit: 2013-07-30, 03:27:45 PM by v6v »

v6v

  • Clever
  • Fanatic
  • ***
  • Posts: 500
  • Has renamed his project to Galaxy!
    • View Profile
    • My Developer Page!
    • Email
Re: Windows 8
« Reply #6 on: 2013-07-31, 07:53:56 AM »
Issues fixed in HTML5

Figured how to fix Framerate
Screen Resize without the scaling lines is possible using WinJS ViewBox, figured out how to use ViewBox.
ms-interpolation-mode is obsolete, it's forced to be "bicubic" regardless in all modern versions of IE.
Nearest-Neighbor is no longer possible in Windows 8 HTML5. But it isn't needed thanks to the ViewBox anyways.

Persisting issues with HTML5

HTML5 games still seem to run *stunted* in Firefox
Firefox isn't as forgiving on script errors (Not really an issue on SGDK2's part)
Opera and IE give relatively good performance compared to others.
I'm not sure why Firefox is being this way.

^These aren't too important to me specifically, but they may be to Firefox users.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Windows 8
« Reply #7 on: 2013-07-31, 12:47:30 PM »
How does Chrome perform?

v6v

  • Clever
  • Fanatic
  • ***
  • Posts: 500
  • Has renamed his project to Galaxy!
    • View Profile
    • My Developer Page!
    • Email
Re: Windows 8
« Reply #8 on: 2013-07-31, 05:29:00 PM »
I'm not sure, I can't get Google Chrome running on my computer.

Did I answer your question in my above posts, bluemonkmn?

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Windows 8
« Reply #9 on: 2013-08-01, 03:03:44 AM »
I think my questions are pretty much answered. Just looking for reassurance that SGDK2 is useful without having to update the framework again (to use something other than OpenTK).

v6v

  • Clever
  • Fanatic
  • ***
  • Posts: 500
  • Has renamed his project to Galaxy!
    • View Profile
    • My Developer Page!
    • Email
Re: Windows 8
« Reply #10 on: 2013-08-01, 09:41:30 PM »
That's drastic..... HTML5 is wonderful. It sounded as if I wanted to completely change it out, but that would be a cop out move- there has to be a way to get things running well, and there is as I'm starting to find out. I appreciate your effort to continue SGDK2 support.


I'm getting a very mild performance difference by replacing Math.floor with ~~ in drawImage- the function called frequently in the code.

Math.floor is called often. Performance logging is telling me this.

Elapsed inclusive time fell from 45.10 to 44.29%.

EDIT: Elapsed inclusive time rose from 45.10% to 56% after replacing more occurrences of Math.floor in a later performance monitoring session.  >:(

Programming is fun... when it's predictable. Unpredictability should be left to another field.. don't you agree?

Why even attempt to try and crank out a few extra frames per second anyways...  ;) I'm not even sure what I'm doing.

EDIT:

Dropping inclusive time by removing unneeded layers, setting layers to size 1, 1 in tiles with a large tile.

SGDK2 is running at a reasonable FPS with a project using multiple layers (7) as a HTML5 Windows 8 app now.
« Last Edit: 2013-08-01, 10:31:10 PM by v6v »

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Windows 8
« Reply #11 on: 2013-08-04, 06:26:57 AM »
If I recall correctly, Chrome at least (I don't know about other browsers) has some really good profiling features so you can tell exactly how much time is being spent in each Javascript function. That might be helpful.