Castagne Engine

The Open Source Fighting Game Framework

Efficiency

Make attacks faster than some games load! The Castagne Editor is easy to use when starting out, and unlocks incredible speed once you learn it!

Flexibility

Why limit yourself? Castagne’s flexibility allows you to use it for many action genres! Fighter, Platformer, Beat-them-Up? Go ahead! Want to add a dash of fighting to your TRPG? Use Castagne as a module!

Full Package

Don’t just make a prototype, make a full game! Castagne has Rollback compatibility at a core level, and support for many game modes and quality of life features!

Forever Yours

Castagne is Free and Open Source Software (MPL 2.0 Licence), meaning you will never get locked out. Your game will be your own and in your complete control.

A Hybrid Engine

Castagne isn’t a regular game engine: it’s a specialization of any engine. Written in Rust, it’s easy to hook it to general purpose engines like Godot and use the best tool for the job!

Solo or Team? Dev or Artist?

Castagne welcomes all. Precision design allows ways to edit code graphically, while still saving it in text for VCS. In a team? Easily define interfaces for your designers to adjust attacks. Experts and beginners alike are delighted.

Go Beyond

Castagne’s design allows maximum flexibility within some key, tasteful constraints that allow performance and great tools. Make combo unit tests, analyze your data, and make the best game you can.

Vibrant Community

Come and talk with other developers and players, and maybe find your next project! Ask for help, give feedback, show your work? We’re currently on the Forum and Discord!

Hey! Panthavma here, I'm Castagne's author! The Godot 3 version was a long prototype, and I'm finally making the complete vision of Castagne! I want to make something that is still useful in 10 years, and all those previous tests help do that. That's not to say the Godot 3 version is lacking: commercial games have already been released in it, you can try it out!

The Rust version of the engine is still a work in progress, which I'll release in beta when I'm proud of it and I'm confident it can handle current projects. You can follow development here or on any of my channels. Stay tuned!

Follow castagne's development!
Youtube - Mailing List - Forum - Discord - Twitter - Bluesky

Games with Castagne

Kronian Titans

Panthavma

2D Fighter / Airdasher

Complex machines fighting at high speed! Tame each mech’s unique weapons using simple inputs and become an ace pilot!

Molten Winds

Panthavma

2D Tag Fighter

Magic and technology intertwine in dynamic teamfights! Level up and call upon your allies to decide the fate of the Ashen Island!

Parable Academy

Snuffysam

2.5D Tag Fighter / Airdasher

A fast-paced tag fighter with only one attack button! A Fabled curse has swept the world… ordinary teens have begun transforming into characters from their favorite classic stories. Put together explosive team combos at Parable Academy for Fabled Youths!

Fraud Fight

Jope / JoshuaJacobsonArt

Platform Fighter

A fast-paced, free-flowing platform fighter with a Shibuya Punk and Y2K aesthetic!

Revolution Core

Grave=the=Fenrir & Howling Mind

2D Fighter

Inspired by anime fighters of the 2000s, Revolution Core places player expression first and foremost. Wield your character and the Assault System to slaughter your opponent any way you see fit. The seven-day battle royale has begun…

Latest Progress Updates

(2026-03-28) Walking is now optional, but Standing is not (MechMods!)

This one is one of the more user-facing additions: MechMods! I’ve finally added the multiple file inheritance. The compiler-side was working, but it wasn’t yet searching for files by itself. ‘Bit more robust than before too. So, what is the general order of files?

  1. Base CASP: These are fundamental files that are included with their specific module. These are mandatory, and define some key concepts for the engine.
  2. MechMods (Mechanics Modules) !NEW!: These are optional files that define game mechanics. You can enable and disable them as you wish from the editor.
  3. Common Skeleton: This is a file YOU make that holds all your common behavior, such as system mechanics.
  4. Fighter: This is the character you make! It holds all your character specific behavior.

