R0J0hound's Forum Posts

  • I never use waits when I can.

    On function getXY
    While
    — set myX to int(random(300))
    — set myY to int(random(400))
    — array: at (myX,myY) =0
    — — stop loop

    The only issue is it will loop forever if there are no 0s in the array. It also could take a while if there only a few 0s. Depending on how robust you want it you could have it try random places first, then make a list of all the locations with zero and pick one at random, and lastly if there are no zeros you could set the variables to -1 or nan or something.

  • You can use cosp inside anglelerp:

    angleLerp(a0, a1, cosp(0,1,t))

  • Sounds good. Most tutorials and examples of gltf use webgl or OpenGL which is ideal for how the data is laid out.

    Gltf also only has lists of triangles but I think you could combine pairs of triangles that share an edge into quads when you first load things.

    I hadn’t planned on doing any more with this very soon. My free time and how I spend it changes a lot day to day. But I’ll likely reference it for later stuff.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So I had a more serious look at the gltf file format and partially made a loader for it.

    It requires gltf embedded files. My goal was to only get the transformed vertices from skinning and the scene graph, and play back animations. The meat of it is in js and isn't tied to webgl at all.

    I was originally visualizing it with sprites, but it was too slow so I made a setting to use c2's render directly to draw points.

    dropbox.com/s/sd48sbafaxbg0tf/js_gltf_test.capx

  • Construct seems to do funky sorting when objects have the same zelevation.

  • I probably won't make a game with this.

    Anyways, here's the balls rolling on a 3d terrain (they can't get airborne).

    Also, figured out a way to do per vertex shading. Just with a direct light currently (point lights would be tricky*).

    dropbox.com/s/rkomtba52rlqw3t/mesh_sphere_roll_terrain.c3p

    There are a few annoyances I've found with 3d.

    *The main one is distort meshes have their own coordinate system which is different than the layout's coordinate system. Overall that makes everything more fiddly.

    When objects have the same zelevation they seem to lose depth? not sure.

  • Another test. It does 3d rotation in a more generic way. Also tried out doing some rolling physics.

    dropbox.com/s/2l2dtel4t0zf9jw/mesh_sphere_roll.c3p

  • Ok, here is an updated version. You can have functions use as many parameters as you need.

    dropbox.com/s/0bwec4ef6j54w8f/expression%20parser%201.capx

  • Hi,

    I haven’t had a chance to mess with it this week. Right now it was setup for handling a max of two parameters. With more the extra values are discarded atm.

    Anyways, it’s something that can be fixed. I’ll look it over this weekend.

  • Sounds like it’s completely broken if it does that. I don’t have a fix.

    You could try the polygon plugin made by yann as an alternative.

  • It doesn’t use any 3D library. I just use webgl directly.

    Why? Because it seemed interesting.

    It’s different from triangle3d because I ended up changing how it worked significantly.

    I haven’t used the others plugins.

    Edit:

    It’s a single object because I didn’t want to deal with picking.

    It doesn’t use an existing library because I couldn’t get them to work the way I wanted to and they are too bloated for my use case. This plugin is able to be drawn between other normal construct objects without an image copy per frame. Other plugins run on a separate canvas that’s copied every frame or layered over the game canvas.

  • Hi.

    1. There is per object color, and the color has alpha. Is that what you’re after? When an object is transparent you need to turn on “transparent” in the object settings so it draws things in order.

    2.

    I’m not sure what you mean by transition modes. Can you clarify?

    3.

    I can see that being useful. Right now we use only a diffuse texture and color which is pretty simple. I’d like to make the shading model more deluxe when I work on that.

    4.

    Yeah, even in my tests the directional light isn’t enough.

    Adding more lights and light types is something I’m interested in attempting.

    5.

    I won’t be making that a live link at this time. Using the sprite condition “on frame changed” is a decent solution at the moment.

    Thanks for your interest.

  • It’s been a while, and I don’t have the plugin installed but as I recall you’d do these actions:

    Begin path

    Move to 0,0

    Line to 100, 100

    Line to 0, 100

    Fill path with “red”

    Stroke path with “back”

    Or something like that.

  • With the previous plugin, triangle3d, you had to specify what to draw every frame. This one lets you add a bunch of objects, so you only need events to change things. That and this has shadows amongst other features and improvements.

    I’m not working on the canvas plugin anymore, but it already lets you draw polygons in the same way html5 canvas let you as I recall.

  • Ah, good catch. guess I hadn't tested that enough. Should be fixed now, along with some shadow, alpha blending, and shading fixes.