R0J0hound's Forum Posts

  • Try some beginner tutorials. They will get you up to speed on how to do that and more.

  • That style is called isometric. That should help you find related topics. There are no plugins for c3 that help with that as far as I know. Collisions and motion are kind of 3d so in construct all that is done from scratch. You also need to zsort the objects which can vary in difficulty.

  • Here's a few ideas:

    An idea to make up track of modular pieces. Straight and perfect arcs.

    dropbox.com/s/quzp15smcjkljd4/train_wip2.capx

    An idea to move along a Bezier curve. The curve is converted to a polyline to ensure constant speed along the curve.

    dropbox.com/s/m0pk8zvqoj08kr7/move_on_dashed_curve.capx

    A slightly different way. It skips the polyline conversion step and still gives relatively constant speed even when nodes aren't evenly spaced. For a curve loop.

    dropbox.com/s/6mu2yolmavp5ap9/followSpline.capx

  • Cool. Always nice to finish a game. Looks interesting.

    I’ve always pronounced it roho, but rojo works too. When it comes down to it I used zeros instead of O’s so it’s not really pronounceable.

  • Isn’t no official response fine? Ashley only responds quick to shoot down an idea. We could also extrapolate what the possible reply could be based on previous replies on this topic. Typically we never know something was being worked on till it was basically done. There’s probably a reason for that. How many times has someone started working on something and for whatever reason couldn’t get it working? He could be working on something or doing nothing related to this.

  • You do not have permission to view this post

  • I’m sure the cameras rotate actions are useful but I just stick to the look at action as it’s easier to get it to do what I want.

    Had a glance at your example and one issue I see is what you’re using for the look at. It needs to be a position at an angle from the players position so sin and cos will be involved. Basically this:

  • You mean calculating the area of the shapes? The arrays have all the points of the shapes. You’d just need to loop over each edge with something like this

    Area=0
    Repeat p.count times
    — add (p(i+1).y+p(i).y)*(p(i+1).x-p(i).x)/2 to area

    At least that’s the idea. It would have to be adapted to an array. And the I+1 would need to wrap around to 0 when past the end of the array.

  • It was posted before but I couldn’t find where. So there’s this.

    dropbox.com/s/i7vrebn55xor8p5/mesh_slice.c3p

  • You do not have permission to view this post

  • You need to specify the folder in with the sound name then. It probably says that in the manual. So if it’s in a folder called duck, the name would be “duck\quack.mp3”

  • That would perhaps work with a monospaced font. In general most fonts are variable width.

    I like formulas, but something like this doesn’t reduce to one. You can put it all in a function to reuse it though

  • Only idea that comes to mind is to use a tiledbackground object and use the "set face object" from the 3dshape with that.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There's no formula, you'll have to use a loop one way or another. Usually you'd use tokenat to get a word at a time, then you'd measure the width of the text somehow and finally add newlines if you exceed a maxwidth. Rough pseudo code of how that may look is here. There are ways it can be improved.

    var x=0
    var maxwidth=100
    var textInput="some kind of text"
    var textOutput=""
    var word=""
    
    start of layout
    repeat tokencount(textInput, " ") times
    -- set word to tokenat(textInput, loopindex, " ")
    -- add measure(word&" ") to x
    -- compare x > maxwidth
    -- -- add newline to textOutput
    -- -- set x to 0
    -- add word&" " to textOutput
    

    The measure function isn't actually in construct. To measure the text it will depend on how you are displaying text.

    If using the text object the best you have is the Text.textwidth expression but that is only updated when the object is drawn. But Javascript can be used to measure the text. Basically in javascript create a html canvas with a 2d context, set the font, and then use context.measureText(text).width. The main thing you'll have to deal with is the font sizes will be different so the font size will have to be scaled somehow. I can't find an example where I figured that one out.

    With spritefonts it can be easier. It has the spritefont.CharacterWidth(char) expression, but since it only measures a character at a time you'll have to use a loop to add the widths up for the whole word. You can also take advantage of mono spaced spritefonts by calculating the width=len(word)*charwidth.

    An alternate way is to use texture atlas of a font and a json of the widths and where to find the letters.

    Anyways here is a c3p that does the text wrapping manually with the last idea. The logic would basically be the same for the others. I don't have any examples for the other object types.

    dropbox.com/s/67ukw6bak4gvq41/no_dom_text_scroll.c3p

    For simple I often I just use the automatic text wrapping used in the text and spritefont objects. Worst case you can just add the newlines yourself to the text you're using if the automatic stuff isn't satisfactory. Those are the only simple solutions I know

  • Looks like you can’t get the pixels per inch (ppi) of the screen with JavaScript.

    If you could then this would be the calculation.

    Meters = Pixels*ppi* 0.0254

    Best we can do is illustrated by this site

    ruler.onl

    Basically there needs to be a calibration step where the user has to input the measurement of the screen.