R0J0hound's Forum Posts

  • I’d say just make the request and be descriptive of what it should do.

    Like as a start:

    A way to make paths in the editor as well as during runtime.

    The paths are made up of line and curves connected by movable positions.

    A way to save and load the paths during edittime and runtime would be useful too.

    A way to move along the paths. Could existing behaviors be used with it.

    Something like that at least. I don’t think I covered everything you’re after.

    They can change anything they like since they control the engine.

    Users and third party plugins are were things can be less feasible and require more optimal creativity to work around limits.

  • I’ve tried looking into svg files to get path data and didn’t find it useful. But if you have a program that lets you just draw paths and save it as svg then maybe.

    You can make plugins and behaviors that share information. Shadow caster and light come to mind. But I can’t really think of other official ones. There’s the solid behavior and other motion behaviors but that’s mainly because solid is an engine feature.

    I get the impression that they want most all plugins to be self contained and have all interaction between them to be done with events. Understandable from a maintenance perspective.

    That said, being able to pass more around in events than booleans, numbers and text would be useful.

    Or closer to what construct already does you could request those plugins to provide jsons of the list of points to save and load. At the very least one value at a time would let you do it manually.

    The first part of moving between xy positions with lines and curves is probably the simplest.

    Anyways, I’m not sure my input was super helpful. It’s probably doable but I never make requests so I’m not sure how interested they’d be in in doing it.

  • The idea is you start at the enemy and move by steps toward the player and stop when a wall is hit.

    You can do all the steps with a loop.

    Here’s one such example. The max width of the laser will be 300.

    Every tick
    — set laser position to enemy position 
    — set laser angle towards player
    —set laser width to 0
    
    Repeat 300 times
    — set laser width to laser.width+1
    — Laser overlaps wall
    — — stop loop

    Alternatively you can use the ray cast feature which will give you the position where a ray hits an object. The just use the distance expression between that point and the player.

  • Yeah the Gullen Bros are cool people.

    I don’t work in game development, so this is just for fun. This is pretty much the only forum I post in. I don’t have a blog or any social media, although a blog could be fun someday.

  • Glad it’s helpful!

    I don’t have a c3 subscription but they were generous in giving me a few years free a while back. I didn’t really use it too much though. I’m perfectly happy with the free version for how much I use it.

    I like the construct products for the rapid prototyping aspect of them, and I enjoy helping find solutions on the forum. Apart from that I don’t really ever export or make full games. So the limits of the free version are no issue at all.

  • Glad it’s working now. Those tiny typos get me all the time. I only saw it after I started removing stuff.

    Thank you kindly for the offer but I don’t have anything for donations set up. It’s fun for me to help out from time to time.

  • Found what was causing the issue.

    You had:

    set a to angle(player.X,player.Y,obst.y,obst.y)

    it should be

    set a to angle(player.X,player.Y,obst.x,obst.y)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That sucks.

    I’d say if you can, don’t run that pc anymore for the moment. At least don’t boot into Windows so the virus can’t run.

    If you have access to another pc you can make a bootable usb. Then you could boot into that instead of Windows so the ransomware can’t do more damage. That way you can also get at your files.

    I’ve used something like this before when one of my PCs took a dive.

    livecd.com/index.html

    To boot from a usb drive instead of a hard drive you reset the computer and as soon as it turns on you press the f10 key or something like that to open a boot menu to select what to boot from.

    I’d say once booted into the usb drive you can copy over all the files you want to keep, even if encrypted already. From the looks of it lots of these randsomwares eventually get figured out so you can decrypt your files.

    Also from the usb drive you could scan the computers hard drive to see if it can find deleted versions of the files before they were encrypted.

    Anyways once done with that you could factory reset your computer hard drive. It usually is a boot option now a days. That will wipe your hard drive and leave you with a clean Windows install.

    Anyways, just some ideas.

  • I thought only those four files were encrypted? Did the rest of the folders get corrupted too or are the files in them intact still? If they are intact those steps should work. The google keys is separate.

    On a side note have you been able to remove the virus that is encrypting the files? If it's still live that's not good.

    edit:

    looks like there are some guides on how to remove the virus. For free looks like it is a bit more involved.

    To decrypt the files I didn't find any decryption tools for that, but one site recommended doing deleted file recovery. Basically the the old version of the file is in limbo in the file system, and could be possibly recovered if it hasn't been overwritten. Anyways, just throwing some ideas out there.

    The whole thing sounds like a real pain.

  • Surely there is some law enforcement trying to catch people like that. And while it's true you may not get results in your particular case here, long term with more info investigators could put two and two together and get those criminals. Anyways, I just haven't looked into it.

    Apart from that here is how you could remake the c3proj file. At least most of it, some info is lost in the corrupted one, but at least it should open in construct and you can fix the remaining parts there.

    1. Find out all the plugins you used.

    Look in the objecttypes folder, open each json file and the third line of each will be "plugin-id": nameOfAddon.

    2. Create a new c3 project and add one object of each plugin you found in step one. That includes behaviors.

    3. Save that project and get it's c3proj file and put it into your project folder you want to fix. We won't need the rest.

    4. Next open up that c3proj in some kind of text editor. Look for each of these sections:

    objectTypes
    families
    layouts
    eventSheets
    sound
    music

    for each of those it will look like this:

    "objectTypes": {
    	"items": [
    		"Sprite",
    		"a"
    	],
    	"subfolders": []
    },

    Then what you do is put a comma separated list of the filenames of that folder in between the [] after items.

    So for example if your object types folder had: cat.json, dog.json, array.json. you'd do this:

    "objectTypes": {
    	"items": [
    		"dog","cat","array"
    	],
    	"subfolders": []
    },

    5. once that is done you should be able to save the changes and open that file in C3. Barring any typos.

    All that's left is you will have to change the project properties from your memory to what they should be.

    Also if you used any containers you'll have to manually re add them since that info is lost.

    Hope that helps.

  • The c3project is json based as I recall, and since everything else is intact it should be possible to rebuild it.

    You can get the basic structure by making a new project and saving it to get its c3project file.

    Then just manually add all the relevant parts. I think it’s mostly just a list of object types, event sheets and layouts. It may just list everything else in the the sub-folders though, I haven’t looked yet.

    Things like project settings you’d have to redo.

    Those ransomware virus’ seem like a real pain. If you can report their info somewhere hopefully they can be brought to justice. As is I wouldn’t pay them, but that’s just me. I doubt I’d get what I paid for, plus why would I trust more software that probably has a virus as well.

    Anyways I think it’s possible to remake that c3project file. Just need to look at an uncorrupted one to see the structure. The ui state stuff is generated by construct so it shouldn’t be needed.

  • When I was talking about the angular velocity I meant that the hits won't cause the objects to spin with the current math.

    Anyways, made a simple test of the bounce math and it seems to be working in all directions:

    dropbox.com/s/cuy6zjurxm4u2q0/bounce_math.capx

    The only difference is it utilizes a min() so it will only bounce when the objects are moving toward each other. Otherwise I guess you'd want to test your conversions to and from the bullet and custom movement behaviors in your project.

  • Looks ok as best I can tell by just looking at the events. I may be missing something though.

    The action to set the speed of the object when it leaves orbit is incorrect. It should be:

    LinearSpeed = angularSpeed*radius*pi/180

    And I’m pretty sure the orbit speed is an angular speed.

    The angle of motion looks ok. It works for cw rotation. It would be -90 for ccw, and you’d probably want to put the speed calc in an abs().

    As far as the bounce calculation itself, it bounces whenever the objects collide. You can modify it so it only bounces when the objects are moving toward each other.

    Set vrel to (obst.vx - player.vx) * cos(a) + (obst.vy - player.vy) * sin(a)

    If Vrel <0

    Set j to -(1+e) * vrel / (1/player.mass + 1 / obst.mass)

    ...and do rest of bounce stuff.

    Other than that the bounce may not be exactly what was expected since it’s treating the two objects as circles with the collision point directly between them. Boxes usually can have the collision point all over the place which will change up how it will bounce.

    That and the bounce won’t change the angular velocity as is which adds to making the bounce not look right.

    Both can be solved with more logic to calculate the collision point, as well as modifying the equations to take angular velocity into consideration.

  • I think you can enable/disable the depth buffer per layer. So turn off 3D on the hud layer and it should work I think.

    Haven’t tried it but it was hashed out in the releases after they added it.

  • Oh yeah. Forgot about tiledbackground. Probably would be simpler.