Cave Story engine-rewrite/clone

Jul 4, 2010 at 10:09 PM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 32
Noxid said:
That's a seperate part of the function though, with its own call to detect the collision.

Oh, so you're saying that 2 checks are run: A solid collision check, and then a seperate damage check. (not necessarily in that order).

That seems a bit silly to me, that Pixel would have made them seperate. Maybe it works better, but I think it'd be more efficient to run both checks at the same time (since they use the same hitboxes) and then just skip damage calculations during events. Silly Pixel.
 
Jul 4, 2010 at 10:29 PM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
What I noticed is that the "evil door" collision in First Cave doesn't work right o:
If you stand next to the 2 blocks where the evil door stands on and jump up, then it deals damage. In the original Cave Story it doesn't.
 
Jul 4, 2010 at 10:30 PM
Neophyte Member
"Fresh from the Bakery"
Join Date: Jul 4, 2010
Location:
Posts: 9
Now that's a much more eloquent way of doing it and now it makes sense why it behaves the way it does. There's no "override" parameter, it just wasn't calling hurtplayer in the first place.

DragonBoots: joystick support is something I really wanted to include, but I don't have a joystick. Maybe I can find a joystick emulator or something to test with. Water does slow you down in nxengine, it has for quite awhile. Where are you seeing it not? Maybe there is a tilecode set wrong somewhere.
 
Jul 4, 2010 at 10:39 PM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 32
I think you'll want to check/redo the hitboxes of the entities nxdream, since like SP I've been noticing a couple instances where things seem too skinny or too fat (their hitboxes).

