hopeslicer's Forum Posts

  • 11 posts
  • Hey Ashley,

    I am sorry but it seems I was wrong about the issue.

    I think that the root of the problem is the pathfinder behaviour which has as obstacle a tilemap with the solid behaviour.

    Here is how it looks: (the gray row in the taskbar is the preview tab)

    Subscribe to Construct videos now

    &

    Capx file

    The idea is that whenever Find Path is invoked the memory usage spikes a few mb's depending on the path length.

    It is a bad practice to use pathfinder and tilemap like this or is there another problem?

    Later Edit: I have managed to reproduce this issue on the pathfinding examples so I guess the tilemap is not the problem (?)

    From what I've tested this does happen on Mozilla and IEdge aswell.

  • Hello,

    I have a plugin which continuously spawns object instances using the _runtime.CreateInstance function from the SDK Documentation.

    Apart from the fact that Construct does not trigger the On Created event of the said object there appears to be another problem related to memory leaks.

    Whenever I create a new instance the memory usage of the preview tab goes up by 2-3 MB everytime which in the end causes the tab to crash with the "Not enough memory to run this page" error.

    Here is the instance creation code I use:

    	CreateInstance(enemy, x, y)
    	{
    		var obj = this._runtime.GetObjectClassByName(enemy.ShortName);
    		var inst = this._runtime.CreateInstance(obj, this._spawnLayer, x, y);
    		inst._instVarValues[0] = enemy.Health;
    		inst._instVarValues[1] = enemy.MaxHealth;
    		inst._instVarValues[2] = enemy.MaxHealth;
    		inst._instVarValues[3] = enemy.MovementSpeed;
    		inst._instVarValues[24] = enemy.BulletResist;
    		inst._instVarValues[25] = enemy.CorrosiveResist;
    		inst._instVarValues[26] = enemy.SlashResist;
    		inst._instVarValues[35] = enemy.Bounty;
    	}
    

    There might be something faulty with how I handle the runtime methods so any help regarding this issue will be appreciated.

    Also, here is the entire Plugin Addon I use if that might be of any help.

    Thank you!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh, I used this when I was still in addon dev mode and commented it out. (used it wrongly tho 'copy-to-output' type)

    But now it makes sense, thank you Eren .

  • *Update #2*

    I think I got it working by providing the web server path to my file. (http://localhost:xxxxx/c3runtime/name.js)

    So far it is only working in a dev testing environment, I have to do a little more digging to get the path once the addon has been normally installed. (for preview mode)

    Now my question is reduced I think to how do I "inject" a js file into my construct 3 application or project without the need to copy it manually.

  • *Update*

    I got this working after I exported the project as nw.js and copied the script file inside the application folder.

    It seems the thing that I got wrong here is the placement of the script file as it should be part of the application (even in preview mode), I think.

    Can somebody explain to me what I should do from here? Is there any command or 'folder' where I can place my script file in order to be fetched in preview mode?

    Thanks.

  • EricVBailey

    Go to View->Start Page and search for 'Game Recorder' then open the project.

  • I am trying to create an async Pathfinding behavior but I can't get the jobworker to ..work.

    I've been pretty much following the official implementation (official pathfinder plugin) on this part since I haven't found any documentation related to async/jobworkers and such.

    I have a js file inside my c3runtime/ folder and after I've added it to my addon.json file-list, I've been trying to create a jobworker inside my c3runtime/behavior.js like this:

    but the game fails to start and the browser prompts me with this error:

    I am using Web Server for Chrome with CORS Headers checked but I don't think this is the problem since the first error is a GET FAIL.

    Plugin files: ufile.io/k7owm

    Thank you for your time.

  • I didn't know about the suggestion page.

    Well, I'll keep it to myself then and post my suggestion hoping they will take it into consideration.

    Thanks again!

  • Thank you, dop2000!

    It worked!

    I'll upload my modified pathfinder later for those interested under another name so it won't conflict with the official one.

  • Hello,

    I want to modify the current Pathfinder Behaviour but unlike Construct 2 the plugins are packed (.pak) and I am pretty much unable to access them.

    The current pathfinding has a 'rabbit' moving 3 ticks ahead of the instance, thus the instance instead of going to the node steers towards this 'rabbit' often leading to incorrect pathing. ( mostly when the speed is high and the 'rabbit' is past the current node and 2+ ticks ahead).

    Anyways, I've managed to correct this issue in Construct 2 and I want to do the same for my current Construct 3 project but I am stuck.

    Is there any way I can access the pathfinder behaviour files in Construct 3 or another alternative to the current pathfinding?

    I wish there was a bit more control over this behaviour.

    Thank you for your time!

  • Problem Description

    As many other users pointed out, NWJS refuses to close after exiting my game.

    I believe I found out what's causing the problem and that might be related to the music files whithin my game. Whenever I play a music file (only tried with OGG so far) from the Music Folder this bug occurs.

    Attach a Capx

    Don't really know how can a capx help in this situation.

    Description of Capx

    ...

    Steps to Reproduce Bug

    • Import Music File (OGG or any type)
    • Play it on any layer
    • Open Task Manager

    Affected Browsers

      NWSJ Desktop

    Operating System and Service Pack

    Windows 7 64-bit

    Construct 2 Version ID

    C227

  • 11 posts