View unanswered posts | View active topics It is currently Thu Nov 28, 2024 11:09 am



Reply to topic  [ 7 posts ] 
 Possiable solution to Tree's 
Author Message
User avatar

Joined: Fri Aug 20, 2010 4:45 am
Posts: 911
Location: No Comment.
Reply with quote
Post 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.


Mon Nov 24, 2014 8:50 pm
Profile
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post 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.


Mon Nov 24, 2014 9:22 pm
Profile
User avatar

Joined: Mon Oct 11, 2010 1:15 pm
Posts: 594
Location: Finlandia
Reply with quote
Post Re: Possiable solution to Tree's
I thought the new limit was 255^2?


Mon Nov 24, 2014 9:27 pm
Profile
User avatar

Joined: Sun Jan 28, 2007 10:32 pm
Posts: 1609
Location: UK
Reply with quote
Post 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.


Mon Nov 24, 2014 9:38 pm
Profile YIM
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post 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.


Mon Nov 24, 2014 9:46 pm
Profile
User avatar

Joined: Fri Aug 20, 2010 4:45 am
Posts: 911
Location: No Comment.
Reply with quote
Post 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.


Mon Nov 24, 2014 10:27 pm
Profile

Joined: Fri Sep 10, 2010 1:48 am
Posts: 666
Location: Halifax, Canada
Reply with quote
Post 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.


Mon Nov 24, 2014 11:38 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.027s | 13 Queries | GZIP : Off ]