R0J0hound's Forum Posts

  • Nothing comes to mind. I know the editor can have an issue if you have a huge amount of object types. Well, it's actually a Windows issue that limits the number of icons. Still there's a setting in C2 to fix this, and considering CC is probably subject to the same limit then this is a non issue for you.

  • Well I was bored and had a quick look through C2's js files. Creating and destroying seems straightforward but it gets more complex dealing with global objects and global layers.

    Are you using any global layers? my best guess is the issue may be with that somehow in conjunction with saving/loading. I'm just speculating though based on what you've said.

    Being that it isn't reproducible it's not really something that can be reported to the bugs forum. Still I'll tag Ashley to at the very least get the issue at the back of his mind.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Gutogordo

    The clear canvas action?

  • Interesting. Well I'm pretty sure the assignment of uids is done in only one spot in the runtime and that's when an object is created. Other than that the uid isn't modified anywhere except maybe the save/load code.

    If I'm bored over the weekend I might poke around the js files and see what there's to see.

  • That should never happen. It's a bug if it happens with vanilla c2 features. Are you using any third party plugins, and if so which ones?

    Edit:

    Not that there have been any plugins that cause this that I know of. The idea is to isolate what is causing the issue. If it is happening reliably then you can make a copy of your capx and start removing stuff till you have a minimal capx that still causes it.

  • I found the angle here based on the closest edge or point on the collision polygon, but then if you have that then shooting a ray is excessive. In short even though I thought it over casting rays isn't useful to solve the problem. The most I can think of is to shoot a bunch of rays out and picking the closest one, but that is imperfect.

    The sliding is done by correcting the overlap oppiset the angle chosen and the canceling the velocity going in the direction of the angle. That can be done by utilizing a dot product.

    The algorithm I used can be made faster by not checking far away objects and/or implementing it in JavaScript. A plugin may be ideal but to me that's a pain to make and maintain.

  • C2 internally recycles objects so that creating/destroying objects creates a minimal amount of garbage. That said have you measured if you get better performance with what you're doing? I've done stuff that creates/destroys hundreds of sprites every tick without causing more gc pauses.

  • Closer to what you want look at xlsx files. They are zip files of xml files and other things like images.

    You could use something like this to manipulate the zip file from js

    https://stuk.github.io/jszip/

    Then either by looking at the file format spec or disecting some simple xlsx files it should be possible to see how it's done. You could also look at some xlsx JavaScript library but I'm not sure images work with them.

  • Yes, I mentioned a blend mode way in my last post that should work. I'll try to make an example this weekend. Besides that all the other methods can be done without third party plugins with varying levels of difficulty. The ray caster can be replicated with events but it will be mathy. The drawing of the shape itself either requires custom js injected with the browser plugin or clever positioning of sprites.

  • ultrafop

    I can't open your capx right now but if you made the variables local you also need to make them static. With just local the variables will not save their changes.

  • As far as automatically converting the project over there is nothing that does that. I had something that did that with very early versions of C2 but I never updated it. I did make a python library, capreader.py, that can be used to access everything in a cap file. It could be useful for making a conversion program but I never got around to it because a perfect conversion is hard.

  • If you install construct classic you can open the cap file and look at the events. It should look much like c2 events so you usually can copy everything over. I don't have access to either software right now so I'm unable to do it or even see what I did.

    On the other hand this is a pretty old solution and you'd probably get better solutions by posting in the c2 section of the forum instead. There's a lot of creative c2 users that may just not read topics in the construction classic section.

  • Have you tried a reset? Alternatively open the task manager and see if any of the previews are still running. Eg temp.exe temp2.exe etc...

    Otherwise I have no ideas about the issue

  • This topic may be useful

    You may also be able to do it with the light object and blend modes.

    Make a layer not transparent and put the light object on it.

    Give the light object the destination out blend. Then add a Sprite for the view cone to that layer and give it the destination in blend.

    I could be confusing the blends but that's the general idea.

  • Modifying c2runtime.js isn't really feasible. When the project is exported the JavaScript of the runtime and plugins are minified so they aren't readable, but on top of that the events or logic of the capx is probably in data.js and that is only readable by the JavaScript portion. In short it's not worth the effort to reverse engineer the export to be able to make changes.

    The most I've seen someone do is change a setting after an export.