Joannesalfa's Recent Forum Activity

  • Isn't there a way to get counted days since first launch?

  • Better you create separated events

  • > Hmm... I think removing jQuery could cause more problems than it solves for the time being, so I think I'll postpone this for the forseeable future...

    Thanks, ASHLEY. I'm not unhappy with your decision. <img src="smileys/smiley1.gif" border="0" align="middle">

    Maybe in the future you could consider replacing jQuery with VanillaJS.

    It looks like another pure javascript framework... for speed

  • Joannesalfa

    Convert seconds to days hours minutes and seconds.

    numdays = Math.floor(seconds / 86400)
    numhours = Math.floor((seconds % 86400) / 3600)
    numminutes = Math.floor(((seconds % 86400) % 3600) / 60)
    numseconds = ((seconds % 86400) % 3600) % 60

    It looks like nice workaround, i think it's possible to get seconds since on start layout and keep saving seconds variable via webstorage... but what happens if on start layout and got 24 seconds = 0 day, then quit application and wait for 3 days, start app again and it could result was 24 seconds = 0 day, exceptation result should be like 3463456 seconds = 3 days.

    There an another website could help us, according to

    the script doesn?t update every second. Updating the day counter every second is not needed since the number of days doesn?t change every second. The below script updates the counter only when the day count mentioned in the counter has to change.

    http://praveenlobo.com/techblog/javascript-counter-count-days/

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Joannesalfa

    Uh, I mean, compare previous saved "Year/Month/Date" with current "Year/Month/Date" to get days.

    Yes, i was wondering how to make it, let's compare saved "Year/Month/Date" with current "Year/Month/Date" but i had no idea how to get the counted days. Does it require loop?

  • Joannesalfa

    I guess, might be saving "Year/Month/Date" into webstorage?

    No, count of days since the first launch of application

  • Hello rexrainbow, this plugin is useful for gameplay purposes.

    I have a question if you don't mind

    How to add count of days when on layout starts? it could set WebStorage, when we launch application at first time, it appears "0" on text, then exit the application.

    Then 12 days later and launch the application again, the text appears "12"

    Do you have an idea how to make it?

    Thanks!

  • 0plus1

    oops, my game uses 960 x 600 which it causes the problem, otherwise some games aren't using 960 x 600 it works flawlessly. Thanks!

    Close this thread, is not bug, it's game design issue.

  • Hello, take a look

    <img src="http://i.imgur.com/xL2RM.jpg" border="0" />

    After of exporting simple HTML5 website with letterbox scale fullscreen.

    when i toggle fullscreen mode on landscape orientation it crops the screen and leave like 100 px blank(iPod Touch 4 uses 960 x 640) on top of the screen.

    I'm sorry for bad quality of that picture.

  • mo

    Thanks for clearing that, i hope the fair price for business model. Sometimes CocoonJS doesn't work for standard HTML5 features like AJAX, accelerometer with gravity, etc. I can wait when it's completed on Q1.

  • It's not necessary for RTS games, you can do infinite scroll just by detecting the mouse at the edge of the window. I'm not sure it's useful outside of 3D games, so I hadn't planned to support it.

    Ashley Ah ok, then it's optional for future version, it would be nice to make new kind of game mechanics like rotating, zoom canvas without leaving the pointer outside of window.

    There a 2D example:

    http://www.smartjava.org/examples/pointerlock/

    click window on right and say Ok to pointer lock permission, you can move your mouse to anywhere to make it infinite scroll, otherwise the left window is limited due to pointer position.

    Kyatric there a example above, some nice information about Pointer Lock API

    http://www.html5rocks.com/en/tutorials/pointerlock/intro/

  • It's new API is designed for HTML5 games to lock mouse pointer while is playing.

    Is designed for 3D games, but 2D games too like RTS and something which use for infinite scroll.

    https://developer.mozilla.org/es/docs/API/Pointer_Lock_API

    Is possible to implement this API for C2?

Joannesalfa's avatar

Joannesalfa

Member since 8 May, 2011

Twitter
Joannesalfa has 3 followers

Trophy Case

  • 13-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x2
    Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

19/44
How to earn trophies