Author |
Message |
TheLastBanana
DRL Developer
Joined: Wed Dec 13, 2006 5:27 am Posts: 3138 Location: A little south and a lot west of Moscow
|
Re: Undocumented Key Commands
Geti wrote: But hittable MOs are the only ones that have a MOID anyway, so isn't that a different way of saying the same thing? Not being pedantic, just checking. Yeah, that's what I mean. You were right, but I was just expanding on why it works that way.
|
Sun Jun 13, 2010 11:18 pm |
|
|
411570N3
Joined: Wed Jan 07, 2009 10:26 am Posts: 4074 Location: That quaint little British colony down south
|
Re: Undocumented Key Commands
So do unhittable MOs contribute to the MOID limit then?
|
Mon Jun 14, 2010 2:34 am |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Undocumented Key Commands
No. To be counted for the MO limit, an MO has to have an ID. To have an ID, an MO has to be able to be hit.
|
Mon Jun 14, 2010 3:01 am |
|
|
411570N3
Joined: Wed Jan 07, 2009 10:26 am Posts: 4074 Location: That quaint little British colony down south
|
Re: Undocumented Key Commands
That could prove extremely useful in cutting down on MOID limit depletion on things which don't have to be hit or should only be able to be hit after other stuff has been destroyed already.
|
Mon Jun 14, 2010 4:05 am |
|
|
Geti
Joined: Sun Jul 13, 2008 9:57 am Posts: 4886 Location: some compy
|
Re: Undocumented Key Commands
411570N3 wrote: That could prove extremely useful in cutting down on MOID limit depletion on things which don't have to be hit or should only be able to be hit after other stuff has been destroyed already. It's also incredibly annoying that there's a limit at all.
|
Mon Jun 14, 2010 7:00 am |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Re: Undocumented Key Commands
I think there's a limit on the number of MOIDs because of the way the engine works. My theory is that Data actually uses the colors in the palette as the ID of hittable objects. Since there are only 255 colors (besides the null color) there can only be 255 MOIDs. He could probably link IDs to a number in a list, instead of colors in a palette, to have more (or infinite) MOIDs available.
|
Mon Jun 14, 2010 7:27 pm |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Undocumented Key Commands
I think that data limited it to 255 MOs because his collision detection probably checks that list of 255 to determine which one to affect.
It's limited to 255 to keep the time it takes to check the list down.
That's a pretty inefficient system, but, hey, think of what we have to do with Lua to check simple things like proximity. The fact that there's no dedicated engine functions to check whether MOs are near each other kinda leads me to believe that Data's engine coding isn't the best.
|
Mon Jun 14, 2010 9:47 pm |
|
|
Geti
Joined: Sun Jul 13, 2008 9:57 am Posts: 4886 Location: some compy
|
Re: Undocumented Key Commands
Quadtrees in the future perhaps? I've been thinking the same thing recently, as that's what most engines these days seem to get out of the way as quickly as they can, but hey, it's Dan's game..
|
Tue Jun 15, 2010 7:11 am |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Re: Undocumented Key Commands
I have a feeling the collision system works off of these colors we see in the MOID view, by checking if colors hit or intersect other colors. Which is why you can only have 255 hittable objects at a time.
|
Tue Jun 15, 2010 11:34 am |
|
|
Laraso
Joined: Sun Feb 21, 2010 10:40 pm Posts: 97
|
Re: Undocumented Key Commands
I agree with Grif as I have noticed several times playing Cortex Command that if there is more than 255 MOIDs, actors that normally should not have a MOID (ie they are MOID 302 or something like that) other actors can walk right through them. It is as if they lose the GetsHitByMO's and HitsMO's from them to get rid of their ID. Doesn't always work, however. Also, I may be wrong about this and Data may very well have linked MOIDs to colors, but I believe that using colors for the MOIDs would be impractical and unnecessary.
|
Tue Jun 15, 2010 3:28 pm |
|
|
MaximDude
Joined: Wed Nov 22, 2006 3:19 pm Posts: 2073
|
Re: Undocumented Key Commands
CaveCricket48 wrote: I have a feeling the collision system works off of these colors we see in the MOID view, by checking if colors hit or intersect other colors. Which is why you can only have 255 hittable objects at a time. So what you are saying is that the collision system is limited to an 8bit palette? \:| If so then all it would take to get past this issue is switching to 16bit (For the MOIDs only).
|
Thu Jun 17, 2010 1:05 am |
|
|
CaveCricket48
Joined: Tue Jun 12, 2007 11:52 pm Posts: 13144 Location: Here
|
Re: Undocumented Key Commands
Or making the collision system work off of numbers/arrays.
Like, instead of an image, you have a list with 3-numbered entries. 2 numbers are for "pixel" position, and the third is for ID.
(1,1,39),(1,2,39),(1,3,39),(2,1,39),(2,2,39),(2,3,39),(3,1,39),(3,2,39),(3,3,39)
^That would be a 3 by 3 pixel sprite with the MOID 39.
|
Thu Jun 17, 2010 1:18 am |
|
|
TheLastBanana
DRL Developer
Joined: Wed Dec 13, 2006 5:27 am Posts: 3138 Location: A little south and a lot west of Moscow
|
Re: Undocumented Key Commands
Take a look at DeepGroups and AtomGroups. As far as I can tell, they work the same way you're describing. When you set AutoGenerate to 1, it's generating that array for you. The Resolution is related to the number of pixels around the contour it skips. I'm sure the are reasons higher up than color for the 255-MOID limit, but it may be one of them.
|
Thu Jun 17, 2010 11:52 pm |
|
|
|