The common skeleton and fighter are self-explanatory and were already present before. The difference is in the Base CASP and MechMods, which solve an organizational problem much more elegantly than before, and are one of the most impactful new features in my opinion.

If you remember, Castagne is surprisingly game-agnostic: it just assumes you have entities directed by state machines. In practice, you have a lot of common behavior that got put in the Base CASP, and from there you could rewrite what you didn’t want. As time went on, I’ve added more integration of that base behavior, including visualisations and interfaces (the SpecBlock system), which improves the common usecase but makes the other ones a bit clunkier.

This new organisation goes both ways: on one hand, it makes Castagne more knowledgeable about some game concepts, and on the other hand the other game concepts become much more malleable. I’ve selected some concepts to become core components, for example the dichotomy of Grounded / Airborne, the concept of a combo, hitstun and blockstun, the difference between a neutral state and a comitted state… There’s not that many, but each allows the engine to do a lot more, while also not restricting the ideas you can do much (e.g. you can ignore the Airborne concept if your game has no jump). Many of them are also linked to their module, so for example if you change the physics module you won’t have the Airborne concept.

This allows the MechMods to know much better what they can rely on, and thus focus on key elements. This allows me to separate many common behaviors, such as:

  • The Movement MechMod, which has never-before seen elements such as Walking Forward, but if your game has no use for that you can disable it. (Standing is part of the Base CASP, hence the title of this update)
  • The Dashes MechMod, which adds many fan favorites such as Airdash or Running.
  • The Combo Proration MechMod, which adds limits on your combos by reducing their damage and hitstun over the hits.
  • The Combo Escape MechMod, which adds a burst to your system mechanics.
  • And many others of course. The full list is still being built, and the granularity might change, but you get the idea.

Just based on that, you can see how much more powerful the flow just became. If you want a mechanic in your game, you just enable it and get it immediately, and the interface allows easy access to them. I’m also thinking of allowing MechMods for characters on top of the skeleton, so you could surgically add an airdash to a character.

MechMods are what makes a lot of the new additions I’ve made make sense: the state call hooks (!!? especially) allow extension of behavior without requirement, the helper functions allow definition of new tools like !StandardAnim(Standing), and especially the upcoming VarSpec system. This is the last missing piece for my full vision: a system to allow additional editor integration of CASP tools in a simple way. A big element of the SpecBlocks in the editor was how they allowed very strong integration in-engine through buttons and graphs, and this is now comming to CASP itself! This will push Castagne to new heights, and I can’t wait to be able to use it!

(2026-03-26) Battle Init Data

Yo! Another update to a structure you know (and love?): BattleInitData, which as the name implies, holds the data needed to initialize a Castagne fight! Most probably didn’t use it much, but it’s been a cornerstone internally.

There is not much to talk about to be quite honest with you, as the ideas work the exact same, the interface is just better. It used to be an unwieldy JSON dictionary with a weirdo format, now it’s a properly reified object with a functional interface. Here’s an example where I create two players and their character, both have a 100 meter but the second one only has 1 HP.

// Assume we got config, player_1_scripts, and player_2_scripts properly handled before
let mut bid = BattleInitData::new(config);
let character_1 = bid.player().entity(player_1_scripts);
let mut character_2 = bid.player().entity(player_2_scripts);
character_2.entity_override("HP", MemoryEntry::Int(1));
bid.entity_override("Meter", MemoryEntry::Int(100));

As you’ve seen, it is simpler to build, and the previously available functions are there. Overrides allow you to change a variable from the character at creation, and you can set them up to be inherited. As such, the Meter override here was set at the root, so it applied to all entities defined in this BID, while the HP one was only done to a single entity. You can override global, player, and entity variables, as well as create entities with no player parent.

This is still a work in progress, as I’m focusing first on key functionality there. The new idea is that known data can be set more easily in general when the engine knows about it, with simple functions. Here’s an example of a new functionality: instancing subentities directly:

