R0J0hound's Forum Posts

  • Basically all that’s available is adding more points to the collision polygons. Or maybe make a number of sprites for various curves and such using as many collision polygon points as needed to make it smooth enough. Then build your terrain with a bunch of those.

    Another idea is to design your terrain with something else, and then use sprites as lines to define the outline.

    I’ve used a vector drawing program before and saved to its simplest file format and parsed that to get line segements making up the shapes.

    Another idea is to make your own in game editor that you could disable later. You could use qarp() and cubic() to do Bézier curves that you then split that up into lines. At least it beats manually placing individual points.

  • I haven't gone through the trouble to do it. I haven't really used C3, but it's capabilities are roughly the same as C2.

    There are three parts to this:

    1. Have a list of points to define a polygon. Then we can do the logic in the previous post to do the splitting. We wouldn't be working with actual Construct objects. So probably use arrays to store this stuff. This is math and algorithm stuff, which is doable depending on your skill.

    2. We need a way to draw these polygons. Construct doesn't have a way to do this. There's the paster object I made for C2 that has a "draw quad" action. That could be used to draw any polygon with some creativity. You'd have to deal with texture coordinates if the split objects have textures. The paster plugin was ported to C3 by someone, but it won't work with the new runtime at all if that's a concern.

    Alternatively you could just use sprites stretched into lines to do the outline of the polygon without third party stuff. The con is the polygon wouldn't be filled.

    3. Physics. The built in physics behavior is unusable for this. I don't think any of the third party ones are either. You'd either have to deal with another physics library directly in javascript or implement the physics in events. It's going to be a lot of effort either way.

    So more or less everything from scratch, plus most of it wouldn't be able to interact with other construct features. So construct doesn't really have anything to assist with making such a game. This safely throws this into the very advanced difficulty range.

  • Simulate control is working, it's just happening for a moment with those events. So any changes are not really noticeable.

    Maybe add a variable to bat to tell it what to do. Call it "state" or something. Then just add a event to to simulate the control continuously depending on the state.

    Bat: state = "wave one"

    -- bat: simulate control turn left

  • Here's an example of the idea you got from discord.

    uc1bdc7dd7dd41ad9268a6ca172b.dl.dropboxusercontent.com/cd/0/get/CiH8d7v_Ctv9cxQSeoTTJNQXbCpG7ePQt2OOivU5KuAu3XvHKtOAKnVTQKbTYh1hIIQiM-Ns8OtWEko5Xg4IjHe1fPmy_lDMIvg-cmOSiYJOQaQq31se7cuZaPs9sCCidDc/file

    There's a lot of ways it can be improved, but it's better than nothing. Hopefully it's useful.

    The crux of the idea is you have a hidden object with the platform movement, and you define the ground shape on the front edge of the ground. The rest of the ground is just looks.

    Then you move up and down by adding/subtracting from a variable. I called it z, but it can be anything you think appropriate. Then you have a separate sprite to be what you see and just position it above the invisible one. I also used clamp to limit how high and low you can go.

  • Naw. It would be like going backwards.

    Constructs event sheet is the defining advantage it has over clickteam products.

    Ashley, construct’s main developer, made plugins for for old clicktem products before making construct. So he’s well aware of that old grid checkbox stuff, and he made something better. So much better that clicktem finally is making its event editor look more like construct’s.

    To me that checkbox stuff is a lot less readable, and yes I have used it before.

  • Admittedly I didn't test it. Regex should work everywhere. I know there are other solutions too. Personally I've done it with a loop by either using some math to extract 3 digits at a time, or use one of the text expressions to get three characters at a time.

    It's hard to search though. I find I do everything from scratch anyways when using Construct. You have something that suits your purpose. Carry on.

  • This question comes up a lot. There are many solutions, but the forum search doesn't work well enough to find them easily.

    The most recent has a nice regex formula by dop2000

    construct.net/en/forum/construct-2/how-do-i-18/number-with-space-136985

  • I don’t recall exactly. You’d have to look at the source or test it. But if you created a color with for example:

    Set color to rgb(12, 33, 177)

    “Color” would be a single number with the three colors packed in.

    Then you could get individual color components from that number with

    Red = color%256

    Green =int( color/256)%256

    Blue = int(color/256/256)%256

    There may also be expressions to help with that but I haven’t checked.

  • I’d be interested in a simple tool to create 3D games. There are unlimited features that could be added to a 3D engine, so I’m curious what minimal feature set could be to still be fun and enjoyable to use.

    Lately I’ve been less interested in flashy special case features, and more interested in simple core features that could be used to build those special case features.

    So what would such a program have? I’m sure we all have a varying list of things we would want.

    * object types: camera, 3D mesh

    * A level editor to place, size, orient said objects

    * a way to get keyboard input as a minimum

    * an event/simple scripting system to move stuff about.

    * we’d want functions and some kind of arrays at least.

    If we could access all the mesh data with expressions, even better.

    After that I have a cascading list of ideas. Lol. But those basics could be enjoyable. In that base state there would be lots of math to do stuff, but I don’t think it too bad. Simpler helper functions could be made to hide the math.

    Of course there would always be things to optimize and improve.

    The dream feature list would be:

    * editor built with same engine for ease of adding editor features.

    * a simple way to make shaders in the editor without using glsl.

    Ahh it’s fun to dream and design in your head. Kudos to anyone that takes such a dream and try’s to make such a thing for fun.

  • I don’t think anyone here wants to make a feature request.

  • There's always the feature request page if something is lacking.

    From what I’ve briefly found looking at html5, I’d probably do it the same as with my solution. Is there a built in way to restrict to only numbers? Maybe, but it’s simpler to just do myself. It gives the ability to restrict the input to anything I’d desire.

    Personally the “why” doesn’t interest me a lot. It could be an intentional design choice, or maybe oversight.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think what you’re missing is sub-events. You can drag an event under and to the right of another event to make it a sub-event. Kind of like indention formatting of some programming languages.

    Hope that helps.

  • Sorry, I haven’t a clue. The plugins I mentioned were c2 only, although I think blackhornet ported paster to c3 somewhere.

    I thought you were asking about in c2.

  • One idea that comes to mind is to let the text box be normal and under a “text changed” condition you can check what was typed and limit it to numbers or numbers with decimals. Actually you could use float() with this too.

    textbox: on text changed
    compare: len(textbox.text)>0
    — textbox: set text to float(self.text)
  • Distorting sprites like that isn’t really possible with vanilla construct.

    One possible way could be a shader. There are many effects that people have made to distort an image. Most are pretty specific and they don’t really fit the requirement to be able to distort an image arbitrarily.

    Another idea would be to do it like texturing is done in a 3D modeling program. You’d set the position and uv coordinants of of vertecies. But again you can’t do that in vanilla construct.

    There are two plugins that can be used to do it though, with varying ease.

    The first is Paster. It has a draw quad action that can do the distortion. For curved you’d do lots of smaller quads.

    Another plugin is “custom draw.” Very similar but is simpler in a way. It’s topic has a few distortion examples.

    A third way is with some custom webgl in JavaScript to draw the distorted mesh.