Castagne Engine

The Open Source Fighting Game Framework

Forum - Discord - Youtube

Alright, new system is still in development, but it already works at the level of the previous one so let me share some early info!

The old AttackCancel system was just syntaxic sugar over an InputTransition. Works well enough, but there’s many cases where you need to do some extra work, namely for when an attack has prerequisites. Not really an issue, but still something you had to keep in mind often.

The new AttackCancel system has two major differences. The main one is that an AttackCancel now holds much more information inside, such as its motion or potential conditions for the cancel, which allows much simpler use. The second is the interface through metadata (which in fact shaped a lot of that system).

The base function is now just AttackCancel(State), with the state holding all the relevant info inside. That means you don’t need to specify an additional motion or check for meter cost and the like, that’s all inside of that little call. As I’m expanding the system, I’ll add more options to override the default values, such as adding an alternative motion for cases like a followup you can also do from neutral. These are not really new capacities, just a new simpler interface for that.

The way you actually use the system is simple: just put some metadata at the top and most of it happens automatically. A lot of the attack system now goes through that. Let’s take a look at a simple attack using an F branch:

+AttackType Light
+AttackDuration 60

F12-15:
	Hitbox(10000, 5000)
endif

Let’s break down some of the parts:

  • +AttackType is a metadata line, and is the equivalent of AttackRegister from the previous version. It mostly works the same, but the new compiler features allow some extra conveniences, such as easier specification of attack types and the compiler warnings guiding you in the proper direction to make new ones. It will call AttackState and AttackType-[TYPE] (hook) for you.
  • +AttackDuration is another metadata line. This time, instead of waiting until runtime to see the duration of the attack, it now will get it from the metadata, which is going to be relevant for frame advantage computations. The upcoming T branches will set this automatically.
  • +AttackMotion can be used to add as many motions as you want. It is not present here, so it defaults to the state name if it is a motion.
  • Then it’s buisiness as usual. I’m assuming you already used Castagne if you follow these updates lol

Planned upcoming metadata elements are +AttackCost and +AttackRequires, which make the cancel unavailable if the conditions are not met.

Next up here is going to be blocking, and how the attack cancel system will interact with this hitconfirming system. The remaining tasks for this gate are mostly related to the attack system, improving physics, or improving the editor.

Also, forum is back online. If it goes down again I’ll cry. I’ve improved the server config to host additional services in the future (in fact, I’ve already added one two months ago but it’s not ready for public use yet).

Try the Godot 3 Version now!