ranma's Recent Forum Activity

  • thanks Mipey , this is great idea and should be working - would never think of it this way

  • In Construct Classic there was this great functionality that is missing from C2 which for I would be grateful to the end of my days.

    Remember "On loop" ? - You could assign a loop named "create cloud" and run it 100 times on start of layout and 10 times every 5 seconds. It acted like a function but without arguments and is currently impossible to implement without 3rd party plugins.

    If it's not much of a hussle pretty please add this functionality to C2 I run a "beg you" loop 100 times.

    Cheers!

  • Status:

    I have a game that communicates with server from time to time via ajax.

    I need the game to know all in every tick, what is the server time.

    What I tried:

    1) I tried sending server time to game, set a global variable "now" to this value, and in every tick add dt to "now" with no luck, because when game goes out of focus, this will break (c2 pauses)

    2) I tried messing with wallclocktime, sent server time to game, set a global variable "server_time" to this value minus current wallclocktime on receive and every tick set a "now" global variable to "server_time" + wallclocktime. My logic tells me this _should_ work, but it doesnt, every time I get new current time from server, "now" goes back around 10 - 20 seconds. why?

    any ideas would be greatly appreciated.

  • appmobi will not make your app run faster unless you use their direct canvas which is not yet supported on android. the only way is to use the cocoon option, but this one is still in beta with no way to export to a real android app yet. that's just the (sad) way it is for now.

  • if you can use external plugins use moveto behavior

    if you can't, well you're stuck with lerp

  • Secondly, about the games. I don't see any big problems keeping Construct 2 games from running on Ouya that aren't already being solved for exporting to Android. Evilot is a game targeting Ouya's launch that is using HTML5. Eventually an Ouya exporter for Construct 2 before the end of 2013 would be nice and I would experiment with it.

    http://www.syrenaica.com/evilot-the-first-chilean-game-on-kickstarter-aims-for-ouya/

    Well, first of all, great and very informative post, LobsterSundew

    Also, as WebGL for android 4.0 was released some time ago as open source, I don't see a reason for construct games to run great on ouya if they just take some time to implement it into their android browser. Then a simple phonegap export would be enough to create an ouya game in c2.

  • but it will appear in vertical center even if you go right on top of previous layout.

    the more complex solution is to store your hero's y position in a global value and make something like this:

    player.x > LayoutWidth - 20
         set global value lastPlayerY to player.y
         go to layout "lay2"

    and in the lay2 layout you should have:

    on start of layout
         set player.Y to global value lastPlayerY
         set player.X to 20
  • p.s. reason I'm exporting for testing purposes is because I use AJAX which needs te be executed from my testserver.

    ajax should work just fine in preview mode if you send a Access-Control-Allow-Origin: * header with your server file. maybe that will help.

  • no problem, have fun!

  • also Ashley maybe you should make this kind of carsting automatic? if a global / local variable is of type number, cast every string to float automatically? or check if you are trying to set it to string in an event?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • <img src="http://img11.imageshack.us/img11/9278/screenkbi.jpg" border="0" />

  • event 2: set score to int(WebStorage....)

    webstorage stores all values as string, so if you get a value from it to a number type local variable, you should cast it to int.

ranma's avatar

ranma

Member since 20 Feb, 2008

None one is following ranma yet!

Connect with ranma

Trophy Case

  • 16-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Email Verified

Progress

19/44
How to earn trophies