R0J0hound's Recent Forum Activity

  • You don't need javascript, here's a way to do it with events. It uses the tiledbackground object to draw it, and uses some math to do the raycast calculation.

    dropbox.com/s/s8mz4i34djr89xy/raycast.c3p

    Kudos to construct for giving access to collision points. I didn't use the line of sight raycast feature since that doesn't provide the necessary data to do the texturing.

    Also since events are so slow I tried utilizing javascript instead:

    dropbox.com/s/b6hy5e5f3xdldmz/raycast_js.c3p

    It's much faster, even though it does the same thing. But man was that unpleasant to get working. Once i got past the syntax errors, i had to deal with all the silent errors that made it not work. Anyways, it's a shame js is needed to make things faster.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well there’s two different approaches to do that kind of 3D with textured walls with vanilla features.

    One is the raycast method. That’s what that link and template do. Logic wise it’s a raycast per vertical line and depending on the distance each ray is to a wall you set the visual height of that slice. You can use the tiledbackground object to draw slices of a texture to do that.

    Floors and ceiling would need to done via an effect.

    The other method is to use distort meshes with a sprite. Rufus’ example does this. Basically you need a sprite per face and you set the xyz of the corners to make a cube. Then you can use some math to rotate and move the points from a camera point of view.

    Construct makes this a bit more complicated though. You can’t set the zelevation of a mesh point to negative value, and the xy positions are relative to the sprite’s bounding box. Probably can get how to work around that from rufus’ example.

    Otherwise 3D shapes aren’t usable because you can’t rotate them. But there is a third party plugin you could use that does do that.

    Sorry I’m not really good at writing step by step solution stuff.

  • Glad you’re having fun with it. My interest with mode7 sailed a while ago unfortunately.

    Being slow and not working are different things. Paster was made to fill a gap missing in construct’s feature set and performed well enough for my purposes. I have no other solutions for split screen.

  • Most GitHub libraries aren’t so nice to utilize I’ve found. This one for example looks like it wants you to build the js files. Which isn’t ideal.

    Thankfully they have a demo. You can look at the page source to get the built js files and see how it’s used.

    That’s where I’d start. Usually you can strip a lot of from the examples, as construct provides some of the features.

    The demo didn’t work on my phone so maybe something is amiss with it.

    So in general to use a js library in construct you’d:

    1. Include the js files. C3 scripting I think has a way to do that. In c2 you have to load it manually.

    2. Follow the library’s docs to run some js to use it.

    3. Debugging. Some libraries are just broken, or are obsolete. Or you run into a conflicts with construct.

    I may have a look later as I seem to have recommended this library before. Will see if I find time.

    Edit:

    Tried fiddling with that library a bit but lost interest. It’s a bit lower level and is built around the demos player controls. It should be possible to just have it play a file but I ran out of time trying to adapt their example.

  • The example, the effect and construct in general aren’t made for split screen.

    Typical solutions for split screen would be two games that communicate to each other somehow, or drawing to a paster object. Although I suspect neither would work well.

    The third option would be to start from scratch. But at that point construct just gets in the way.

    I don’t have much time to make examples lately.

    Cheers

  • I think the main issue has to do with the picking. The way it works is things are picked from things already picked. So you pick one cell and then try to pick another and it can’t.

    One way to rearrange the logic is to just pick the neighbor cells one by one and adding to a local variable, and then picking the cell itself and setting its neighbors instance variables then.

    function checkNeighbors(x, y)

    {

    Local number count=0

    If Pick cell at (x+32, y) and cell.frame=1

    Then add 1 to count

    If Pick cell at (x-32, y) and cell.frame=1

    Then add 1 to count

    ... so on for the other directions

    If pick cell at (x,y)

    Then set cell.neighbors to count

    }

  • 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.