Exodus Software's Forum Posts

  • Not sure if this is an issue or not, but I figured I'd ask to see if anyone else has run into this. I've looked around and haven't found anything, but maybe I just haven't looked hard enough. I considered making a bug report, but I can't imagine this is a bug because it seems far too basic for that.

    Before anything else I should say I'm on version 178 Beta, for C3. Anyway, if I put a timeline in a project in C3 and then try to use the in game "save" action the game just crashes. Its one of those crashes where everything just freezes up and you can't do anything but close the window. This happened in both the desktop version of the game and in chrome. I ran the project in chrome only because you can use developer tools to sometimes get an idea of what happened in your code when C3 crashes like this but in this case I don't really know what the error message is saying, seems like it can't read the timeline to save it or something, image of the error code below.

    I'm also attaching a capx that I just threw together, mostly just for posterity to show I'm not doing anything crazy with timelines, link below. Just press 's' which triggers a save and it should freeze. The sine behavior on the sprite is just serving as a visual representation of the freeze.

    drive.google.com/open

    Like I said before I can't imagine its that broken, unless timelines were just never meant to work with saving, but I find that hard to believe. I'm assuming that I'm somehow doing something really stupid and breaking things as a result. If anyone can clue me in I'd appreciate it.

    Tagged:

  • Thanks for the insight. I did check if multiple NPCs were starting at the same time but that isn't the case. While most of the start times in the schedule events are similar (since they are on the hour or half hour) each event gets off-set by the time it takes an NPC to travel there from where they are so they end up getting randomized. I put a for each in the "on path found" just in case, but no luck.

    If I had to guess I'd say you are probably right. The pathfinding in my game is fairly complex and it wouldn't surprise me if I broke it somewhere along the way. Honestly though I think I'm just going to make my own pathfinding system and ignore C2's. I think if I set up some stuff manually it can be done easily.

    The way this game is set up doesn't really play well with the pathfinding engine anyway. There's lots of jumping around since NPCs are going into and out of buildings and those interiors are actually placed across the map so they have to teleport there then path again, it all sort of becomes a mess. Not to mention just pathing across like the massive layout feels like it would invite problems.

    Anyway, thanks for your help, but I think I'll just do something a little different to cover the issue, I mostly just wanted to make sure there wasn't some weird C2 bug regarding families and the pathing behavior.

  • First off, thanks for your reply. That is actually exactly what I'm doing. I'll try to tell you what happens in the code, hopefully that can better explain what happens. The one thing to know preemptively is that each NPC has a schedule telling it what to do. The schedule is stored in an array and broken up into events. So the first event in the day would be like walk to your kitchen table, or something. Once the NPC has done that it will grab its next event which also has a time that it should execute. Once the game reaches that time it will perform the next event, so on and so forth.

    Without delving too deep the basic logic is as follows.

    1. Call initial event to tell each NPC to grab its very first event in their schedule.

    2. Each second there is an event that checks if any NPC should be starting its next event.

    3. When the prior step triggers a function is called which passes the NPC UID.

    4. This newly called function does a few extra things but then using the NPC UID is was passed tells the NPC to find a path.

    5. Last there is an "on path found" trigger that tells the NPC to move along its path, I will say that this "on path found" event doesn't reference any UID, I figured it didn't need to since only one NPC should ever have "found a path" at a time.

    Another note for step 5, from what I've seen only one NPC can be finding a path at a time, so I'm assuming the engine should know exactly who found a path without needing to reference a UID. If one gets stuck trying to find a path it holds up the rest until it is done. From what I've read, assuming I've read right, this is intentional for C2.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Not sure if this is the right place to ask but I thought it was worth a try. Maybe this could be considered a bug, but I don't know nearly enough to post there.

    Basically, my question is about the pathfinding behavior and families. I'll try to keep it simple for this question. In short I have NPCs in my game that need to navigate around the map on a schedule. I am using pathfinding for this. All of these NPCs are in one family, the pathfinding behavior is attached to that family not the individual NPC. The NPCs are pathing around solids and not some crazy custom settings. The only other thing they are told is there is a tilemap overlaying the game world that has a cost. Basically this tilemap just keeps them on roads and prevents them from taking the quickest route to their destination.

    The problems seem to arise when there are more than one NPC in the game world. For whatever reason pathfinding seems to grow volatile. Seemingly at random when an NPC is told to find a path it will sometimes take around 15 seconds to find it, other times finding the same path will be instant. Sometimes NPC's just calculate their path forever. I also can't say for sure but I'd swear I've seen the wrong NPC trigger the "On Path Found" event. There are also times when NPCs just ignore the tilemap that has cost attached and walk through it, this seems to only happen when there are multiple NPCs in the game world, if there is one the NPC will follow the tilemap cost.

    The best I can describe it is it feels like the whole system is breaking down. As far as I can tell there is no problem when there is only one NPC but if you add in more it all becomes shaky, I say shaky because like I said the errors seem to occur randomly.

    I guess my question to anyone out there is, has anyone had similar issues? Are there known issues when combining pathfinding and families or is my code just bad (which I'm willing to believe)? I'd post the capx but its massive and I'd rather not just put it out there, also the system surrounding pathing is complex enough that I can't just recreate it in an example. The only other relevant piece of info I can think of is that the game is a one layout game, I was told C2 could handle it so I took the devs at their word, the layout size is 20184, 9664. If anyone has ideas I'd welcome them, otherwise I'm gonna get to work on making a custom pathfinding solution.

    Colludium Yeah, I have no idea how to do that, I just spent a half hour trying to figure out how to open the debug menu in visual studio but it doesn't seem to exist.

    Even the part about the access violation being the cause of the crash?

    Agreed, that's fine, I just looked back at that post and from what I'm getting the only thing left to do is jump back to r265 and test. It may be a little hard for me to find time to have an extended session on r265 but I'll see if I can do something with it when I get a chance.

    At this point I'm sort of wondering if its even a widespread issue anymore. Seems like no one else is really replying so maybe its something specific to my computers at this point. That or people are just staying quiet/not on the forums.

    On a separate note you may want to look at this. I was going to look into some application monitoring stuff and found something called "reliability monitor" that apparently is built into Windows. Anyway, maybe this is useless to you but it tracked when C2 crashed the other day, below the report it gave. Might be useless information for you but on the chance it isn't here it is. Also one last note, the only important sounding thing I saw was the "Exception Code" that's listed, I googled it and according to google that code is passed when the program in question accesses memory it doesn't have rights to, so I guess its something related to that.

    Description

    Faulting Application Path: C:\Program Files\Construct 2\Construct2.exe

    Problem signature

    Problem Event Name: APPCRASH

    Application Name: Construct2.exe

    Application Version: 2.0.0.0

    Application Timestamp: 5cc70180

    Fault Module Name: Construct2.exe

    Fault Module Version: 2.0.0.0

    Fault Module Timestamp: 5cc70180

    Exception Code: c0000005

    Exception Offset: 00000000006cbd1c

    OS Version: 10.0.17134.2.0.0.256.48

    Locale ID: 1033

    Additional Information 1: 379a

    Additional Information 2: 379a7b5ebf6f82bcefd8e8ce707a4819

    Additional Information 3: 9ecf

    Additional Information 4: 9ecf75b42781a6e5b426653fc27c1b7c

    Extra information about the problem

    Bucket ID: 051aab5b4d221a6a2899034bbc76537b (1772451552166302587)

    Possibly a dumb question but you say the only thing that happens when you zoom in and out is that openGL redraws itself which seems reasonable. Does anything happen when you click on a layout just to get focus on it so you can zoom in and out. I don't know if that's a thing but I believe you have to click in the layout before you can actually zoom in and out of it. Does that initial click trigger anything? I only ask because I clicked and then immediately tried to zoom in so if that first click does anything significant it could have been that triggering the problem and not the zoom.

    Again sorry if that's a dumb thing to mention, I'm a bit out of my depth here.

    Ashley Just an update for you. Switching C2 over to using generic icons hasn't changed anything. C2 crashed once about 2 hours from the copy-paste bug I was talking about before. Just now it crashed again. This time I had minimized a chrome tab, then re-maximized C2 and tried to zoom into a layout via the mouse wheel. It never zoomed in and then just closed.

    I've been thinking for the past few minutes but I can't think of any reason zooming in would cause C2 to close. The only tangentially related thing I can think of is some sort of bug with C2's UI or how it handles rendering layouts. Anyway that's all I got if there is something you'd like me to try I'd be happy to, otherwise I'll keep going and see what happens.

    Hello Ashley, thanks for the quick reply. I don't know about everyone else but as far as system specs go I can at least give you mine. I don't know how in depth you want so I'll just hit the basics. I have a laptop and desktop both of which crash, specs are below.

    Laptop

    OS: Windows 10 v1803

    HDD: Sandisk SD8SN8U 128GB SSD

    RAM: 8GB

    Processor: Intel Core i5-6200U

    Graphics Card: Intel HD Graphics 520

    Desktop

    OS: Windows v1803

    HDD: Reactor 1TB SSD

    RAM: 16GB

    Processor: Intel Core i5-4760K

    Graphics Card: Nvidia GTX 1080 4GB VRAM

    As a small aside I just checked my drivers and everything is up to date regarding graphics cards at least on both machines.

    I also just changed my preferences to not show unique icons, I didn't even know this was a thing or that the Windows GDI had a hard cap. It's possible at least that this was causing this issue for me I'll try to reply if I see the problem go away. Thanks again for the help.

    Ashley Per your request I'm making a new thread about this since the old one is irrelevant at this point and you are right, its pointless to pile onto that thread about v267 since that isn't the current version anyway.

    I'll do my best to describe the problem. I know the Construct team is looking for a concise answer on what is causing this but after reading through the previous thread about v267 I've come to the conclusion that no one really knows what is causing it because the problem cannot be consistently reproduced.

    So here goes, I'm currently using Construct 2 v269, the non-steam version. At random intervals the program crashes. I won't comment on if it happened before v269 because I honestly don't know and I don't want to confuse the issue. I can usually tell it is about to happen because C2 will become unresponsive for about 3 seconds or so and then close with no messages about what happened. Below are the times that I have had this happen to me. I will obviously say that Construct 2 does not close itself out every single time you perform one of these actions, but these do seem to be the operations that trigger the problem.

    1. Auto-save: Personally, I disabled auto-save a while ago because there was about about a 1 in 4 chance that the game would finish auto-saving then stall for a second, then close. It clearly finishing performing the auto-save because I could go to the auto-save file and it would be up to date. This seemed to be the most consistent thing that crashed C2.

    2. Image-Editing: When using the image editor C2 would work fine until you closed the editor. So you could upload or add an image in, do your editing, make more frames etc, all no problem. Once you closed the editor there was a chance, again not consistent, that C2 would just close itself out.

    3. Copy-Paste: Copy-Paste in pretty much any setting (excluding the image editor) seems to cause issues. By any situation I mean copying events or actions, or something like making a duplicate of an object in the project bar. I will say in this case using the copy command (Ctrl+C) never seems to crash C2. It's when you paste something you copied that C2 crashes. Again as usual you will hit (Ctrl+V) the game will stall for a second without pasting anything and then crash. As for duplicating objects you click "duplicate" and then it stalls and closes without making the copy.

    Those three things are the only things I know of that crash C2 on a regular basis, perhaps there are others but I'd rather not muddy the waters any more than they already are. At the moment I am working in C2 about 8 hours a day and I'd say I see anywhere from 2 to 4 crashes a day. I've basically just started quick saving like I'm playing Skyrim to avoid losing work at this point. If people reply to this thread saying other things crash C2 you may put some stock in it. Its possible that other things crash the program but, if you are willing to take me at my word, these are the things I can see really causing an issue. I know you don't want to go on a wild goose chase through the engine, but it is basically making C2 unusable at this point.

    For my own thoughts, if you want to hear them, it seems like something is being bogged down in the engine. The capx I am working with is 7,222kb, suffice to say its got a lot of events and sprites and things. Perhaps this has nothing to do with it but it seems to me that the engine is either hitting an error that doesn't hav a catch somewhere in the code, or there is something about larger projects that it can't handle. That's a shot in the dark obviously. My only other guess is the inconsistency in the problem could suggest something like a memory leak in the code or something that builds up over time, or maybe its something to do with how C2 uses RAM. Based on what I've read and my own experiences C2 never crashes quickly after launching it. It always seems to be something that happens after an hour or two, and once it closes and reopens you get another good amount of time out of it. All three of the triggers described above would likely take a more sizable chunk of memory to perform the actions so maybe its something to do with how it handles memory on a larger scale, sorry I know that's not really much help.

    In any case I've already wrote more than people want to read. I'll probably jump ship to C3 soon, but I figured I should put in my two cents before I do, maybe it will help the people sticking with C2. On a final note, I know these are supposed to have a capx attached. The only capx I have is the game I've been working on for about a year so I'd rather not post it publicly. If you have some way I can send it to you privately I'd be happy to do so, although like I said before it seems that this problem can't be reproduced consistently so I don't know how much it would help you. Not to mention you need to be actively working for a while before the game will crash. In any case thanks for looking into this I know a lot of people want this fixed but I understand asking someone to tear through an engine to look for one problem that can't even be clearly identified is nearly impossible.

    As one last thing, and I'm sure you have people to do this for you anyway but I figure I'll offer. If you have some sort of terminal like program that monitors C2 as it runs and records everything C2 is doing that might show where it is crashing. If you have some sort of development program like that I'd be more than happy to attach it to my C2 and send you the logs. Obviously, that's hypothetical based on if C2 even has that, in my experience a lot of programs have a system for debugging so I thought I'd mention it. Anyway, good luck, and thanks.

  • Alright, since increasing the timescale to such a high amount breaks pathfinding I had to think up another solution. I've gotten a lot of help from people on these forums so I figure its my turn to pitch in. In case anyone in the future needs it there is a capx linked here that simulates pathfinding when the timescale is sped up.

    Fair warning it doesn't really look pretty in game so if a player is going to need to see this happening it probably won't look good. The capx has more details and notes but basically what it does is calculates a path and then uses the nodes that are created to calculate distance between those points. Then based on the objects pathfinding speed the object sets to position to each node in order via a timer. Hopefully this helps anyone else having this oddly specific problem.

    drive.google.com/file/d/12u4MBbLXb9iQ7eBEva6bNPXthicHSXmB/view

  • Thanks for the quick replies. As for dop2000's suggestion, I think that would work if the problem was it stopping in the right place, the issue I'm having is on the way to the end of the path the sprite bugs out. Although I do think that logic would work for problems at the end of the path.

    Ashley, thank you again, I'm sure you are busy with far more important things. It's good to know that you can't increase the timescale that much. I never read anything about a limit on timescale so I assumed it could handle anything, which in hindsight was dumb of me. In any case I made a bug thread out of this issue because after I made this I experimented more and figured if it really was a problem I should report it. That bug thread that I made did link a capx file with an example, I'll give the link below. I don't really expect a fix since like you said the engine isn't meant to handle that speed but in case you wanted to see its below, thanks again.

    drive.google.com/open

  • There was no template so I hope I'm entering the info needed here. For reasons I cannot explain increasing the timescale seems to break pathfinding. Basically I'm trying to make a system similar to waiting in Elder Scrolls, where the player is idle but NPCs and events still happen around them.

    What ends up happening is the sprite that is pathfinding around the layout ends up getting stuck on nothing or going in circles endlessly for no real reason. It seems to happen at random when the timescale is more than 1 and like I said it doesn't even need to be hitting another object to glitch out. If the sprite is glitching out you can lower the timescale back to 1 and it will fix itself immediately.

    This problem only seems to occur when increasing the timescale. Originally, I increased the timescale to 100 which broke pathfinding 100% of the time from what I remember. I lowered the timescale to 50 and now I still get issues a vast majority of the time, the last 5 tests I ran all showed the issue at least. I've tested in all browsers and the results are the same, most of my testing has been done in NW.js though since that is what the game will ultimately use.

    The link to the capx is below, I haven't used drive in a while so if the link doesn't work let me know.

    drive.google.com/file/d/1G2ceNARBdTwTZMpv7RIhPdsYQ3EGuGr2/view

  • Hello Ashley, I'm making a new thread about this because the other thread (linked below) is older.

    Old Thread

    construct.net/en/forum/construct-2/how-do-i-18/pathfinding-behavior-handle-138787

    Sorry if I'm doing this wrong I've never posted around here. I figured I was alone on this or it was something with my code, but there does seem to be a problem with Timescale and Pathfinding.

    In short its the same problem the previous user had, if you increase the timescale objects seem to get stuck or in my case go in small circles endlessly.

    In my case I'm trying to simulate a speed up for sleeping, so while the player is asleep other things still need to happen, mostly NPCs moving around and such. Since I don't want them to wait forever I currently have the timescale set to 50. I've observed characters walking around during sped up time and it isn't entirely consistent. Sometimes they do fine and other times they just glitch out at seemingly random spots and go in circles. Sometimes they find a way out of their glitch and continue on but its very much a problem. I can also confirm that watching NPCs walk around at normal speed in the game they never have issues.

    Another note is that I had the timescale going at 100 times speed originally but the problem basically happened all the time so I dropped it to 50 and thought it had been solved.

    Personally, I get what you are saying, based on how events are run, at least from what I understand, everything should still go in order just a lot faster. It doesn't really make sense that speeding up the timescale would break it. In any case if you have any insight or fix for this I would appreciate it, thanks.