TELLES0808's Forum Posts

  • You can do a math, on the FAQ, search for the space dude game, from Kyatric, there have a dialogue system using arrays.

  • And if you want, you can draw a GIF and import it directly to C2 and use it as a movie ^^

  • I prefer to use a mask around the bomb and check if it's colliding with the object, the mask can be pinned to the bomb and still invisible.

    The bounciness and density will make the rest ^^

  • On the collision with the portal, save the speed and acceleration, change X and Y, restore the speed and acceleration. ^^

  • the maximum size is 2048x2048 pixels, up to this, think in slicing it.

  • I can say another way, just use masks, make effects over them, so, if you wanna hide one part of your map, just play with the effects ^^

    It's like World of Warcraft used on the map, you discover the area and it hide the overlapping image ^^

  • Hello folks!

    This question is more about maintain a code clear and make easy the translation for future purpose.

    What method do you use for games using more than one language?

    I was trying to use Ajax, calling each file with a sufix (pt-BR, en-US, etc). It would work great, and the player will request the dialogues only when necessary, saving space with unnecessary data inside the game (it's good for large RPG games).

    But, it stuck on the preview mode because you can preview the text only after exporting, or using a server (Ajax with apache) or with "Access-Control-Allow-Origin: *" (I didn't this last way because my short knowledge about programmation, no idea of where implement this line, lol....)

    Another way (maybe not the best way), is using webstorage.

    Do you have implemented it already? How did you handled it?

  • well now we should use the import files features of c2 so that it will work in preview mode.

    The preview mode doesn't work because because browsers or server (I don't remember) block ajax's cross domain requests unless the server sends header that allow it.

    But using the import files, the files are exported when preview in the same place as the script and accessible via localhost.

    Should update my old capx maybe...

    Thx buddy!

    The cross-domain AJAX restrictions and how to work around them (including in preview mode) are described in the AJAX manual entry.

    Ashley, I had read the "Access-Control-Allow-Origin: *" on the manual, but still not figuring out how to configure it to send the following HTTP header.

    I tried these steps, with the conditional "When in preview":

    • Writing it on the first line of the txt;
    • Posting, with Ajax, "Access-Control-Allow-Origin: *" to "Localhost";

    Stupid tries, no idea of what I'm doing =\</p>

  • everyday, ^^

    I'm very compulsive with the best performance of my equipment.

    Solved, was something weird with the chrome.

    Thanks everybody who take a time to help here!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Make sure to don't miss Delta Time, it's essential for any animation show smoothly.

    Another thing, you can still using Platform behavior and pin a physic behavior on him, using it to check collisions, etc.

    A simple Jump behavior need to have 3 stages, is jumping, jump peak, is falling.

    A simple jumping player will need simulate controls for left, right, and the jump behavior.

  • You can try timing how long the animation takes to run and see if it's exact. Say you have 3000 frames with a animation speed of 60. If it's exact it should take 50 seconds.

    If it is not exact you could set the animation speed to 0 and manually calculate which frame to use with events.

    start of layout:

    -> play music

    time <= 50

    -> set animation frame to int(time*60)

    I did it this way:

    *First canvas:

    **Pre-load the music;

    *Second Canvas:

    ** Set the animation frame by frame using dt to don't delay, 15ms per frame;

    On the laptop, the music finish exactly when the spaceship hit his second point, it was calculated to be this way.

    On the computer, the animation run very fast.. I'll re-install Chrome to see if it still affecting, because of yours reports.

  • Yann,

    This issue is about animation.

    The Delta time was used to animate because if I play the animation normally, it will never sync with the music (because of the pure fact every computer in the world will have a frame rate different).

    I just want cap the frame rate to 60 or above.

    Doing this way, setting the animation frame to occur on the dt, instead of fps or tick, to maintain it sync with the music.

  • For some reasons I did a square invisible player and pinned some objects on him.

    One of them was a circle with Physics behavior, where have that circle collision mask.

    I used the circle to smoothly the detection between the player and some physic boxes on the screen.

    Following this philosophy, you'll be able to reach what you want mixing it with the other types of collisions in your game, and of course, if you change the sprite size, the circle also change.

    A long discussion was made about the circle polygon, on Stencyl community, and the result was No, they didn't implemented it because of the issues around the Hardware usage and performances.

  • It's possible with ajax, but ajax works on the same domain the page is on.

    Won't work to call .txt from other domains.

    http://dl.dropbox.com/u/23551572/C2/externalFile/dialog.capx

    Works fine here

    http://dl.dropbox.com/u/23551572/C2-Games/dialog/index.html

    But I'm pretty sure it won't work if you export the .capx in your own webhost.

    Yann, sorry to bore you, but it's common to fail when in preview mode?

    After editing the source file link

    Your capx is returning fail even if exporting it with the pre-configured address..

    dl.dropbox.com/u/47035927/temp/multi_language_test/index.html

    Edited: the issue was caused by caching it with the first try ^^

    So! People who is wondering use it, edit the TXT link before exporting it, if you export it before editing it, clear your Cache.

  • You can check it? The animation link