Data Realms Fan Forums
http://868000.nnhp.asia/

Possiable solution to Tree's
http://868000.nnhp.asia/viewtopic.php?f=75&t=45861
Page 1 of 1

Author:  Sims_Doc [ Mon Nov 24, 2014 8:50 pm ]
Post subject:  Possiable solution to Tree's

Alright i'll be putting this in requests as it has no hope of ever being created.

So, Last night i was thinking about this problem of getting trees to act like "trees" naturally it was pretty simple solution which is just make them a unit so they can bend and give them a tree like limb structure with low amount of health so when they die like all things they become gibs that can be destroyed in the game environment.

Image

That being said.. you would probably hit that nasty limit sooner with extra units on running around, tell me why did the devs go for a hard coded limit? sounds dumb to me.

Author:  Duh102 [ Mon Nov 24, 2014 9:22 pm ]
Post subject:  Re: Possiable solution to Tree's

The idea's been thought of before, but never acted on.
The limit is hardcoded because the IDs are stored as single unsigned bytes, which gives you 256 IDs worth of unique values. Considering how slow Cortex runs with less than 256 MOIDs running around, the limit is not so stupid imo.
I believe it's been increased in the newest version, however, to 512 or 1024 or something like that.

Author:  4zK [ Mon Nov 24, 2014 9:27 pm ]
Post subject:  Re: Possiable solution to Tree's

I thought the new limit was 255^2?

Author:  Arcalane [ Mon Nov 24, 2014 9:38 pm ]
Post subject:  Re: Possiable solution to Tree's

65,535, to be precise.

That said, this does nothing to alleviate general slowdown issues from huge numbers of entities on the scene or anything like that, so more than a few fancy trees could get messy (well, slow) quite fast.

Author:  Duh102 [ Mon Nov 24, 2014 9:46 pm ]
Post subject:  Re: Possiable solution to Tree's

Oh, right, he increased it to 2-byte unsigned. While I was writing that I was wondering if he had just tacked on another bit but that didn't seem to make sense... Guess my intuition was right.

Author:  Sims_Doc [ Mon Nov 24, 2014 10:27 pm ]
Post subject:  Re: Possiable solution to Tree's

Arcalane wrote:
65,535, to be precise.

That said, this does nothing to alleviate general slowdown issues from huge numbers of entities on the scene or anything like that, so more than a few fancy trees could get messy (well, slow) quite fast.


Awesome and minor lag isn't really an issue as it can be tolerated, It gives you time to think when at a time you wouldn't have it.

Duh102 wrote:
The idea's been thought of before, but never acted on.

I'm glad someone else has had the idea as it makes sense.

[EDIT]

Also, I'm assuming its possible to put stress on a joint? What i'm referring to is the tree snapping in the example image above as for actually moving and swaying like a tree? you've probably got a better idea on implementation of such an idea than me.

Author:  Bad Boy [ Mon Nov 24, 2014 11:38 pm ]
Post subject:  Re: Possiable solution to Tree's

Duh102 wrote:
Oh, right, he increased it to 2-byte unsigned. While I was writing that I was wondering if he had just tacked on another bit but that didn't seem to make sense... Guess my intuition was right.

If I remember right from what was mentioned, it's not actually a matter of just an unsigned byte (I thought this was the problem too), cause that would have probably been an easy fix. Rather, it's the use of 256 bits for colour palette - collisions are detected by drawing each object's shape (or maybe their outline) in their id's colour on to a bitmap of the map, and if any object draws over a non 255 colour it counts as a collision.
I don't know if that's necessarily the most efficient way of solving collisions between complex objects, but it's certainly a pretty cool and clever one if you ask me.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/