SNEER (Symphony of the Night Editor and Entity Recompiler) by Nyxojaele

Started by Nyxojaele, August 23, 2010, 08:56:46 PM

Previous topic - Next topic

Nyxojaele

So I gave a bit of a hint about this project the other night on #romhacking, but now that I'm a member of the forums, this shall be my place to call SNEER's home~

Current download status: v0.15 Available (as a viewer only)

Nyxo's TODO List (in no particular order...)

  • Entity Graphics
  • Editing of tiles
  • Support for different sizes of rooms (more specifically, allow each room to take a different amount of disk space)
  • Dialogue/Text Editor
  • Audio Editor
  • Script/Entity AI Editor

Basically what the intention of this project is, is to allow direct editing of the SotN map files from the CD.
Each zone is composed of 2 map files, XXX.BIN and F_XXX.BIN. (There's other files too, but they're just audio stuff)
F_XXX.BIN contains the graphic for the tileset, and XXX.BIN contains EVERYTHING ELSE.  This includes, but is not limited to:

  • Map layouts: Foreground layers, Background Layers, and Collision Layers
  • Entity spawning code: A function that runs once when you enter a room, and a function that runs once every frame
  • Compressed Entity Graphics
  • Entity AI code: This includes code to animate sprites, as well as movement/attacks/etc...
  • Scripted sequence code: This includes dialogues, switches, etc...
A lot of this code, it seems to me, could have been written external to the map files, not only reducing the map file sizes, but making things more standardized as well as reducing in multiple copies of the exact same code. ~sigh~

Currently SNEER is capable of loading/rendering an entire SotN zone's tiles, including background tiles, foreground tiles, and collision tiles, and additionally showing markers for where all the entities are positioned in the rooms.  Note that there are some zone changes that most players will not be aware of, while playing the game.  Most boss fights are in their own zone, not the actual "containing zone," the warp rooms are all in a zone together, but separate from everything else, and the dream sequence is it's own zone.

Something interesting to note is that when viewing the different layers, you can definitely see different "styles" of map making being used-- this is likely because more than one person was making the maps at Konami.  There are some rooms with a background layer that scrolls at a slower speed than the foreground, and that is to apply an effect of depth to the room, so that makes sense.  But some maps use this same background layer and [somehow] set the scrolling speed of it to the same as the speed of the foreground layer, making it all appear as one layer.  Conversely, there are some maps that instead just put everything in the foreground layer, leaving the background layer empty.  Regardless of how they decided to do it tho, the foreground layer will never -actually- be empty, because the collision data is stored in the foreground layer.  In SNEER the collision data is displayed as a separate layer, but in reality, it is indeed, a part of the foreground layer.  The background layer is capable of storing collision data, but afaict that collision data in the background layer is never accessed by the game.

Another note about the collision data, is that there are some "special tiles" also, that define some additional collision (and non-collision) data for the game.  For example, grates that you must use mist form to get thru, spikes that hurt you, and walls/floors/ceilings that are breakable.  Also stored in the collision layer are the tiles that contain water, including the entire waterfall.

At this time, SNEER cannot edit/save the files back-- this will be extremely difficult at best, until I can fully understand the map file format, as there are a LOT of pointers that rely in data being positioned exactly where it needs to be in the file, to function properly.

The graphics were made possible by emulating the PSX's Video RAM in software, and graphical hardware in a pixel shader.  The entity graphics will be made possible via my WIP PSX CPU emulator.  Unfortunately, all entity graphics, animation, etc.. are handled by each entity's AI, making it a royal pain to try and parse, which is why it requires a CPU Emulator.

After loading a map, the Virtual Video RAM can be viewed if you'd like, but note that it's more intended for my debugging purposes, and as such, it won't show very accurate information-- it only shows the VRAM state as it is after loading the last room of the zone (each room will potentially overwrite some entity graphics from a previous room, but the tile graphics will remain unchanged)