What you might want to do is grab a copy of cave story and then a copy of Cave Editor (ver 0.98d I think). Then you can use the npc.tbl editor that Cave Editor comes with to grab all the hitboxes and other values that entities have (since it seems that you aren't reading npc values from the npc.tbl). It contains both the hp of entities, the hitboxes, the experience dropped, and flags (like solid and such).
 
Jul 4, 2010 at 10:45 PM
Cold Agony of Resolute Vacuum
"Heavy swords for sale. Suitable for most RPG Protagonists. Apply now!"
Join Date: Jan 1, 2008
Location: Elsewhere
Posts: 1973
Okay, here's a weird one: Stand against the far-left of the upper level of Momorins hideout.
And then press and hold jump.
Is it just me or do you get about ~1 second of hang time? O.o

And the not-slow-water is in the Plantation.

Aaaand... Neither missile can apparently destroy destroyable block...

EDIT: And a REALLY minor graphical thing: The parallax with layered scrolling is *slightly* off. If you watch just below the sun/moon on the balcony, you'll see a tiny piece of it scroll underneath.

EDIT EDIT: Notes on the 'final' 3 bosses:

- Misery should take a max of 80 (or 86) damage before she flashes and disappears with her attack.

- The Doctor's red bloody mess migrates upwards with the crystal, IIRC... Not sure. Can someone verify?

- Pre-Undead Core sequence: The Doc's red messy stuff should be drawn /under/ the foreground (eg. Solid) tiles, not over. I had hitbox display on. ^^;

- Undead Core fight: Doesn't take enough damage before hiding in its shell.

- Post-Undead Core fight: THE THING IS STILL THERE?! WTF?

EDIT EDIT: Nitpick - The explosions on the dying undead core are all centered on one part when they should appear randomly around it.

HUGE FUCKING EDIT: BALLOS ONLY HAS 2 FORMS?! I think something got broken there...
 
Jul 4, 2010 at 10:46 PM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
GIRakaCHEEZER said:
What you might want to do is grab a copy of cave story and then a copy of Cave Editor (ver 0.98d I think). Then you can use the npc.tbl editor that Cave Editor comes with to grab all the hitboxes and other values that entities have (since it seems that you aren't reading npc values from the npc.tbl). It contains both the hp of entities, the hitboxes, the experience dropped, and flags (like solid and such).

It would be much easier if nxdream reads the hitboxes from the npc.tbl.
The file format is well documented and since he can write a complete engine in C++, he will be able to read from the file.
Do you want to check every npc with Cave Editor? It would take years.
Plus Sue's Workshop (my developed version) is able to extract all the framerects. (From the exe) I could give him the list. So nxdream would be able to see if he has missing animations or something o: (the animations are very undocumented)
 
Jul 4, 2010 at 10:53 PM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 32
S. P. Gardebiter said:
Do you want to check every npc with Cave Editor? It would take years.

You would have to be pretty slow for that hyperbole to be true.

Then again, it IS a hyperbole.
 
Jul 4, 2010 at 10:58 PM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
GIRakaCHEEZER said:
You would have to be pretty slow for that hyperbole to be true.

Then again, it IS a hyperbole.

Still it's a lot of easier and original to read it from the npc.tbl, rather than getting 380-something entries with stats from Cave Editor.
 
Jul 4, 2010 at 11:03 PM
Lvl 1
Forum Moderator
"Life begins and ends with Nu."
Join Date: May 28, 2008
Location: PMMM MMO
Posts: 3713
Age: 32
S. P. Gardebiter said:
Still it's a lot of easier and original to read it from the npc.tbl, rather than getting 380-something entries with stats from Cave Editor.

Well yeah.

I guess it's as you said, if nxdream is a programmer worth his salt (which he appears to be) he should just read the values from the npc.tbl. He should include an npc.tbl editor too then, since it's opensource (or we could just use one of the existing ones).
 
Jul 4, 2010 at 11:20 PM
Neophyte Member
"Fresh from the Bakery"
Join Date: Jul 4, 2010
Location:
Posts: 9
Actually the door doesn't strictly hurt you if you jump straight up, but I found a player physics glitch that can make your inertia not get reset which, assuming you walked straight up to the wall and then jumped, may have led to you inadvertently moving into it when you shouldn't have.

Wow, you totally do get hangtime. It turns out that the ceiling slope right there is the 2nd tilecode out of the slope tiles, and due to a misuse in the way the check-bopped-head-on-slope function was called (the variable it was being assigned to used to be a bool but is now int), it was copying that 2 value into the player's "blocked above" variable, which long-story-short a 2 there happens to have a different meaning which led to it thinking you were bopping your head on one of the vertically moving blocks in the labyrinth, which don't reset your yinertia.

I do parse npc.tbl for most of the values, but I don't currently use the bboxes out of it. At the time I wrote the loader, I didn't understand how the bboxes worked. Also, the SIF file format used by nxengine doesn't work exactly like npc.tbl, and it has a few extra fields for example you can store extra bboxes for each frame, plus in nx there's a distinction between the sprite (the graphics, bounding boxes, block points etc) and the object (the associated AI code/behavior). I used those features in a few of the more complex enemies so a straight replacement wouldn't work, but I think I'll look up the info on npc.tbl available here and see what I can come up with as far as converting the data or perhaps just running a quick program to check all the bboxes and find the ones that are off. On the enemies I did earlier in the project I tended to be a bit overambitious in setting the bboxes, trying to get the collision detection technically correct, later I learned it looks a lot better if you're more "sloppy".

BTW, does anybody know how flag 0x400 i.e. "Drop Hearts and EXP" or FLAG_DROP_POWERUPS is supposed to work? It seems unreliable, for example it isn't set on the Midorins in the Plantation yet they clearly drop powerups, and I think there were a few projectiles from the Egg Corridor that don't drop powerups but it's set. Right now I just ignored it and made my own flag for NOT dropping powerups, which is set up manually in AssignExtraSprites().
 
Jul 5, 2010 at 12:37 AM
Vanished.
Bobomb says: "I need a hug!"
Join Date: Apr 5, 2008
Location:
Posts: 776
nxdream,
what about joining the IRC Channel?
#Doukutsu on irc.esper.net

Also:
why is there no internal help function?
Including a list of the objects from objects.h
Oh and what about auto completion?
spawn 5 critter_fly TAB -> auto completed.


Why is there an option for 1/5 Save Slots?
What if I want more? :D

You got a way how I can donate to your project?
I really enjoy this.
This is what could break the curse of these forums.
Can't help you much with nit-picky details about Cave Story, but I'll think of more useful features.
 
Jul 5, 2010 at 12:44 AM
Hoxtilicious
"Life begins and ends with Nu."
Join Date: Dec 30, 2005
Location: Germany
Posts: 3218
Age: 32
Schokobecher said:
nxdream,
what about joining the IRC Channel?
#Doukutsu on irc.esper.net

That would speed up things a lot o:

Edit: I'm not sure about drop hearts and exp. But some entities ignore some entries from npc.tbl and instead the functions are coded into the exe.
 
Jul 5, 2010 at 2:18 AM
Neophyte Member
"Fresh from the Bakery"
Join Date: Jul 4, 2010
Location:
Posts: 9
Hi Schoko, I could probably rummage up an IRC client. I didn't actually use the spawn function except a couple of times, so it's really just something I threw in for fun and is only minorly developed. What are you using it for, TSC script testing? Spawning 30 bosses at once? I can keep that in mind when working on it. I've wished for the auto-complete function to work on the parameters a couple of times; I'll have to rewrite the code some to get it to be more generic because atm it's only really designed to work with the command and there's not really any good way to cajole it into doing otherwise. In the meantime I cut and pasted this list out of object.h if it's more convenient for you: http://nxengine.sourceforge.net/objdefs.txt.

5 save slots was as many as would fit on the screen :D but if you have a need for more I suppose it could be made to scroll. You can write me if you want, my email address is on the webpage.
 
Jul 5, 2010 at 3:40 AM
Neophyte Member
"Fresh from the Bakery"
Join Date: Jul 4, 2010
Location:
Posts: 9
WTH? DragonBoots, I just noticed your reports of issues with the Undead Core and Ballos, I definitely remember coding 4 forms so that is totally not right! I just warped to Black Space and killed the core and it stayed dead, can you post screenshots and/or a replay of the incident?

- Undead Core fight: Doesn't take enough damage before hiding in its shell.
- EDIT EDIT: Nitpick - The explosions on the dying undead core are all centered on one part when they should appear randomly around it.

Are you sure? I counted. I came up with 50 on the skull and 150 on the teeth, and the mouth state never ends. 2) That is what they're supposed to do, sounds like you're having really bad luck; your computer isn't listening to me :D. Can you reproduce it?

edit 2: I couldn't ever get the replays you sent to run for more than a couple of seconds, they seem to have gotten corrupted somehow; I made some changes based around a stab at why that might have happened and I'm redoing the format some to make it easier to forensically figure out what went wrong should it happen again. However, I looked over the Ballos code and I found a few things that if you were very lucky may been what led to you being able to kill him from his 2nd form; first the eyes weren't animating properly when they closed because I forgot to reset a timer, second the eyes didn't go invincible until they were fully closed which means you had two frames after the on-death script starts that you could still damage him (although that alone isn't enough to trigger it unless you were able to deal 1200+ damage in 2 frames), and lastly, and I think this is the most likely, it's possible that if you were able to damage both eyes at the same time, probably using the Spur, and some other things happened in just the right way, you may have been able to deal killing damage to him twice in the same frame, triggering the death script twice, which would cause him to blow up from his 2nd form instead of going onto the 3rd.
 
Sep 9, 2010 at 9:16 PM
In front of a computer
"Man, if only I had an apple..."
Join Date: Mar 1, 2008
Location: Grasstown
Posts: 1435
Whoa, just noticed this thread. I realize that it hasn't been posted to for quite awhile, but perhaps resurrecting it will attract the developer guy back... hopefully.

GIRakaCHEEZER said:
[Edit]: One other small thing, in the original CS, when the window wasn't active, the game would just STOP. It would stop processing everything if it was minimized or if another window was brought to the front. I recommend that you find a way to emulate/do this as well.
This doesn't occur in the Mac version, though, so I'd make it optional (set a preference or something).

S. P. Gardebiter said:
It would be much easier if nxdream reads the hitboxes from the npc.tbl.
The file format is well documented and since he can write a complete engine in C++, he will be able to read from the file.
Easier, but not necessarily better. The npc.tbl format is kind of restrictive if I recall correctly.

Schokobecher said:
nxdream,
what about joining the IRC Channel?
#Doukutsu on irc.esper.net
You can use http://mibbit.com if you're too lazy to download an IRC client.
 
Nov 23, 2010 at 4:33 AM
Junior Member
"It's dangerous to go alone!"
Join Date: May 22, 2008
Location:
Posts: 35
Not to be a necro-poster (come-on! it's only been a month!) but I think this is the best thing since Agora's Legends. I can't wait to see how it turns out and here's to hoping that nxdream comes back *crossing of the fingers*

I hope to plan to use this to obtain the physics values for quote and the camera movements to use in other games, I quite like them!
 
Nov 23, 2010 at 7:54 PM
Neophyte Member
"Fresh from the Bakery"
Join Date: Oct 28, 2010
Location:
Posts: 4
This is pretty nice. I went looking for something that would let me play CS in a bigger window awhile back when I got my 1080p monitor. I wish this would let me go one size bigger than 960x720 though. And it's lacking controller support (I guess I can just use xpadder for that).
 
Nov 25, 2010 at 4:34 AM
Junior Member
"It's dangerous to go alone!"
Join Date: May 22, 2008
Location:
Posts: 35
I just found a bug. In the original game, during a dialogue, if you press z or x to speed up text display and then while holding the button down, press the other button to advance the dialogue, it allows that. In your engine, when pressing down the speed up button and advance button at the same time, the advance button doesn't work. You have to only press one button to advance the text, which gets annoying for someone who likes speeding through the text.
 
Nov 27, 2010 at 11:13 PM
Indie game enthusiast
"What is a man!? A miserable pile of secrets! But enough talk, have at you!"
Join Date: Apr 18, 2006
Location: Forever wandering the tower...!
Posts: 1789
Wow, I'm checking this out~

EDIT:

OKAY! I checked it out for a bit~
Amazing, it's like the real thing but better xD

Still there are some differences/bugs (this from a 10 minute check) :
I get the sound cuts off bit on certain sounds. I wonder if it's a soundcard thing? I wonder if changing the directx level would help?
Sounds that cut off, like the menu, you've made a choice sound (not the move up and down one), hurting enemies that squeak, cuts off noticeably...

Music sounds different, same but different than the original. Also all sound seems like it isn't highhh quality 44Khz or 48Khz...
Big mushroom in graveyard, doesn't act the same (when shot he doesn't move towards the player like in the original)
Little mushrooms drop hearts... (not in original)
Balrog's hitbox is a different size than the original. I can touch him without getting caught.
I can use the health monitor in first cave without being on top of it, just close next to it.
Elephants in the Egg Corridor seem to act different :
Two lvl 1 polar shots and they go berserk. Should be different than that.. have to check the real amount but I believe it's more.
Elephant berserk mode doesn't have a sound effect and shake the screen like original.

I'll do a more comprehensive check on the game if you want me to (are actually here lol)!
Amazing work, love the little options menu background stuff xD
Oh, and there is no way to cancel a save? (When saying I'll save, and looking through the 5 choices... can't cancel the save?)

<3
 
Nov 29, 2010 at 6:05 PM
Indie game enthusiast
"What is a man!? A miserable pile of secrets! But enough talk, have at you!"
Join Date: Apr 18, 2006
Location: Forever wandering the tower...!
Posts: 1789
Since we have the source code for this project... does this mean we can create new boss battles? *downloads source*
 
Top