Sunday, August 28, 2016

Collisions

There are several collision models, with the main ones being box and sphere.

I originally thought sphere-sphere collision would require some sin-cos witchcraft, but it turned out to be the simplest collider of them all. You only need two points and two radii (the plural of "radius"). You can calculate the distance between the two points, which are the centers of the spheres, and if it's shorter or equal to the sum of the radii, then the spheres are colliding.

I didn't know that when I decided to make a sphere a major shape in Quly and now I'm even happier with that decision :-) It still needs quite a few triangles to draw though. But I digress.

The bounding box model is quite easy to compute since you have two X, two Y, and two Z coordinates, and you compare them for both boxes to compute the collision. Easy peasy.

In many cases it will be more favorable to rotate the box, for which it needs much more math.

Unity's Capsule collider is quite similar to the sphere model. The main difference is that it involves two spheres and some math in between for each collider.

With colliders defined, now we need to apply them ingame.

Hit box is a similar thing to a collider, but you can use more trickery there. Like instead of representing enemy using a bounding box, it may be enough to just use a line (if there's no chance to hit him from above or behind). If you're doing a simple 2D shooter, you may even use a point collider, that only moves up and down during jumps. Or the other way around, use line collider for a bullet and point collider for a target.

Raycasting may be slower.

Monday, August 1, 2016

Qedy

Golfers have caddie, businesses have Qedy. Both do basically the same job – supports the star in every way possible. And there are really many ways for Qedy!

Qedy is a commercial extension of the Framework, which means most of the shared functionalities won't be open source. Qedy is purposed for rapid development of intranet and extranet information systems.

With Qedy, instead of coding, you simply create your apps in Builder, where you can see a mockup of GUI, define a data model, create label translations and more.


Qedy Logo: “ED” from rotated Q, styled as Möbius strip.

But Qedy isn't just for web apps, you can create websites with it as well! Using simple block approach you add content for the page quickly and easily. In fact, exhibit A is this blog, whose content editor uses exactly that.

With Qedy you can define component conditions, visualize them and test using defined values.