bid.player().entity(scripts).subscript(fireball_subscript_id)

This is honestly fairly low priority compared to other tasks once that the basic functionality is there (some overrides don’t currently work because there’s no player memory yet for instance). It’s needed to set up fights in the editor and game, but at the moment only the first is needed to get started with the engine (as you remember with my priority list). Still, are some planned / potential functionalities:

  • First of all, there is going to be a host engine interface. That example was in Rust, but you’ll be able to have a very similar interface from within Godot.
  • The flow module will be able to handle “standard” variations of this. An example you already know is the fighting variation, which just gives you a 1v1 with potentially multiple characters.
  • An idea I’m evaluating, is the ability to save a state to a BattleInitData, which would allow to store state on disk. This could be REALLY strong for editor tools.
  • Another idea in a similar way, is the ability to add BattleInitData DURING a fight. With proper management (keyword: proper), this could allow complex worlds and situations, which would be quite interesting for the more platforming focused cases.
  • Another one that’s linked to both, is the ability to reference existing HostStructs or similar from within. I’m not sure yet of what this would imply, but the idea is to be able to integrate Castagne into game flows better, like starting a fight from an RPG overworld seamlessly. We’ll see when I need it I guess lol, that’s real low prio compared to actually making stuff work.

Next up is multiple file loading for CASP files, as well as Editor control there. It’s time for the Base CASP to get a tune up, and that would already cover most of the prerequisites for the engine!

(2026-03-24) Physics engine okay!

Big milestone! I’ve advanced the whole engine flow enough so that we now have both physics and attacks working! They kind of go together.

First off: Physics. The new engine is more advanced than the previous one, as it’s made to handle more colliders and both 2D and 3D at the same time. 2D colliders are compatible with 3D and vice-versa, although it’s not what I would recommend to use lmao

At the current moment, it’s at mostly parity with the previous engine. While I could finish it right this week, I know people will want to use the new Castagne for the upcoming Indie FG jam this april, so I’ll be postponning it for a bit to focus on the editor.

Something that is of note here is the interface: the collider functions have changed. While I know this adds additional work for the porting of projects, after tests I’ve seen that this way is a bit better.

  • Colbox and Hurtbox now work with an horizontal center, and a base and height. This is a better way to adjust colliders that are close to the character imo. Colbox(0,100,0,500) (equivalent to Colbox(100, 500)) will produce a box going from -100 to 100 horizontally, and 0 to 500 vertically, so it’s a simple way to add one to characters.
  • Hitbox now works with width and height from the lower back corner. Hitbox(0, 100, 0, 500) (equivalent to Hitbox(100, 500)) will produce a box going from 0 to 100 horizontally, and 0 to 500 vertically. It reflects the more forward-facing nature of hitboxes, and thus allow faster set up.

I’ve set it up this way because it also becomes easier to move colliders around from code, as instead of being coordinates it’s now origin and dimension. This makes operations easier, except shrinking a collider forward which is the same difficulty as before. Do note that the order of parameters stays coherent: it’s dimension by dimension, and the shortcuts are (width, height) and (width, base, height) for each function, covering most cases.

This is not fixed in stone yet, so you can discuss it on the forum. Something to note is that I’m planning on adding drag-and-drop in the editor for these, so it should be easier to set up once the editor is more featured.

Some changes on the Attack module front too, although this one is quite tamer. It’s just a slight rework of the attack events, which work as such:

  • At the start, OnAttacked is called on the defender. This is the first event, where most attack overrides will happen. This is before the blocking computation, so you can potentially decide to get hit or not, which is a new ability.
  • After that, either OnAttackHit or OnAttackBlocked is called on the attacker depending on the result. The rest of the overrides happen here, and that’s where the attacker gets his meter and whatnot.
  • Finally, OnGetHit or OnBlocking is called on the defender. This is where you apply the changes to HP and the like.
  • In the case of a clash, only OnAttackClashed is called on both clashers.