SNEER can now load all zones and all boss zones.  Only interesting notes are marked here:
Please also note that the 3d animated backgrounds seen on these maps do NOT load, nor do the entity graphics get assigned to the entities- only loaded into Video RAM

  • CAT (Catacombs) - The spiked area you need to use the bat sonar to get thru actually render with green outlines.  I wonder if this is an indicator to the game that sonar should bounce off of it?
  • DRE (Dream) - There's actually 2 identical rooms arranged vertically, one with entities, one without.
  • NO3 (Castle Entrance) - The forest Alucard runs thru at the beginning is below the castle entrance, about 1 screen's space below the useless hidden save point- it extends from about the castle door until approx the room where you first see Death
  • NP3 (Castle Entrance) - This is an exact duplicate of NO3, except that there are different entities, and there is no forest section outside the gate, or "below the entrance"
  • SEL (Title Screen) - There's no map data, and no map-requested entities.
  • TE1 (Test1) - It's a long straight hallway.  Very long.
  • TE2 (Test2) - See TE1
  • TE3 (Test3) - See TE1
  • TE4 (Test4) - See TE1
  • TE5 (Test5) - See TE1
  • WRP (Warp Rooms) - Yes, all 5 warp rooms are in their own  zone

  • RCAT (Reverse Catacombs) - See CAT
  • RNO3 (Reverse Castle Entrance) - The outside forest is still there (this time above the entrance, obviously- but some of the tiles haven't been flipped upside down, so it looks a little weird)
  • RWRP (Reverse Warp Rooms) - See WRP

Short vid of loading and viewing CHI: http://www.youtube.com/watch?v=Cgwo4XfrIOo
Screenshot of MAD:
Short vid of loading and viewing collision info in CAT: http://www.youtube.com/watch?v=PhIn2RQ3ei4

Gideon Zhi

Damn, dude. That's a hell of a first post. I'll probably never use this, mind - no offense intended, but I have lots of other stuff on my plate and no real interest in hacking SotN - but that's still crazy impressive.

Gemini

Very interesting method of rendering all the rooms together. I really like it, and I might actually steal you the idea for my Red Moon editor. :o Also nice work on the R3000 interpreter for loading all that entity crap. Dracula X is definitively a mess to work with, no matter how advanced hacking techniques get.

QuoteSEL - Crash due to no map tile data
You can ignore this one. It's just the start menu, not a real map.

Asylum

Sounds great. I might look into this when you're done. So, we could probably replace audio and edit maps, but what about the script, and graphics? If what you say is true, we could even edit ai...

Gemini

Provided that you know R3000 assembly, AI can already be edited. By the way, unless this editor turns the code into high level commands, there's no way the common newbie can edit the AI and most of the procedures.

Dashman

sounds really sweet. if editing maps/enemies becomes possible I can see lots of SotN hacks coming... now if somebody would figure out how to alter the game mechanics that would be awesome! :D

blacksniper

There was a guy awhile back that was making a killer hack of this game... although I think he quit due to all the people telling him they weren't going to play his hack because they didn't agree with his choice of difficulty. He felt that making boss fights take a few minutes was a tougher fight (I agree) because your endurance actually comes into play and not just how much damage Alucard can take / do in 30 seconds. His hack was really impressive though, he changed bosses HP and gave them totally new attacks. If you wanted to make a hack  or maybe improve the editor he wouldn't be a bad guy to hunt down.
---
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world.

Next Gen Cowboy

This is wicked impressive, but like usual I'm more interested in the notes and other information, like the green outline, and the placement of the forest.
"Remember when we were in Japan? You said you were my gun, if you're the gun then that means I'm the bullet."

"All my life I've been waiting for the gunpowder to go off, you know what you need to ignite gunpowder? You need a gun."

Shimok

Quote from: blacksniper on August 25, 2010, 02:25:09 PM
There was a guy awhile back that was making a killer hack of this game... although I think he quit due to all the people telling him they weren't going to play his hack because they didn't agree with his choice of difficulty. He felt that making boss fights take a few minutes was a tougher fight (I agree) because your endurance actually comes into play and not just how much damage Alucard can take / do in 30 seconds. His hack was really impressive though, he changed bosses HP and gave them totally new attacks. If you wanted to make a hack  or maybe improve the editor he wouldn't be a bad guy to hunt down.

You mean Esco?  I've been following his hack for a long ass time.  He changes forums every couple years. 
He used to post here http://www.anarchylive.com/index.php?showtopic=48&st=0
and now he updates his hack here http://www.chapelofresonance.com/forum/index.php?/topic/5795-the-castlevania-sotn-hacked-thread/

blacksniper

Quote from: Shimok on August 25, 2010, 04:12:33 PM
Quote from: blacksniper on August 25, 2010, 02:25:09 PM
There was a guy awhile back that was making a killer hack of this game... although I think he quit due to all the people telling him they weren't going to play his hack because they didn't agree with his choice of difficulty. He felt that making boss fights take a few minutes was a tougher fight (I agree) because your endurance actually comes into play and not just how much damage Alucard can take / do in 30 seconds. His hack was really impressive though, he changed bosses HP and gave them totally new attacks. If you wanted to make a hack  or maybe improve the editor he wouldn't be a bad guy to hunt down.

You mean Esco?  I've been following his hack for a long ass time.  He changes forums every couple years. 
He used to post here http://www.anarchylive.com/index.php?showtopic=48&st=0
and now he updates his hack here http://www.chapelofresonance.com/forum/index.php?/topic/5795-the-castlevania-sotn-hacked-thread/

Wow, yeah, that's the guy. I honestly thought he died.
---
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world.

Shimok

Yeah, he tends to disappear completely a few months out of the year.  Sometimes he can come across as kind of a jerk, but he actually seems like a decent guy.  If nothing else, I think what he has accomplished speaks for itself.  I know one of the things he was having difficulty with was anything involving graphic editing as well as map editing so Nyxojaele's editor would play well into that

Nyxojaele

I just discovered that most of the bosses in the game have their own zone maps, so I tested all of the available files and added the results to the top post.  I also changed the description of the zones to accommodate.  I can't be 100% sure until SNEER is capable of loading all the available files, but I suspect there are a couple bosses (Darkwing Bat for one?) that don't get their own zones to battle in.

I'm currently looking into 2 different things right now:
1) Map loading code.  If I can find this, I may be able to manipulate stuff so that new zones can be created and linked to from existing maps  This will be invaluable in helping to stitch zones together.
2) Entity graphics code/definitions.  Since this is all handled via code, I feel it might be a while to get them in place, but at the same time, once it's in place, I think they may animated.

