Sand Zone entities 106 and 601

Apr 9, 2015 at 7:49 PM
War criminal
"Life begins and ends with Nu."
Join Date: Jun 27, 2013
Location: Phoenix
Posts: 2765
Age: 29
If this was discussed before, then I apologize.

I found something quite interesting in the Sand Zone map. There are two unused entities near the Warehouse entrance with events 106 and 601.

p195300-0-fj82fod.png


Entity 106 looks like it could be a debug transport to the Labyrinth. What's more interesting though is Entity 601, which is also used in the Sand Zone cutscene room for when Misery appears, and Entity 106 is replaced by Entity 101, of which event isn't even in the script for that entity.

Because entity 601 is in both the main Sand Zone room and the cutscene room and Misery teleports in from Entity 601, was the cutscene supposed to happen in the main Sand Zone room and something happened that gave it its own room, or was Pixel lazy to add the script in the main room and just decided to give it its own room (similarly to the separate Arthur's House rooms if either case)?
 
Apr 9, 2015 at 7:57 PM
beep boop
Bobomb says: "I need a hug!"
Join Date: Aug 16, 2014
Location: no
Posts: 845
Age: 23
It may be because he was developing it, when he realized that the tilesets would need to be set to Balrog and Misery. Rather than go through hell to fix this, he just made a separate map. I belive this works with Arthur's house as well. I just figured this out as soon as I saw the question, so could some one check this? I think if we find that the tilesets are different between the maps, we have an answer to the question.

Edit: So, basicaly the most simple solution to a problem that he encountered.
 
Apr 9, 2015 at 8:02 PM
War criminal
"Life begins and ends with Nu."
Join Date: Jun 27, 2013
Location: Phoenix
Posts: 2765
Age: 29
That is understandable. But what I'm thinking now is, what if that cutscene was NOT originally going to have Balrog in it? Because in the actual cutscene, Misery shows up and teleports Quote to the Labyrinth, which could have been just that, as Balrog didn't really have much to do in it.
 
Apr 9, 2015 at 8:09 PM
beep boop
Bobomb says: "I need a hug!"
Join Date: Aug 16, 2014
Location: no
Posts: 845
Age: 23
Misery would still need a separate tile set, so my theory still holds. Anyways, Balrog was added to the scene likely to have some comic relief, and to make the game more fun. That was Pixel's goal, so it makes sense.
 
Apr 9, 2015 at 8:12 PM
War criminal
"Life begins and ends with Nu."
Join Date: Jun 27, 2013
Location: Phoenix
Posts: 2765
Age: 29
Misery has sprites in the NpcRegu bitmap, which can be used in any map.
 
Apr 9, 2015 at 8:15 PM
beep boop
Bobomb says: "I need a hug!"
Join Date: Aug 16, 2014
Location: no
Posts: 845
Age: 23
Oh, yeah. Then maybe it needed an extra map because Balrog was decided to be added into the scene, and the script was cut-pasted into the new map's location, so he wouldn't need to retype it.
 
Apr 9, 2015 at 9:50 PM
Giving it my all and shooting for the moon.
Modding Community Discord Admin
"What're YOU lookin' at?"
Join Date: Apr 23, 2013
Location: In a cave above the surface.
Posts: 1069
Age: 25
Yeah, NpcMiza.bmp is only loaded for the Misery Boss, but for all the cutscene entities she is in NpcRegu.

There are more similar weird instances in the game as well. Why are there Two maps ("Hell4" and "Hell42") for the Sanctuary Map connected to the statue room, the Plantation, and the Corridor to the Seal chamber? Why are there two versions of the side room (For "Egg Corridor" and "Egg Corridor?") if they are the exact same map entirely (excerpt for the exit <TRA coordinates)? Why are there an NPC for both Misery standing and Misery floating if you can ANP both of them to switch to the other? There is also double balconies (except that the secret area in the corner is removed in the latter, but everything else can be done flag-wise).

Daisuke Amaya was not an efficient person, which is actually perfectly okay because it's not like expanding to 1 MB is a problem. From what I heard his ASM code work is also horrible to work with due to sloppiness.
 
Apr 9, 2015 at 10:51 PM
Senior Member
"Huzzah!"
Join Date: Aug 24, 2013
Location: 0xDEADBEEF
Posts: 211
Bionicobot said:
Anyways, Balrog was added to the scene likely to have some comic relief, and to make the game more fun. That was Pixel's goal, so it makes sense.
He also might have included him since Balrog appears later as a boss in the Labyrinth and we need him to move the boulder since Curly and Quote are too weak.

EnlightenedOne said:
Daisuke Amaya was not an efficient person, which is actually perfectly okay because it's not like expanding to 1 MB is a problem. From what I heard his ASM code work is also horrible to work with due to sloppiness.
I've looked at some entity's code in ASM, and sometimes a command will be repeated, but will be redundant. e.g. moving a number into EAX, not changing it, and then doing the exact same thing with the same number. Relatively helpful though if you need space to add things.
 
Apr 10, 2015 at 12:16 AM
Administrator
Forum Administrator
"Life begins and ends with Nu."
Join Date: Jul 15, 2007
Location: Australia
Posts: 6210
Age: 38
What ASM work? He wrote the game in C++.
 
Apr 10, 2015 at 12:22 AM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 31
F_Deity_Link said:
I've looked at some entity's code in ASM, and sometimes a command will be repeated, but will be redundant. e.g. moving a number into EAX, not changing it, and then doing the exact same thing with the same number. Relatively helpful though if you need space to add things.
That's probably more the result of the compiler Pipelining his code rather than his coding style, since you don't actually deal with registers when writing C/C++ programs.
 
Apr 10, 2015 at 4:23 AM
Pirate Member
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Dec 26, 2007
Location: Lithuania
Posts: 1946
It's so weird that we only found out about this now - after more than 10 years since Cave Story came out.

Makes you wonder what other mysteries are waiting to be uncovered...
 
Apr 10, 2015 at 5:31 AM
Giving it my all and shooting for the moon.
Modding Community Discord Admin
"What're YOU lookin' at?"
Join Date: Apr 23, 2013
Location: In a cave above the surface.
Posts: 1069
Age: 25
(Pardon my going off topic but I have had something to point out and this is the closest active topic to discussing it).

The Sanctuary is just weird in general. Upon leaving Prefab House (post Undead Core) the game sets three flags, and one these flags (1534) pretty much sets all the enemies to spawn. For one reason or another Pixel at a time wanted the Butes and Co. to be toggleable. That's why upon simply <TRA'ing to the sanctuary maps they are completely empty if it doesn't have the setup.

My guess is that, like the one map connected to Plantation and Statue Room, the Sanctuary was supposed to be able to be traversed peacefully outside of being a final chamber. There is no reason everything is checked to "Appear on Flag" with each containing 1534 if Pixel had an original idea to do this, but later just decided against it and had the flag set upon the initial enter.
 
Apr 10, 2015 at 5:33 AM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4481
Not really much mysterious about it. Pixel used separate maps for long cutscenes likely because otherwise the tsc file would be really long and the map would be overcomplicated. So yeah, not totally efficient but certainly easier to deal with.
 
Apr 10, 2015 at 8:39 AM
Been here way too long...
Discord Group Admin
Org Discord Moderator
"Life begins and ends with Nu."
Join Date: Oct 18, 2011
Location:
Posts: 2337
EnlightenedOne said:
Daisuke Amaya was not an efficient person, which is actually perfectly okay because it's not like expanding to 1 MB 3.5MB is a problem.
It's not like map and script files are absolutely tiny no matter how many/how big they are or anything. Map and script files total 367KB. The tilesets /alone/? 341KB. Add on another 936KB for the bitmaps in npc, and yet another 400KB for those sitting in data. That's 1677KB for the bitmaps in the data folder (that doesn't even include the stuff stored in the exe) which is more than four and a half times the size of the maps and scripts. The bitmaps are actually larger than the exe itself, which clocks in at 1444KB. While you might immediately attribute this to the uncompressed nature of the .bmp file format, I'll point out that he saved as much space as possible with his bitmaps. Most of them are 4-bit (only 16 colours) with a couple of them being as large as 8-bit (casts.pbm, for example.) The game could be way larger than it is, but Pixel was in fact very efficient with the largest part of the game.
 
Apr 10, 2015 at 8:57 AM
Senior Member
"Ha! Ha! Ha! Mega Man is no match for my Mimiga Man!"
Join Date: Jan 22, 2015
Location:
Posts: 249
andwhyisit said:
What ASM work? He wrote the game in C++.
This is actually a common misconception. Pretty much the whole game is written in C. The Organya code is C++ though.

EDIT: Let's reply ;) Cave Story would've originally been written entirely in C. Why? Because it would've originally used PMD.
Another reply on his BBS says he wrote Cave Story mostly in C. AFAIK, he compiled it with Visual C++.
Visual C++ supports both C and C++. If you don't use any .cpp files, then your program will be compiled as a C program.
C and C++ aren't 100% compatible though. There are some subtle differences. So I'd say it is written in C.
 
Apr 10, 2015 at 9:21 AM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 31
duncathan said:
While you might immediately attribute this to the uncompressed nature of the .bmp file format, I'll point out that he saved as much space as possible with his bitmaps. Most of them are 4-bit (only 16 colours) with a couple of them being as large as 8-bit (casts.pbm, for example.) The game could be way larger than it is, but Pixel was in fact very efficient with the largest part of the game.
The bitmaps are still inefficient storage for the spritesheets. For example, NpcAlmo1.bmp as a 16 color bitmap is 37kb, but as a PNG it's 11kb. So if we assume the rest of the bitmaps followed a similar size reduction from PNG compression, we'd be looking at 600kb or less taken up by the bitmaps, as opposed to 1677kb.

Likely one of the reasons he might've stuck to bitmaps is that they're easier to open and process, from the programming side at least.

q3hardcore said:
Pretty much the whole game is written in C. The Organya code is C++ though.
The whole thing was compiled in C++. Regardless of whether or not it was written in the style of C, it's still a C++ game. Pixel is very much a C programmer at heart, as evidenced by the executable and by a reply he gave on his bbs when someone asked "how to program a player in C++" (he used a struct, not an object), but I can't find that reply anymore. But C code is technically C++ code, since C++ is fully backwards compatible with C.
 
Apr 10, 2015 at 11:49 AM
Administrator
Forum Administrator
"Life begins and ends with Nu."
Join Date: Jul 15, 2007
Location: Australia
Posts: 6210
Age: 38
GIRakaCHEEZER said:
Likely one of the reasons he might've stuck to bitmaps is that they're easier to open and process, from the programming side at least.
I would have done the same for the exact same reason. Actually, no. I would probably use .gif files instead (smaller size, and I would imagine a simpler format). But given that all of Cave Story's assets fit nicely within Pixel's self imposed 1.4mb limit (the size of a floppy disk) I very much doubt that Pixel was interested in optimizing image sizes any further and adding more complexity just for the sake of it.
 
May 1, 2015 at 2:49 PM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
The reason why a different Sand Zone map for the cutscene exists, is because Barlogs sprite couldn't be displayed because in the original map the second sprite sheet is used for Omega.
There are no differences between the two Arthurs House maps though. However it could be, that the one used for cutscenes originally used different sprite sheets as well and this was changed during the development process (probably rather late). Or it's just to organize things, who knows?
 
Top