Kyatric's Forum Posts

  • Using DT is a good place to start.

    Also be sure to have updated your graphic cards drivers and browser.

    Also be aware that some browsers work better than other.

  • I read the auto mirror explanation, and I tried it but I had a bug: When rotating 180 degrees with the auto mirror (or flip) on, the sprite disappeared.

    (EDIT: Just checked it and the sprite is there, hasn't been destroyed or anything... It simply disappeared)

    It happens when the "Preview mode" is set to "File" in the project properties.

    Turn it to "HTTP" and the auto-mirror/flip will work as intended.

  • Flip/mirroring is done by changing the angle of the sprite.

    Negative values for height and width are to "ban" from use.

    There are a few samples through this "how do I section", scattered around.

    Search for "negative width" you should find the topics back with a more complete answer by Ashley.

  • And just to add to the discussion and because I'm surprised Ash didn't link to it : last scirra's blog entry about C2 architecture and potential future for exporters.

  • Look on google for the keywords : "How to alpha layer Graphics Gale", or something of the like (specify the software and "alpha layer", the alpha layer IS the transparency you're looking for).

  • Did you manage to compile a c2 exported "c2runtime.js" file ?

    I tried a quick one (my PF's demo) and it got me a lot of errors.

    I guess it requires first to turn jquery into a dll. I might look deeper in it later.

    If you did successfuly transformed exported projects, could you post how you did it, a kind of step/step tutorial ?

    Also I'm editing the title, since it is Javascript to .exe, and not Java.

  • They are a system expression indeed.

    Simply use WindowHeight or WindowWidth.

    R62 is available for download here.

    To receive an email with a direct link for future release simply check "Construct 2 new releases" when you edit your profile. Best way to keep informed as soon as there's a new version (if you check your mail often).

  • I see this flickering too on FireFox, for like an instant (when going left).

    It makes me thing about some kind of loading delay due to the auto-mirror, as if the "other side" animations wouldn't be available in memory before the very moment you try to display it.

    So, what about, in 1-1 sheet, on start of layout, trying to set mario's angle to 180 and set through all the animations, before setting him finally to the "start" animation and angle ?

    Does it "correct" things up ?

    If it does, but flickers at start, for the time of the startup, maybe consider displaying him as an effect, or something to "hide" the flickering. Once it is ok, simply display as intended.

  • I'll see if I can get a trophy for the winner but I can't promise this I'm afraid!

    At worse a line in the profile maybe ? (/users/name_of_user)

  • onzephyr: You provided an already elegant solution enough. Well done.

    Apparently it looked to me that Both sprites were clicked, since if you moved sprite2 away from sprite, the code of VampyricalCurse's capx worked.

    It maybe had to see with the z-order, I'm not sure though.

    Anyway, good job.

  • Have you updated your graphic card drivers ? Your browser ?

  • > Edit: moved to C2 section by the way.If this is true then there's a bug with the forum software, because I still see it under "Help & Support using Construct Classic".

    There is indeed still a marker from the original forum it was posted in.

    But this topic is also now visible in C2's section.

  • sparkfeather: I downloaded your ajax example.

    Ajax is supposed to go look for an url online. All you do is try to get a php file with no url, no wonder it can't work.

    Also, as Ashley said you only have a "on completed" event.

    If there is an error in the process, you should also have a condition "on request failed" that would display you a message as there is an error.

    You really should look attentivly again at the jax tutorial.

    <img src="http://dl.dropbox.com/u/36472942/construct/forumhelp/Ajax.png" border="0">

    The client is you when you launch your C2 application.

    The php file is on your online server (with a full url like myserver.com/myfile.php).

    Ajax is a communication between your application and the online server.

    The php file "responds" to the event "Request" and the data "responded" sits in Ajax.LastData

    The fact that there is delay might come from the time it takes for the request to go from your computer to your server, the time that the server processes the request and then the time that the answer comes from the server back to your computer.

  • Remove pieces until the yellow triangle hits the purple/brownish floor.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There are still some issues I need to resolve:

    - I need to refine the setting of the player sprite angle towards the target.

    - I need to refine the final movements of the player sprite to the target. The final position of the sprite always seem to be a bit off of the actual target coordinates.

    This is because the pathfinding is made as a grid like in the example with S and D. When you drop the Destination icon wherever on a cell, it is automaticly repositionned to its center. That's because the center of the cell IS the target, its X and Y position, its center.

    The pathfinder will locate the X and Y of the target object and will check in what cell this position actually is (so if your target object is put in between 4 cells at the same time, having bits of it being present in 4 cells, only the cell which contains the actual X and Y coordinates of the object will be set as destination of the pathfinder.)

    Same principle goes for the Source object. It's X and Y defines the starting cell.

    I may be unclear, I'll document it more in the next version of the pathfinder.

    - It appears that when setting the path-finding obstacle, it only recognizes the final obstacle set in the event sheet. I think I may not be setting the obstacle list correctly. In the example, you can see that the only obstacle recognized is the horizontal wall. The player sprite will walk right through the vertical wall and the column obstacles.

    This is possibly a bug in the behavior. I was thinking about it lately, did not run any test, I'll look more into it.

    A workaround that could work for now would be to have a single object "Wall", set as obstacle.

    Its animation would contain different frames, holding the several textures (WallHorz, WallVert and WallColumn).

    On startup you assign the right frame to the object (you might "mark" the instances with an instance variable and display the correct frame for the setted value on start of layout).

    Also be sure to keep consistency in the size of the objects. Your player is 80 pixel of height, be sure that your obstacles are also 80X80px.

    For the obstacle, it's not taking only the X,Y position into account, but the bounding box.

    Meaning that on the path calculation, if any bit of the bounding box of the obstacle is colliding/overlapsing a cell, the cell will be marked as unwalkable.

    I'll document on that too.

    If you don't mind, I'll use this example of yours (and work on it for tests and improvements) for the future releases of the behavior.

    I'll also try to give the option to choose between bounding box collision and polygon collision mask, even if it won't change a lot of things. The slightest bit of obstacle being on a cell will still mark the full cell as unwalkable.

    Overall, it seems to work pretty well. I am open to any suggestions for making it more elegant or precise.

    Also, I am still getting up to speed on JavaScript and the SDK, but I am wondering if this type of movement using a path list would translate well to a plug-in, or if it is better handled through events.

    Thanks!

    Having an automated movement, moving the sprite from grid cells to grid cells might be handy as a behavior. Associating both the PF and this should give a "fully" fonctionnal automated PF behavior in the end.

    I had sources at a time that were a first implementation of this, but it got lost somewhere in my backups.

    I'll check on those too, but I will focus first on the PF as we obviously can handle/workaround the movement via events for now as demonstrated through this topic.

    Thanks for the working on the behavior.