@Gideon Zhi:
Thanks for the warm welcome!

@Gemini:
Thanks for all you've done to help me understand the PSX architecture-- I'm sure you'll be invaluable in the future as well~
Feel free to use my layout idea for your own editor- I feel this is likely the best way to build a map-- knowing everything that is around the room you are working on^^

@Everybody else:
Esco is the guy you're talking about, and I've been in contact with him already.  He's actually the guy who gave me the initial push to actually start working on this editor (I had only been toying with the idea before that...)
His hack looks quite interesting based on what he's accomplished already and what he plans to do, but I'd like to point out the difference between his hack, and what this editor is going to be capable of:  His hack relies quite heavily on having external scripts running via memory hacking software at the same time as the emulator you are running Symphony of the Night on.  What SNEER is intended to do, is to save ALL changes directly into the map files, so there will be no need for any external files.  Just load the game and play.

Esco

Lol, it's a small world after all, ain't it folks.  8)

And I never, EVER quit. I just take breaks; I work, have a business going, hit the gym 4 days a week, and I like to party. I also have a girl I am seeing, so I stay VERY busy. Thanks to all of my fans though, here is the link to the current forums where I keep updates: http://www.chapelofresonance.com/forum/index.php?/topic/5795-the-castlevania-sotn-hacked-thread/

August 28, 2010, 02:24:08 PM - (Auto Merged - Double Posts are not allowed before 7 days.)

Quote from: Nyxojaele on August 26, 2010, 11:18:50 PM
I just discovered that most of the bosses in the game have their own zone maps, so I tested all of the available files and added the results to the top post.  I also changed the description of the zones to accommodate.  I can't be 100% sure until SNEER is capable of loading all the available files, but I suspect there are a couple bosses (Darkwing Bat for one?) that don't get their own zones to battle in.

If it doesn't load when you enter the bosses room, they don't have their own zone. :) The ones I can think of are Slogra & Gaibon, Darkwing Bat, Karasuman, and Lesser Demon. I can actually spawn one of them as an enemy, in the same stage that they appear in. But if I try with one like Akmodan for example, the game would crash. Because the AI just isn't there.

As for the stages:

MAD is a debugging room for sure. What I am wondering about is if there are actually any spawnable sprites in this area, and if so which ones? If there were I could turn it into another stage.

