R0J0hound's Forum Posts

  • I don’t think we have any control over that at this point then. Maybe that’s something that can be fixed with a bug report.

    If it’s distracting enough one idea would be to use a lower z scale in the layout editor and scaling it up at the start of the layout when the game runs. It could be a somewhat doable workaround for now. So say in the editor you’d use half scale and then double it in events:

    start of layout
    — set zelevation to self.zelevation*2
    — set depth to self.depth*2

    A third idea could be to make an in game level editor. Could be an interesting thing to attempt.

  • Could it be that it just uses the image and not the repeated version?

    Possible fix could be to use multiple smaller cubes or use a mesh distort to position the tiledbg where the face would be.

  • Is that screenshot showing the glitch well? All I can see are the whiter pixels around the chain link.

    When 3d faces have transparency they typically need to be drawn from the furthest to closest to see through the transparent parts. That works best when the faces are facing the camera as angled faces or faces intersecting other polygons will often still have the issue.

    Construct seems to do this for you somewhat. I haven’t messed with it a lot. What you can do is change the z order of things to control what gets drawn first.

    Besides that there is a shader floating around somewhere called alpha discard or something that lets you see through transparent textures. But it’s a hard off/on, it doesn’t handle semi transparency.

    So anyways the two tools you have to deal with transparent textures in 3d is that discard shader, and maybe messing with the zorder of things.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You'll unfortunately have to re-adjust the zheights of everything after that change. It's typically the first thing I change when working with 3d. Apart from that I don't know how to fix the extreme editor z scaling.

  • In the project properties you can set the z scale from normalized to regular.

  • This should work I think. It lerps between the start and end in a straight line. Then also moves in a parabola.

    dropbox.com/s/ilxsoyy7mmm04dc/jump_path.c3p

  • Here’s an idea to keep track of the total rotation of the an object. You’d want it to run toward the end of the event sheet after anything that rotates the sprite.

    The equation used is a signedAngleDifference, which is like the angleDiff() expression but it gives positive and negative for clockwise and counter clockwise rotation.

    Global totalRot=0
    Global prevAngle=0
    
    Every Tick
    — add angle(0,0,cos(sprite.angle-prevAngle), sin(sprite.angle-prevAngle)) to totalRot
    — set prevAngle to sprite.angle

    So a front flip would be if totalRot>360, and a back flip would be if totalRot<-360.

    In general the number of flips could be calculated with:

    Flips = totalRot>0?floor(totalRot/360):ceil(totalRot/360)

    You’d probably want to reset totalRot to 0 when you first get air born from a jump I’m guessing.

  • Something like this would work well. Key differences to what you're doing is it adds to instead of sets the rotx variable. Also instead of the touch speed expression here we find the xvelocity since that gives a direction in addition to speed.

    global rotx=0
    global xvelocity=0
    global px=0
    
    on touch start
    -- set px to touch.x
    
    is touching sprite2
    -- set xvelocity to (touch.x-px)/10
    -- set px to touch.x
    
    every tick
    -- add xvelocity*dt to rotx
  • That library doesn't look to be using 3d. Just rotation and some shading.

    Anyways, I had the idea to do a cloth simulation to do the page turning. Works pretty well when it's stiff enough, maybe with some slight jiggling. But it does let you drag the page like a sheet of paper.

    dropbox.com/s/hrzwjyr7y0erwt7/verlet_page_turn.c3p

    I didn't come up with a nice way to do two sided pages like dop's examples. Maybe it could be doable by offsetting a second page by the vertex normals.

    Multiple pages would need more work. I thought someone else made a working page turn example before, but all I could find were old dead links. Oh well.

  • Yep. Use that all the time. It only doesn’t work when dealing with values between instances of the same type, but I guess that’s a general event problem.

  • You do not have permission to view this post

  • Currently construct uses numbers and strings as values in expressions. Any other type: Boolean, dictionaries, arrays, etc.. are manipulated via actions and expressions. For example the Boolean expressions effectively converts to numbers. Anyways, it’s not alone in doing this, clickteam products do or did this (haven’t used them in a while).

    The closest we got to another value type was immutable arrays in construct classic. You could specify an array like {1,2,3} then store it in variables, or index them with someNumber. You couldn’t change them after they were defined though. It was prone to crashing but was interesting.

    It would be nice to have arrays and dictionaries as variable types too. Mainly to avoid having to deal with picking and to possibly make things look cleaner.

    What’s being suggested here are structs, which would be a nice way to group values. Currently we can kind of do that with sprites with instance variables, or a dictionary with a fixed set of keys. The sprite is better than the dictionary method because the expression editor will catch typos at edit time. Both aren’t ideal because they have to be picked. Picking is fine with simple cases but often we end up having to do juggling with how things are picked to access and modify things.

    The json object is an improvement since you can have as many arrays and dictionaries in it as you like. You still have to pick it, but that’s usually fine since you can get away with a single instance. The main downfall of it is if you make typos in the json paths you won’t know until running it. But I guess that’s the nature of dynamic data structures, you have to check at runtime.

    Structs are nice because you define it at edit time and the editor can catch a typos you make before the game runs. You wouldn’t have to worry about something silently returning 0, or having to check the browser console for errors.

    Anyways just some thoughts.

  • This plug-in only has one light. There currently isn’t a way to add more.

    After the last update the plug-in was at the point it needed a rewrite to support more things. I haven’t had time for such a project in a while though.

  • Your link is asking for a login to open. I was curious to see what kind of json you were trying to parse.

    I’ve only used the object once with the set json action and get expression. The path is roughly the same as accessing values in JavaScript. Had to reference the docs to figure that one out.

    Anyways json maps directly to JavaScript data. The json object is just an alternate way to access things.

    I haven’t dealt with how you loop over arrays or keys yet so I can’t comment on how straightforward that is.

  • Probably should work if you retype the quotes. By default my phone uses different quotes than construct uses.