View unanswered posts | View active topics It is currently Thu Jan 16, 2025 11:06 am



Reply to topic  [ 20 posts ]  Go to page Previous  1, 2
 Prefabs in CC 
Author Message
User avatar

Joined: Mon Aug 17, 2009 3:00 am
Posts: 242
Location: The Great White North
Reply with quote
Post Re: Prefabs in CC
I'm pretty sure the reason there are 255 MOIDs is because the game attains pixel perfect collision by maintaining [at least] three bitmaps: the screen, the buffer, and the collision bitmap, which uses the actor's MOID colours to determine collision.
I think.
BAM.


Wed Sep 08, 2010 2:56 am
Profile
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post Re: Prefabs in CC
There really wouldn't be any reason to use a colour for collision detection.


Wed Sep 08, 2010 3:12 am
Profile WWW
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Prefabs in CC
It's far, far more likely that Data decided on 256 as an easy integer that actually works fairly well in most gameplay situations. Having it be exactly one byte just makes sense.

Making the MOID screen + palette was probably an afterthought, more of a debugging system than any specific design choice.

Data has some odd programming habits, but linking the number of objects in his simulation to a color palette is not one of them.


Wed Sep 08, 2010 4:31 am
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: Prefabs in CC
Why would you try to do collision with a bitmap layer, regardless?
afaik (from working with the collision system in-game/.ini, not in-sourcecode) collisions are done using atoms arranged into atomgroups which are compared to the terrain layer and then to other hittable MOs if relevant. I just wish data would make the atomgroups into n-gons rather than discrete atoms. It'd make lores atomgroups a lot more viable, especially for larger sprites, and also make deepgroups almost needless. The ability to define custom atomgroups would also be nice.


Wed Sep 08, 2010 4:44 am
Profile WWW
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: Prefabs in CC
Grif wrote:
Making the MOID screen + palette was probably an afterthought, more of a debugging system than any specific design choice.

Or just convenient.
I insert a fictional recreation. Scene is Data's basement, one late Saturday night. It is raining.
Data: "Hm, now I've got this array of MOIDs, so all of them exist here and then if they go over I'll just explode them... And there's exactly 256 of them, nobody will ever need more than that! 256... Same number as 8 bits of binary could encode... Like the 8 bit palette that the game uses..."
*thunderclap*
Data: "I've got it! When you turn on this "MOID Mode" it'll color code them to the palette!"
And so the palette was linked.
yeah that sucked well blah


Wed Sep 08, 2010 4:48 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 20 posts ]  Go to page Previous  1, 2

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.047s | 14 Queries | GZIP : Off ]