All attack events share two properties: the target is the opponent for the attack, and Attack. allows you access to the current attack instead of preparation. This is intended to allow more flexibility in case of multiattacks and to enable more behaviors. Do note however, that the engine doesn’t store recieved/inflicted attacks anymore so you can’t refer to them outside of these events.

There’s more upcoming changes, although this post is long enough and I’m deciding on the details. Something to note, in this whole rework, is that the engine now makes more assumptions about your game, one of the key ones being the ground. The previous Castagne didn’t really care, but this one assumes that being grounded or airborne is a fundamental caracteristic of the game. I like that because you can ignore it if you don’t care, but it allows better integration, which really helps many cases. This is a throughline of the updates.

My next step is to advance the flow module, and to advance the editor workflow. I want the engine to be ready for the jam, although if you want to use it you’ll need strong basics with the previous one. Please get in touch, as this will probably be a closed beta, as it has enough caveats that I don’t want it available without supervision, and instead focus on a polished release. See you next update!

All Progress Updates - RSS Feed

Task List

This list is not exhaustive, and can change often. It represents my global progress with this version, which will release in beta when it’s more complete.

Engine Core
  • OK Castagne Virtual Machine
  • OK Entity Lifecycle
  • OK Subentities
  • OK Inter-Entity Communication
  • OK Module Interface
  • Castagne Config
  • Profiling Framework
  • Memory Stack Rollback
  • WIP Instanced Data
Language
  • OK Castagne Compiler
  • OK Semantic Representation
  • OK Robust Compilation
  • OK Host-Engine Functions
  • OK Phases and Events
  • OK Basic Branches
  • OK State Calls
  • OK State Calls with Params
  • Advanced Branches
  • WIP Structured Variables
  • WIP Varspec / Gizmo System
  • WIP Skeleton and MechMod
Editor
  • OK Basic Structure
  • OK Game Streaming
  • WIP Code Editor
  • Blocks Editor
  • Varspec / Gizmo Display
  • Castagne Config
  • Tools Framework
  • Tutorial System
  • Docs System
Core Functions
  • OK Basic Math
  • WIP Vector Math
  • Trigonometry
  • Randomness
  • WIP State Transitions
  • OK Flags
  • WIP Log / Error
  • Freeze / Halt Phases
  • WIP Targetting Functions
Input Module
  • WIP Input Layout System
  • OK Combination Inputs
  • State-Derived Inputs
  • OK Input Events and Buffer
  • Motion Inputs
  • WIP Input Transition / Flag
  • Fake Press
  • Input from Config
  • Replay
Physics Engine
  • WIP Environement Collisions
  • Expanded Env. Colliders
  • WIP Colbox Collision
  • WIP Attack Collision
  • Expanded Attack Colliders
  • WIP 3D Physics
Flow Module
  • OK Battle Init Data Interface
  • Simple Fighter BID Interface
  • Simple Level BID Interface
  • Simple World BID Interface
  • Rounds and Reset
  • Custom Exit
  • Training Mode (basic)
  • Menus Specification
  • Host Engine Integration
  • Options Menu
  • Input Rebinding
Attacks Module
  • WIP Attack Data Storage
  • OK Attack Param Base
  • Attack Data Optimization
  • Attack Overrides
  • WIP Attack Events
  • WIP Blocking System
  • CASP Hitstun Management
  • Basic Attack MechMods
  • Combo-Awareness MechMods
  • Attack Cancel Rules
MechMods
  • Fighter Flow MechMods
  • Attack Mechanics MechMods
  • Movement MechMods
  • Combo MechMods
Graphics Module
  • WIP Godot Integration
  • Sprite Sytem & Integration
  • Shader Modifications
  • WIP Model Management
  • VFX System
Audio Module
  • Godot Integration
  • Audio Parameters
  • SFX Definition
  • SFX Parameters
  • Background Music Support
  • Dynamic Audio Support

Try the Godot 3 Version now!