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-04-13) Elseif, Static Strings, Before Event

I’m not sharing much these days since a lot of my improvements are editor-side and unfinished, but I did progress enough to start writing gameplay! And while I’m doing that, I’ve been adding some features. I’ve bundled enough of these in this post to share.

First off: we got some nice syntaxic sugar with handling of else if! It makes some code a lot nicer to read:

I Down:
	V MOVEMENT_StandToCrouch_Time:
		Transition(StandToCrouch)
	else
		Transition(Crouching)
	endif
else I Forward:
	Transition(WalkF)
else I Back:
	Transition(WalkB)
endif

I would have needed a whole more endifs and indentation to write that. You might also have noticed the space between the branch and the condition. It was already working due to how I’ve implemented the lexer, but now that I’ve noticed it I quite like it! The space is optional, but I recommend using it unless it’s something with just a number like F10+:, which also btw now works but it’s not exactly new lol.

Secondly, strings! We already had them in the old Castagne, but this one is different: they are all static, meaning they don’t get changed during execution. This ensures fast speed, as passing a static string is as fast as passing a regular value. This was already in the engine as I’ve been using it for all the Target.Variable stuff, but it’s now available as a proper type. I wanted to delay this implementation to avoid using strings as a crutch instead of more relevant semantic types, but it’s now done and I need stuff like file paths to work.

Finally, I’ve added a new event: Before, which executes at the start of the main phase. This is because I noticed a design flaw during a discussion about engine internals: since I only transition the state at the END of a tick, if you press a button, you’ll only start the attack on the next frame. This effectively adds one frame of input lag. This can be avoided with some tricks that are a bit complex in some cases, but not all. By making an event that allows transition, I can do an early check much more simply, and make many actions have less lag. I don’t think it’s going to be on the mind of most users. Here’s the main phase flow now:

  • Before Event fires, and some of the input and transitions are handled directly.
  • Early state transition, which can fire Exit and Enter. No sync point here, so it stays fast.
  • Action Phase is executed, you do your actions.
  • Sync point between the entities. No transition here.
  • After Event is fired.

This makes the main phase a bit complex now, but I hope this ends up being manageable. We will see. In any case, there’s now less input lag so that’s good!

I’m still working on a lot of stuff at the same time, I will post other updates when I feel they show enough what I’m going for.

(2026-04-07) Game Link Improved

Little update: the game link feature of the editor, which connects to a separate game process, is now much more robust. I’ve done that by fixing two things:

  • Skill issue on my part, where I forgot that streams are not cut automatically. This led to “packet drop” by virtue of the algorithm thinking it was getting weird packets.
  • Speed mismatch between the game process and the editor. Funnily enough, this was an issue on the local side, as I’ve added the local test option without thinking and it was ticking at a much faster rate.

So now, it’s working as expected, at a stable framerate. As always, you can always run it directly. Very nice.

My eyes have been blessed with high framerate, which is nice, but for now I’ll keep the engine at 60 ticks per second. I might add high FPS later, but raising the physics rate itself will destroy online quality, as making it twice as fast requires the computer to be four times faster for the same result, so it would cut a large portion of the player base.

(2026-04-06) State Call Defaults

Today, I’m making updates for me. That’s right, it’s the castagne dev experience update, but CASP-side this time.

You know how sometimes you want to make a part of a state easily extensible? Like how I like having WalkF and WalkF-Movement so that you can completely change the movement if you don’t like it? It’s great for the end user, however it’s always annoying to set up: I need to create several states. That’s partially why I added hooks, so that I can “add” these without really doing work, with a simple WalkF-Anim? for example. The issue is that they don’t do anything, therefore if I want to have behavior you can change as opposed to behavior you can add, I still need to go through that process. Introducing:

!WalkF-Movement:
	Move(1000)
endif

As you might expect, it’s just like a hook, except if the hook doesn’t exist it will call on the interior code! That allows these elements to be MUCH cleaner, as all the behavior is in the same state. These have got two particularities:

  • You can’t use arguments. If you want arguments, you need to define them and therefore should add them to an actual proper state.
  • Call Parent works, HOWEVER it is a tricky one: the parent will ONLY exist for that specific state that calls the default. This means the same function could compile to different code, and that !!? is mandatory. Good enough imo, it’s added as the base parent so overriding the hooked state works as usual, it’s just a tricky integration that most likely won’t come up unless you start calling on hooks from several states or have several defaults.

Another update is that, since the Castagne base files are now embedded inside of the binary, well you can’t really change them. This instantly makes the lock feature of the old editor unneeded since you can’t change it, but that means that I as a dev can’t do that either, which is annoying for development. I’ve therefore added an option where you can give the path to Castagne’s source to load these dynamically!

These updates mostly affect me since I’m the one writing the base CASP files lol. I am making my work environment better so that I can do better work, and I wish to thank me for taking the time to add one of my requested features.

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 EdSpec / Gizmo System
  • WIP Skeleton and MechMod
Editor
  • OK Basic Structure
  • OK Game Streaming
  • WIP Code Editor
  • Blocks Editor
  • EdSpec / 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!