R0J0hound's Recent Forum Activity

  • I often forget about how things work in the stuff I make. I’m just decent at figuring it out should I have time and access to a computer to try stuff out. But I haven’t been on a computer for weeks now.

    Anyways I don’t recall what values the the layers parameters take. Is it a number? A hexadecimal string? A binary string? I’d have to check, either by trial and error or looking at the tooltip text that shows up when selecting that field.

    I’m guessing If it’s working for only 8 then it’s in hexadecimal since 8 hexadecimal characters is 32 bits.

    I guess you could build the string up as binary first and convert it over to hex. Or maybe the action lets you supply a number instead of text you could use a number you set with the setbit() expression. I honestly don’t recall though. This is all off the top of my head.

  • You mean just get rid of the quotes?

    Set text to replace(text, """", "")

    Set text to "str("&text&")"

    Or do you mean just evaluating the formula in a string?

    Sounds like you already are utilizing execjs() to run it like a JavaScript expression, but want different syntax with pow and such.

    In which case I want to revise my previous reply. I’d recommend writing a parser. Or don’t. Just search for the newest posts by me where I mention parser and use one of those capx.

  • At a glance I’m not super sure what I’m looking at. What’s not working?

    I’m guessing you’re intension is to have the scene divided into 32 z slices and set the layers depending on which ones the object is in?

    In which case I’d say look at your formula and see if it’s doing what you think it should be doing. If it isn’t then I’d say try re-thinking the approach. Best case you just made a typo somewhere.

  • Maybe this? It would give the angle above the ground plane.

    Angle(0, Obj1.zelevation, distance(obj1.x,obj1.y,obj2.x,obj2.y), obj2.zelevation)

  • This topic here shows a way to bend text:

    construct.net/en/forum/construct-3/general-discussion-7/text-follow-curved-path-157571

    It divers the text up to make an object per character and uses the .textWidth expression to get the size. Then just places them along a path using cubic() as I recall.

    An alternative way could be to utilize a distort mesh instead.

  • Guess I can’t play mkv files from my phone. Anyways, will look later in the week if I get on my pc.

    I’m going to stick with the 0-1 for color values I think. You can divide values in the range 0-255 by 255 as a easy conversion.

    Depending on the shadow issue you can improve it by adjusting the shadow bias or using a bigger shadow map size. But I’ll see better when I get to watching the file.

  • You can make a parser to do it. There are many ways to do that depending on what you want to do.

    Fist step is to get a list of tokens (numbers and +- or ^)

    A simple way to do that is with a series of replaces so what you end up with is a list of tokens divided by spaces.

    Then you can loop over them and make that substitution with something like this:

    var text = "2^3+4^6
    
    Set text to replace(text, “ “, “”)
    Set text to replace(text, “+”, “ + “)
    Set text to replace(text, “-“, “ - “)
    Set text to replace(text, “^”, “ ^ “)
    
    var output= ""
    var i=0
    var n=tokencount(text, " ")
    
    while i<n
    -- add 1 to i
    -- if tokenat(text,i," ")="^"
    -- -- add "pow("&tokenat(text,i-1," ") &","&tokenat(text,i+1," ")&")" to output
    -- -- add 2 to i
    -- else
    -- -- add tokenat(text,i-1," ") to output
  • mOOnpunk

    Looks like the function isn’t being called. In c3 JavaScript stuff is scoped differently I think. You probably can fix it by putting that js function in the global scope another way. Maybe a js block?

  • Oh cool. Glad you got it working.

    Actually none of those expressions are Euler angles. That’s the 3x3 orientation matrix. So you could use orientzx, orientzy, orientzz to get a vector of the direction of being faced.

    I work on this in spurts and ray casting has been a request for a while that I’d like to add. Shaders are a cool idea too. But there’s a lot more to it behind the scenes that needs to change and I’d need to settle on a good design.

    I find when making plugins it’s hard to change features without breaking existing capx. But anyways

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It will take me a day or two to fiddle with it. I’ve never used q3d.

    With this plugin the Euler angles are just xyz ordered. For any other ordering I just opted to just do it with some additional rotate actions instead of picking an order.

    Also what may make it different is how I specified the axis’ to match the layout. X to the right, y down and z up toward the screen.

    Most other 3D have z be negative toward the screen. But anyways changing that would be a breaking change.

    Anyways. All that seems to be needed is to rotate so the camera so it’s oriented with the ground down. Found that with some trial and error.

    The turning is done by rotating around y, and looking up and down with x.

    In my example I used the mouse position to drive the rotation. But you could just use variables.

  • megatronx

    There are probably multiple ways but this works:

    set orient to (-90,0,0)

    rotate xrot by axis (0,1,0)

    rotate yrot by axis (1,0,0)

    I found it by trial and error. by default the camera looks into the screen. we rotate by -90 so it's looking up. Then from that viewpoint we can rotate left and right, and finally we rotate again for up and down.

    uce8f21859fd4934cfd15b30a5ab.dl.dropboxusercontent.com/cd/0/get/Ch-N3jDKPryDwetMmF11yZAUlFQaBlfAf4YVihpxdz0YJbLX1KeCFF_XARo1ViB5_jZ6GqFdNRBwX1oY9-0uDG2ancu5rmpFt79rFZMA3JIaSeK4VakQgVNaTTdBuf136-O0cJL2-S8ncWv4qn796qaU/file

  • Funky Koval

    Oh my apologies. I thought I had replied. I like those ideas. Need to change up a few things to get that stuff to work. Have been taking a break from working on this, and looking for excuses not to be on the computer, but I have been doing tests applicable to this elsewhere. Just need to crack this open again.

    megatronix

    -

    Relto is the object I’d you are setting an object relative to. But in what way it is relative depends on if you are setting the position, orientation or scale.

    As an example say you set the position to x,y,z relto:”obj2”. It will set the position to obj2 and then, using obj2’s orientation, it will move x units to the right, y units down, and z units forward.

    -

    There are no particles but you can do it manually.

    -

    Animating the textures is just a matter of changing the texture of an object every frame or however often as you want it to change.

    -

    Setting the texture rectangle let’s you only display a portion of a texture.

    If (0,0,1,1) uses the whole texture

    Then (0,0,0.5,0.5) would only be the top left quarter of the texture. Can be useful for packed sprite sheets.

    -

    The create verts and save it as a mesh is to just make any mesh you want. Just lets you do it with events instead of loading a pre made obj file.

    -

    I’ve never compared this with other libraries. It may or may not be faster. It does less than three.js but it coexists on the same canvas as construct as opposed to being a separate layered canvas or a canvas that is copied to a texture every frame. I’m sure the performance will change as the feature set changes.

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 156 followers

Connect with R0J0hound