Author Topic: Upcoming SGDK2 Outputs HTML5  (Read 25141 times)

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Upcoming SGDK2 Outputs HTML5
« Reply #15 on: 2011-10-31, 08:28:39 PM »
I am using Chrome.  I will have to re-run a FireFox test.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Upcoming SGDK2 Outputs HTML5
« Reply #16 on: 2011-11-01, 05:18:59 AM »
Wow, I'm running FireFox on a little laptop and Chrome on a powerful desktop, yet FireFix outperforms Chrome by a lot!  I wonder why.  I posted a question about it ar http://stackoverflow.com/questions/7965592/html5-canvas-slow-on-chrome-but-fast-on-firefox

Vincent

  • SGDK2 Addict
  • Expert
  • Fanatic
  • *****
  • Posts: 612
  • Legacy of Kain: Revival is completed!!!
    • View Profile
    • Chivalrous Games
    • Email
Re: Upcoming SGDK2 Outputs HTML5
« Reply #17 on: 2011-11-01, 05:54:35 AM »
Huh, I didn't know there were such huge performance differences between the two browsers.  I usually use Firefox because of Firebug and then I validate the final display of the page with other browsers, such as IE6, 7, 8, 9, Opera, Chrome and Safari.  I never noticed performance issues...  But then again, I never used HTML5.
Legacy of Kain: Revival completed!
http://lokrevival.webs.com

See also my company website:
http://chivalrousgames.com

SmartBoy16

  • Contributor
  • Fanatic
  • **
  • Posts: 587
  • Looking for inspiration.....
    • View Profile
    • Email
Re: Upcoming SGDK2 Outputs HTML5
« Reply #18 on: 2011-11-01, 05:32:14 PM »
Wow, I'm running FireFox on a little laptop and Chrome on a powerful desktop, yet FireFix outperforms Chrome by a lot!  I wonder why.  I posted a question about it ar http://stackoverflow.com/questions/7965592/html5-canvas-slow-on-chrome-but-fast-on-firefox

It might be because Chrome uses a lot more memory than other browsers, which may explain why it runs faster is because it allows itself more memory to work with at once. I learned that quickly since I noticed that games like Team Fortress 2 lagged a lot more when Chrome was running.
Looking to the skies.....

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Upcoming SGDK2 Outputs HTML5
« Reply #19 on: 2011-11-01, 08:30:59 PM »
Chrome is the one that's running slower.  And it's using less memory than FireFox at the moment.  Where do you get the impression that Chrome uses a lot more memory?

SmartBoy16

  • Contributor
  • Fanatic
  • **
  • Posts: 587
  • Looking for inspiration.....
    • View Profile
    • Email
Re: Upcoming SGDK2 Outputs HTML5
« Reply #20 on: 2011-11-01, 08:47:32 PM »
Oh....I haven't actually tested this out myself. Maybe it's because I usually have 5 or 6 tabs open at once and some usually run flash too.
Looking to the skies.....

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Upcoming SGDK2 Outputs HTML5
« Reply #21 on: 2011-11-05, 10:20:10 AM »
Good news:
As I was investigating Chrome's slowness I discovered some inefficiencies to clean up in the code generated from the LOK Revival project.  Mostly it's summed up by the rule: don't store and draw 100% transparent frames.  That improved the performance a bit.

Even much better news:
As I was fiddling with scrolling around one of the maps, I stumbled into a mode where the mouseup event was not processed and boom incredibly smooth scrolling was happening as I moved the mouse around without holding down the button!  So I disabled the mouseup event allowing me to always scroll the map around without holding down the button.  Lo and behold, it scrolls very smoothly as long as I'm not holding the button down.  But as soon as I hold the button, it lags severely on each frame.  I have updated my posting at stackoverflow.com with the details.  Hopefully I can get to the bottom of it.  But I don't think it even matters terribly because most high frame rate games probably won't be primarily using mouse dragging.  So I think we got some great performance here even on a huge complex project like LOK Revival!

Vincent

  • SGDK2 Addict
  • Expert
  • Fanatic
  • *****
  • Posts: 612
  • Legacy of Kain: Revival is completed!!!
    • View Profile
    • Chivalrous Games
    • Email
Re: Upcoming SGDK2 Outputs HTML5
« Reply #22 on: 2011-11-05, 02:16:24 PM »
Hey!  That's great news!  I'm with you on this, if Lok:Revival runs smoothly, I guess all games will (since I didn't spent optimizing the game and since it's pretty huge).  ;D
Legacy of Kain: Revival completed!
http://lokrevival.webs.com

