Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 9 Vote(s) - 4.56 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Work in progress Katamari: The dark descent (Update 16/11)
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#21
RE: Katamari: The dark descent

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.

(This post was last modified: 08-02-2011, 05:12 PM by Apjjm.)
08-02-2011, 05:05 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#22
RE: Katamari: The dark descent

(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

Tutorials: From Noob to Pro
08-02-2011, 06:24 PM
Website Find
Furix Offline
Junior Member

Posts: 4
Threads: 0
Joined: Jun 2011
Reputation: 0
#23
RE: Katamari: The dark descent

Do we've any release date for it ?


-cant wait to make a let's play for it
08-22-2011, 08:58 AM
Find
skypeskype Offline
Senior Member

Posts: 503
Threads: 6
Joined: Mar 2011
Reputation: 2
#24
RE: Katamari: The dark descent

The youtube trailer cant be more awesome than it already is.
08-23-2011, 03:39 PM
Website Find
Mosnye Offline
Member

Posts: 111
Threads: 3
Joined: Dec 2010
Reputation: 3
#25
RE: Katamari: The dark descent

(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!

[Image: a.jpg]
08-24-2011, 12:50 AM
Website Find
Henriksen Offline
Senior Member

Posts: 308
Threads: 71
Joined: Dec 2010
Reputation: 2
#26
RE: Katamari: The dark descent

lol? This is kinda awesome? x)
08-30-2011, 05:09 PM
Find
Jinxi Offline
Junior Member

Posts: 13
Threads: 0
Joined: Nov 2011
Reputation: 1
#27
RE: Katamari: The dark descent

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!

[Image: Crosseyedkitty.gif]
11-25-2011, 11:48 PM
Find
Homicide13 Offline
Senior Member

Posts: 323
Threads: 41
Joined: Nov 2010
Reputation: 14
#28
RE: Katamari: The dark descent

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

04-09-2012, 05:47 AM
Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#29
RE: Katamari: The dark descent

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.
(This post was last modified: 04-09-2012, 01:07 PM by Apjjm.)
04-09-2012, 01:06 PM
Find
Homicide13 Offline
Senior Member

Posts: 323
Threads: 41
Joined: Nov 2010
Reputation: 14
#30
RE: Katamari: The dark descent

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.

04-09-2012, 11:12 PM
Find




Users browsing this thread: 3 Guest(s)