NP3: this is the 2nd entrance; after you enter the lab, and come back enemy placement changes. New enemies appear and old ones vanish and can longer be used (their AI info just isn't there, and vice versa for NO3. So for example I can't use Warg in NP3, and I can't use bloody zombie in NO3.) Funny note: in NP3 if you go to death's room before beating slogra and gaibon, they appear there and you can battle them. If you beat one they both run away.

ST0: intro stage; it has some VERY interesting properties going on.

MAR: this is your 1st meeting with Maria; notice how it loads before you enter. Though I have NO IDEA why it was programmed retarded like this for this one meeting.

DRE, LIB, BO4, BO6, RBO5: these all load fine in my current map editor. You may wish to glance at the code for it.

If you have any other questions, please feel free to ask me Nyx.
Esco.... the original Nuyorican Latin Lover! And creator of the Castlevania: Symphony of the Night engine!

My Patreon page for the Castlevania: SOTN HACKED Engine: http://sotnhacked.wordpress.com/

Nyxojaele

Another update:
I've found how the game determines room counts in the map files and now use that in SNEER.  I've also found some new information about how the game parses indices for loading entities, allowing me to fix all entity-based crashes.  EVERYTHING LOADS NOW!
I've also discovered there's some hidden rooms on the "other side" of loading rooms that I had seen info about briefly, but promptly forgotten about-- well, now SNEER is showing them in all their (invisible) glory.
I'm also having serious progress on how zones are stitched together, and with any luck, I can implement info on that into SNEER in the next day or 2.

I'll be updating the top post with the new information.

@Esco:
That makes sense.  I never really paid attention to if there was loading before bosses or not before ;p
MAD has entities, that's for sure, I just haven't really looked into _WHAT_ yet.  But no entity graphics get loaded into VRAM, so I don't think any "spawnable" entities exist in it.  Not to mention that Gemini and I were screwing around last night and got ourselves into MAD in-game, and there was no discernable entity interaction in it at all.

Thnx for the info on NP3, makes sense, and now that you mention it, I remember that about the entities changing.

On ST0: I know, I'm -really- looking forward to screwing with entity scripts in that zone!

I'm aware of how the maps load in your Mappy plugin, but it cheats in more than a few places in regards to loading the info, and while that may work for all of the provided maps, I can't guarantee it'll work for any user-created maps in the future, so I'm programming SNEER to load things "properly" to avoid potential future issues.

Neil

Nyxojaele, thanks for posting status updates. This is the type of stuff I LOVE to read on this board. Always really cool to hear the basics about how some game works internally. The progress you've posted looks amazing!

Nyxojaele

SNEER now fully supports collision info in the maps.  I used existing tiles (from MAD) to create the collision graphics, and did my best to create new graphics that followed the same conventions used in MAD, where graphics didn't exist.  (This applies mostly to sloped ceilings/floors, where they slope only 1/4 of a tile vertically)

I also rewrote the rendering engine's core components, and it now renders approx 50% faster than it used to.  Not to mention, in the code itself, it's a lot nicer to look at and easier to maintain/modify in the future^^

Also some minor graphical changes- the ability to change the background color between "Editor" and "Game" colors, and I changed the generic graphic used to represent entity placement.  Currently this applies to all entities, but once I have entity graphics in place, this will only apply to entities that don't have a graphic associated with them, such as triggers for scripts, etc...

Here's a video of the new update: http://www.youtube.com/watch?v=PhIn2RQ3ei4
Top post has been edited to reflect new info

Jigglysaint

I'm glad to see more SOTN hacking going on, and also to see that the hack isn't dead.  Good stuff takes time to make.

Disco_Stu


BlackTelomeres

I realize this is rather early in the development process, but do you have an IRC channel or something that is/will be dedicated to discussion of this editor and its development? It seems like a significant venture given the scale and popularity of SotN and it could be useful to get feedback from potential users.

Nyxojaele

Hey everybody, I just wanted to give a bit of an update on what's going on so you all know~
I recently started a new job, this time in computer programming, and as such, for the time being, I likely will have little to no time to work on SNEER until I can get up to speed at my new job.  Most of my free time is being spent trying to learn all the new technologies and frameworks in place at the new company, so I don't really have much time for hobbies until I'm done getting up to speed.

But fear not, as SNEER is still very much something I intend to continue to work on- it's just that I need to concentrate on my career first, and once I'm comfortable there, I can start to afford myself more time for my hobbies.

@BlackTelomeres:
No, I don't have an IRC channel or anything dedicated to this project.  I don't suspect that there really is enough interest to dedicate something like that to this project, so I think, at least for now, that this thread will suffice quite well for all discussion about SNEER, or even SotN level hacking in general, if anybody so pleases.