See also my company website:
http://chivalrousgames.com

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Upcoming SGDK2 Outputs HTML5
« Reply #23 on: 2011-11-13, 07:22:28 PM »
Scrolling Game Development Kit 2.2.0 has been released with (limited) HTML5 support.  You can view and scroll around all your maps, and all the sprites, solidity and tile categories and animations are available, but since the rules aren't you will have to manually add JavaScript code in order to interact with your game beyond the default scrolling around the map.  Before I make a larger announcement, would any of you care to download the latest version and share any comments you have about the process of finding, downloading or using SGDK 2.2 and its new HTML5 output feature?  Then I can post any further important information along with my initial announcement in order to give users a better first-time experience.  I think this is a big one, folks.  HTML5 is a big deal for SGDK2 I think -- now you can use SGDK2 to make significant progress toward designing and developing games that work on iPad and other mobile devices! So I want to get this right on the first try and not have users walk away due to a bad first experience.

It may be that this ends up just being the "preview version" to something more substantial where rules are actually implemented in HTML5 also, or where there's detailed documentation provided on how to turn your SGDK2 project into an HTML5 game.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Upcoming SGDK2 Outputs HTML5
« Reply #24 on: 2011-11-14, 06:05:22 AM »
Oh, here's what the new menu looks like.

Vincent

  • SGDK2 Addict
  • Expert
  • Fanatic
  • *****
  • Posts: 612
  • Legacy of Kain: Revival is completed!!!
    • View Profile
    • Chivalrous Games
    • Email
Re: Upcoming SGDK2 Outputs HTML5
« Reply #25 on: 2011-11-14, 05:56:49 PM »
I tried it with LokRevival, but somehow it doesn't work.  Did you modify the LokRevival project to make it work?  When I export to a single file, the page loads up but I can't scroll and the buttons do not switch the map. (hum, maybe it's possible to scroll, but the first map that loads up is small, so maybe only the buttons are broken.)

I like the fact that you can export to many files.  It's a good thing for anyone who wants to patch only a part of the project without making a full release.  But when I tried it with Lok:Revival, the page doesn't load up properly, I get an error message about local files.

It would be nice also if you can export to a subfolder so the HTML5 projects isn't mixed up with a normal project ressources.  It can be annoying to split all the files manually.  Or simply add the option: clean up and export.

I think I would implement rules to javascript before making an announcement.  It would be a powerful tool and much more interesting than rewriting a game with javascript.  :)
Legacy of Kain: Revival completed!
http://lokrevival.webs.com

See also my company website:
http://chivalrousgames.com

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: Upcoming SGDK2 Outputs HTML5
« Reply #26 on: 2011-11-14, 08:40:54 PM »
Looks pretty nice.  I tried it with TVSGDK2, and it worked pretty well.  There were some oddities when viewing with a full window and changing the browser's size, but that's probably "not supported" anyway.

One thing I would suggest is changing the export flow. If I want to change from fixed size to full screen, and toggle generation of buttons before exporting, that requires navigation through the menus three times.

My suggestion would be to instead make it another form, and also allow the user to select the location of the file/files to go, rather than just place them in the project directory.  I was fully expecting a dialog asking me where to save it, but nope.
Edward Dassmesser

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Upcoming SGDK2 Outputs HTML5
« Reply #27 on: 2011-11-15, 06:04:08 AM »
Thanks.  Of course that requires modifications to the software, not just additional comments on the announcement.  But maybe it would be OK to update the files before announcing the release.

The reason I put it all in the menus (and I agree it's cumbersome if you want to change all the options) was simply because I didn't want to introduce a whole new form with its own help page.  But it's probably the right thing to do.

Odd it didn't even occur to be to prompt for where the output file(s) should go.  I just assumed it was going to be similar to compiling.  But now that you mention it, it is more like an export.  It wouldn't be hard to prompt for a target location.

Got any ideas for a slick sample project to attract some attention?  Need something with parallax scrolling, animated tiles and translucency.

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: Upcoming SGDK2 Outputs HTML5
« Reply #28 on: 2011-11-15, 08:52:06 AM »
If you're just looking for a map that looks good for scrolling, wouldn't the sample project work well?  Or are you thinking something more expansive?

As for difficulty of finding, etc... I'm used to it by now but most apps don't let you just extract all the files and be good to go.  You usually have to go through some sort of installation process.  You may want to include a readme or mention something about how it's self-contained and you don't need to install anything, which is a plus for most people.
Edward Dassmesser

v6v

  • Clever
  • Fanatic
  • ***
  • Posts: 500
  • Has renamed his project to Galaxy!
    • View Profile
    • My Developer Page!
    • Email
Re: Upcoming SGDK2 Outputs HTML5
« Reply #29 on: 2011-11-15, 03:57:04 PM »
Would it be possible to load a savegame via browser?
I would love for people to go to my game's site and see what players are on a current map at any given time, even if it's only a snapshot that appears when the page is loaded..