Frictional Games Forum (read-only)
[WIP] Katamari: The dark descent (Update 16/11) - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+--- Thread: [WIP] Katamari: The dark descent (Update 16/11) (/thread-9496.html)

Pages: 1 2 3 4 5 6 7


RE: Katamari: The dark descent - Apjjm - 08-02-2011

Contact point discovery
Spoiler below!

Given a spherical object A is colliding with object B, how do i find the contact point on object A?
[Image: 9QF9C.png]
Amnesia has no way, sadly, to determine the position of entities or contact points using available functions. Filling the entire map with script areas would solve the problem, but for just a 5x5x5 room, with enough script areas to accurately determine a box and a ball colliding, you'd be looking at 8,000 entities - then for each of these areas you would have to check for collisions between the two objects to determine a set of points, This is far too much work to do without lag, let alone in a 200x200x20 map!

However, given that we know the two objects must be close to each-other, we can reduce that obscene amount of areas to ~100 static entities, which exist for under a frame, and only a few of which are ever even in the game at the same time!

The solution: As soon as a collision occurs, create a large box around one of the colliding objects (in this mod it is the katamari, and is done using the AddAttachedPropToProp function). If there is a collision with the big box and both entities, we split the big box into 8 smaller boxes. We then do that same process for all 8 smaller boxes, and keep going until the boxes are really small. As soon as we have determined a collision for a box, we can destroy that box (RemoveAttachedPropFromProp).
[Image: x68UO.png]
This is like an octree spatial partitioning technique, except we don't bother saving the tree, as it will be useless after we get the contact points. We keep dividing down and hone in on all the boxes that collide with both objects. We get a head-start, too, as we actually start at the centre of our spherical object.
[Image: verED.png]

At the smallest box size, we may have multiple boxes that collide with both entities! We want one contact point, not a set! Thankfully, because we created each box this frame, we know the position of each one relative to our first entity (the katamari). All we do is calculate the (square) distance from the katamari for each small box - we then only keep the position that was furthest away - as this will be the point at which the main object (katamari) first touched the other object. This is all the information we need to get where to attach the object to on the katamari.

This is just a quick overview, the code this time around is much better organised and commented than with tetris, so when the mod is released and you want to see exactly how it was done, then it shouldn't be too hard to follow Wink.




RE: Katamari: The dark descent - Your Computer - 08-02-2011

(08-02-2011, 05:05 PM)Apjjm Wrote:
Spoiler below!
then [...] you would have to check for collisions between the two objects to determine a set of points

Bah! I knew i was missing one key function in my script. Now everything works. Big Grin


RE: Katamari: The dark descent - Furix - 08-22-2011

Do we've any release date for it ?


-cant wait to make a let's play for it


RE: Katamari: The dark descent - skypeskype - 08-23-2011

The youtube trailer cant be more awesome than it already is.


RE: Katamari: The dark descent - Mosnye - 08-24-2011

(08-23-2011, 03:39 PM)skypeskype Wrote: The youtube trailer cant be more awesome than it already is.

The music is what makes it beast for me!



RE: Katamari: The dark descent - Henriksen - 08-30-2011

lol? This is kinda awesome? x)


RE: Katamari: The dark descent - Jinxi - 11-25-2011

You have some insanely good skills with this sort of scripting and 3D modeling stuff; or whatever it is you do to make these games so outside the box! Have you ever considered making it a career? o.O It's astonishing how awesome this is. xD I look forward to it! Good luck!



RE: Katamari: The dark descent - Homicide13 - 04-09-2012

So uh, whats the status on this? I've always looked forward to it. ;_;



RE: Katamari: The dark descent - Apjjm - 04-09-2012

It's still being worked on Smile
I recently posted an update to my youtube channel: http://youtu.be/TEJE934juwk


Currently in the process of fine-tuning the re-sizing, calculating volumes for a tonne of amnesia objects and centering entities (read: lots of boring repetitive stuff).

After that I have a strong idea as to what I will be doing with the levels, but again I will need to do some experiments. I also am trying to find a work-around for a bug in amnesia. It will be out this summer, depending on how long it takes me to solve a few remaining problems.


RE: Katamari: The dark descent - Homicide13 - 04-09-2012

Cool! I just looked at this page and noticed that the last update was like 1/2 a year ago, so i was wondering if it still even existed. Smile

I'm looking forward to it.