lapinchatware's Forum Posts

  • On line 1 of my example .c3p, if you enable the action "background: Set Invisible", you'll have a good look oat the obstacle cells (the red ones). Pictures in my first post also show all the cells in the layout.

    Please, try this to see all the cells. Read my post completely.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • OK, that looks like the answer. If you look at your family 'walls', Rectwall and Circwall (change opacity to 75) you can see where you are checking for pathfinding. Where the blue isn't covered is where pathfinding will go through the image.

    I already see where I'm checking for pathfinding. I understand how it works. This is not the problem. Please look elsewhere. My problem is simple: Instead of following the path generate by the pathfinder, the sprite follow an approximation of this path. This approximation is not good because it goes through obstacle. To be clear, those obstacles are placeholder sprite with a Solid behavior.

    I changed the big firewall at the top to overlap that large blue piece and it stopped crossing it.

    The blue shape is only a background image with no behavior. It's only there as a background placeholder. All the 'walls' are covering correctly the blue section. Please focus on something else.

    Creating the map this way is a lot of work for you, and probably not the easiest on CPU. Using tile maps might simplify that, or sprites with SOLID behaviours.

    Sprites used as obstacles already have a solid behavior. Look closely.

    I appreciate your help but please focus on the problem I described in my first post: The sprite follow an approximation of the pathfinder path and this approximation goes over obstacles.

  • I've took a look at this file. My .c3p is also heavily based on the example from Construct.

    [...] you are missing a lot of the cells, especially where you 'go through the obstacles [...]

    I don't understand what you mean. On line 1 of my example .c3p, if you enable the action "background: Set Invisible", you'll have a good look oat the obstacle cells (the red ones). Pictures in my first post also show all the cells in the layout.

  • You are right: With a cell border of 20, it doesn't go over obstacles.

    But it still go over obstacle cells. And the sprite's path approximation is still far from the pathfinder generated path. Also, doing this prevents the player to go near obstacles. In this case, it's not the wanted behavior.

    Of course, I'm still trying things on my side.

  • I added the .c3p in the first post.

    I took a look at the tutorial you suggested: I'm basically doing the same thing so it doesn't help me.

    I want my sprite to move more closer to the pathfinder path. It there something I can do?

  • I'm playing with the Pathfinding Behavior. I'm planning on using it for a point & click kind of game.

    Found paths are all valid. The problem is when the sprite "Move along path". It doesn't move exactly on or near the path. It follows an approximated path based on the pathfinder results.

    Problem: The approximation goes over obstacles.

    Question: Is there a way to adjust the path approximation to follow more closely the pathfinder generated path?

    .c3p used: pointNclick.c3p

    Images to illustrate this:

    Legend::

    Red square = obstacle cell

    Green square = unobstructed cell

    Grey rectangle = player

    Small Red point = pivot of the player

    Black line = pathfinder generated path

    Purple line = Path followed by the player

    Thanks you for your help.

    - EDIT: Added an example project -

  • You are all awesome!

    Even if there is no clear and definite answers, I do understand better how everythings is tied together.

    Ok, so here are key points I could outlines from your answers (in no specific orders):

    • There is no secrets (i knew it! :) ).
    • Games should not depends on addons processing timing. (I don't totally agree but I admit it's definitly good wisdom for majority of cases.)
    • There is no standardize order in which any plugins, behaviors and triggers will happens.
    • Behaviors updates in any order before and after events. It depends on how they are implemented.
    • Behaviors can be hand made with events and it's sometimes a solution. ( Good idea! )
    • Draws happens after everything.
    • I'm not sure if the info I found in the link shared by R0J0hound is still valid with C3 runtime but it kind of confirm everything.

    Did I slip a mistake in my list? Did I forgot a point?

    Alright! I've got something to work with. I guess I'll go deeper and read the SDK manual now. And maybe dig C3 and see what's under the hood.

    Thanks to all of you!

    I appreciate it.

  • As I wrote in my first post, I did read the manual. So yes, I know already what is explained there. I haven't find what I want to know in the manual. If my answer can be found there, I'll be happy to follow a link and read more.

    Construct is mainly a set of events, plugins, objects and behaviors. Events run top to button but triggers runs when they are triggered and functions when they are called. Simple.

    To clarify what I'm looking for:

    Let's say an object have a behavior. At what time during a tick this behavior will be process? Before the events sheets? During the events sheets? After the events sheets? Before drawing to screen? While drawing to screen? After drawing to screen? ...

    When a trigger is triggered. This event is process at the time it triggered? Before the events sheets on the next tick? After the events sheets on the next tick? ...

    I understand it's not an easy question. Maybe there is a flowchart somewhere. Maybe it's super secret classified Scirra enterprise stuff. Or maybe no body knows.

  • I posted this bug report and it was not really a bug. I misunderstood how everything is processed during a tick.

    From what I understand from Ashley's answer to my bug report is that when I access a system variable, I do it before any behaviours. So if a behaviour change any system variable it will do it near the end of the tick and after an event accessed it. This way the new value can be read on the next tick. It's good to know. Now I'm curious of how everything is linked together during a tick. Specifically: In what order everything updates during a tick?

    Note: I already know what the manual says about events. What I want to know is more in depth (I supposed).

    Thanks!

  • GameeApp Your iOS app is not available in the Canadian App Store. Do you plan on making it available soon?

    Thanks

  • Is there a way to use your predefined controllers as seen on this page ?

  • Construct 3 LiteTween minor bugfix

    I corrected a minor bug affecting display of behavior event in the event sheet.

    Image of one of the display 'problem': image

    Image after the bug fix: image

    I incremented the addon version to 1.7.0.1 so we can update it in C3 smoothly.

    Here is the new file: LiteTween v.1.7.0.1

    lunarray : If your good with this correction maybe you want to update your first post. Thank you for this addon, it's really useful.

    : Good work your port gave me the opportunity to work on my project in C3

  • Of course You need to prepare these things:

    - a database on your server.

    • some scripts on your server to read/write scores
    • a simple interface in C2/C3

    -=WARNING=- I did not implement something fancy, it's fairly simple so there is some security stuff to address. I've cleared some basic consideration about this security, but I definitely did not cover everything. I'm not an expert. It's also important to know that someone wise enough can definitely inject score in the database without playing the game. So, you've been warned. -=/WARNING=-

    Database

    You need a place to record your scores.

    • Create your database. (I personally did it through my CPanel.)
    • Create a table. (I did it manually with PHPMyAdmin). Mine have four columns : id, section, name, score.
    • Give your DB a strong password.

    PHP

    Here are the files I'm using. I will not explain them, if you don't know how it works, you will have to do some research. But basically, in each text file, replace the DB username, password, DB name and table name with your own. Those files can be placed anywhere in your project files export. Just take note of where you put them.

    PHP files

    Using this setup in C2/C3

    Here's a basic capx exemple: exemple

    NOTE: I haven't test this capx, but it should work.

    I hope it helps you. Have fun.

  • Yes, you are right. This is a browser limitation but when you add your web app to your home screen on your mobile, the application goes fullscreen right away when requested through code. Well, it's the expected behaviour.

    Yes, it's true, when you build your app and run it as a normal mobile application, everything works great. But an advantage of Construct(2/3) is the opportunity to preview your project without compiling/wrapping within a native mobile application.

    So we are back at the original problem: When using C3 preview on mobile, requesting fullscreen at start of layout doesn't work. But when previewing on mobile from C2, requesting fullscreen at start of layout do work. I did some test with a barebone capx in C2 and C3 and here are the results:

    iPhone/Nexus5 - C3:

    iPhone C3 Preview Screenshot

    Nexus5 C3 Preview Screenshot

    iPhone/Nexus5 - C2:

    iPhone C2 Preview Screenshot

    Nexus5 C2 Preview Screenshot

    Project files:

    Construct3 file

    Construct2 file

    Please note that both file contains exactly the same code and have exactly the same settings.

    There is a difference between C2 and C3 previewing results.

    Now, how can we solve this? is it possible with C3 right now? Do I have to report this as a bug?

    Thanks you dop2000 for your help by the way. I appreciate it.

  • If I understand well, I need to put a debug button in my project to get my app to request full screen. I don't like this idea.

    In C2, I was able to request full screen without this kind of work around after adding my app to the home screen. There is technically no reasons for this behaviour not to exist when using C3 since both previews are based on the same technology.

    Is it a bug then?