Hey! It's my birthday today, but I'm bringing YOU gifts! Here is finally the update where we merge back into the main branch.
You might have skipped it, so reading the previous changelog is a good idea, since its changes are also here!
Overall, this update gets back to the same level of base functionality of v0.52, but with much better UX, more configuration, and a lot more potential for growth!
Now that the dev branch is freed up, I'll release updates more often there, no need to wait for bigger reworks at the moment. Thus, next versions of the v0.54 cycle are going to be more incremental, like adding dashes or wallbounces.
There are some breaking changes which will require a bit of work, but it has been simple in my experience.
This update was a long time coming! I know people have been waiting for it so I put some extra care in, so tell me your feedback! I'm for one really glad that it's done, it's been a joy to make and then use, and I'll hope you'll find it too!
Main Additions!
- TUTORIALS IN ENGINE!!!: Improved even! Now covers the whole basics of Castagne with interactive segments! It will really help!
- New Physics Module: New collision system for environments and characters! Now more controllable and flexible, and can handle any number of characters.
- New Attack Module: Attacks can now be registered directly, and depending on type! Less error prone, more flexible, and easier all at once! Available types are Light, Medium, Heavy, Special, EX, Super, Throw, ThrowFollowup, and Air variations (AirLight, AirMedium...)
- Motion Inputs: First contribution to Castagne! Thanks to mrgoodtimehaver for implementing it!
- Full new and documented Base CASP: A lot more flexibility in behavior, all able to be read through from the editor itself! Read the full changelist below for more details.
- Improvements for the Castagneurs: The Castagneur has been renamed Baston Labatte, the name Castagneur now being for all of Castagne's official characters. Added a menu to create new characters with animations faster!
- VFX System: Still experimental, but lightweight and easy to use!
- No Code move creation: Also experimental, it uses the engine's feature to try a solution.
- Performance Improvements: Fixed some memory issues, improved performance with constants.
Porting Guide
If you overwrote Base.casp states, you'll need to reevaluate each of those
First Step: Apply the update
- Make a backup of your project beforehand
- Replace the
castagne
folder with the contents of the new version.
- Open the Godot Editor to ensure import is done
- Open the engine. If asking about Genre, put either your game's genre or none.
- Do the tutorials so that you know how the new version works
Second Step: Update the characters to the new attack interface. You'll have to do find and replace in an external editor. Some of those are Regexes, which you can apply with some editors. I've done it with GEdit.
- Attack functions (REGEX) - Find:
Attack\((.*),(.*)\)
, Replace: AttackDamage(\1)
AttackDuration(\2)
(The line break is important). The remaining Attack
functions have only one param and can be replaced with AttackDamage
directly.
- Attack cancels (REGEX) - New interface has some constants which you'll have to find the ID of for now, in the documentation as the
ATTACKCANCEL_ON_
family
- Find:
AttackCancelOnTouchAndWhiff\((.*),(.*)\)
, Replace: AttackCancel(\2, \1, 7)
- Find:
AttackCancelOnTouchAndNeutral\((.*),(.*)\)
, Replace: AttackCancel(\2, \1, 11)
- Similar for the others
- Attack Register (Find and replace) - No more Standing / Crouching / Airborne / Variable attacks. These will make all your attacks Mediums. You'll need to go through each attack to put the correct type down (Light, Heavy, Special, etc).
- Find:
Call(StandingAttack)
, Replace: AttackRegister(Medium)
- Find:
Call(VariableAttack)
, Replace: AttackRegister(Medium)
- Find:
Call(AirborneAttack)
, Replace: AttackRegister(AirMedium)
- Find:
Call(CrouchingAttack)
, Replace: Flag(Crouching)
AttackRegister(Medium)
(line break is important)
- AttackHasTouched (Find and replace) - Now has an underscore before it, same for others. Find:
VAttackHasTouched
, Replace: V_AttackHasTouched
- Tag became _Category (Find and replace) - I recommend redoing it manually, because you can now add nesting. So Find:
Tag(
Replace: #Tag_(
- Default inputs have been replaced from A B C D to L M H S, to avoid confusion with controller buttons and be more 'natural'
- Find:
IAPress:
Replace: ILPress:
. Find IA:
Replace IL:
- Find:
IBPress:
Replace: IMPress:
. Find IB:
Replace IM:
- Find:
ICPress:
Replace: IHPress:
. Find IC:
Replace IH:
- Find:
IDPress:
Replace: ISPress:
. Find ID:
Replace IS:
Third Step: Fix manually the last parts
- Entities have been reworked. Your CreateEntity code is broken and should be commented out for a moment before you get back to work on it. I recommend adding a
_StateFlag(Marker1)
or ## TODO
line to be able to find it quickly.
- Usually will have functions like
SelectOriginalEntity
and SetPositionRelativeToRef
that don't exist anymore next to it
- Movement values have been reworked. You'll need to copy your values where needed, in the new Variables blocks
- Animations have been reworked. Same as the last, you'll need to put your animation values where needed.
- You can now put the Skeleton from the editor, so it's probably a good idea to do so
The process can be a bit slow depending on how much you changed, but these steps should give you a big headstart. Don't hesitate to ask some questions on Discord!
Full Changelist
- Engine / Parser
- Fixed memory leak with the new Memory / StateHandle management
- Improved memory efficiency and performance by removing constants from the game state
- Added constant replacement in branches' conditions
- Parser now optimizes out empty branches
- Physics
- Rewrote collision handling code
- Now separated into Environment Collisions (Movement) and Attack Collisions (Hitboxes)
- Can now declare Col/Hurt/Hitboxes with only 2 or 3 parameters
- Environment Collisions
- Can now handle any number of hitboxes
- Added Environment Constraints
- Added AAPlane (Axis-Aligned Plane) as a primitive.
- Environment collisions can now raise flags based on the colbox collisions
- PFGrounded is active when interacting with an upwards AAPlane. PFAirborne is active when PFGrounded isn't
- PFWall is active when interacting with a sideways AAPlane
- PFCeiling is active when interacting with a downwards AAPlane
- Margins have been added to be able to continue detection when nearby.
- Movement algorithm has been improved
- Movement can now be separated into buckets for more precision. 4 by default.
- Applies pushback, then environment constraints
- Colboxes now have layers that influence collision
- A colbox's layer by default is the Player's ID + 1
- Every colbox can in one of three collision modes:
- Default: Own layer + Layer 0
- Own Layer: Own layer
- Other Layers: All except own layer
- If two colboxes are in the same layer, they can influence each other
- Colboxes interact with the environment constraints in the same layer as them
- Added Phantom Colboxes, which only interact with the environment
- Added Fighting Arena as a default environment constraint collection
- Provides walls and ground
- When only two players are in, additional constraints are added:
- Max distance between the two players
- Additional walls prevent corner stealing
- Attack Collisions
- New algorithm in two steps: gather potential collisions, then handle them
- Added an optimization on hitboxes and hurtboxes by computing AA boxes
- Added friendly fire option per hitbox
- Added Clashes
- Three clash modes:
- Trade Priority (default): If a hitbox hits both a hitbox and hurtbox, it's a regular hit, not a clash
- Clash Priority: If a hitbox hits both a hitbox and hurtbox, it's a clash.
- No Clash: Only hits
- Attack Module
- New attack registration interface:
AttackRegister(Type, Notation)
. Notation is optional
- Can be separated into
AttackRegisterNoNotation
and AttackAddNotation
- Types can be set by the user, and defined in the CASP files
- Calls upon the
AttackType-[TYPENAME]
state.
- Automatic category based on which type is used
- Attack Cancels have been reworked
- Now use the InputTransition system, meaning everything that worked there works here too
AttackCancel
is now a single function that can take an additional bitfield to know which situations it applies to
- Through the
ATTACKCANCEL_ON_
family of functions, but at the moment they can't be used from the CASP side
- Attacks can be added by type using
AttackAddRegisteredCancels
- CASP Callbacks
OnHit
and OnBlock
called on the defender
OnAttackHit
, OnAttackBlock
, OnAttackClash
called on the attacker
- Now a default attack is prepared always, meaning no more crashes when forgetting to do so
- Editor
- New warnings for attack states
- Can now hide gizmos with a toggle
- No more pause menu for now
- Added blocking settings to the editor in the meantime
- Tutorials
- Tutorials can now allow the user to play around in the engine
- New Tutorial button on top of the editor during tutorials to continue, quit, or reset code
- New Tutorial: How to create a character
- New Tutorial: How to make attacks
- Can now select a base Castagneur to copy models and animations from to jumpstart character creation. (Done with a skeleton)
- Added a way for config fields to show predefined options instead of free entry fields
- Added a bytecode visualisation tool to the compilation tool
- Added a game state size visualizer to the compilation tool. Updates on Reload.
- Errors now show for both loaded scripts
- Categories now remember when opened / closed
- Can open / close all categories at once
- Graphics
Anim
function improved to be more easily compatible with AnimProgress
- Pixelsize renamed to "3D Pixelsize" to make it clearer
- Fixed a bug with scaling of sprites in 3D
- Added a new VFX system that's lighter than entities and simpler to add. Experimental.
- Inputs
- Added motion inputs using numpad notation
- Added 'Any Button' combinations which trigger with any of the specified buttons, in addition to 'All Buttons'
- Renamed A B C D to L M H S
- Added Pause button
- Added Throw, Jump, and Tech macros
- Castagneurs
- Castagneur has been renamed Baston Labatte, to make a funny pun and free up the 'Castagneurs' name to mean all the Castagne official characters
- Baston's autocombo has been removed to serve better as a simple example
- Updated to v0.53.1
- All his states are documented
- New Baston2D file using sprites, very simplistic for now
- New animations for Baston to handle movement states
- BastonModel.casp added as a base for graphics.
- Base CASP
- Now in several files. Not all additions are written here.
- All states are documented
- Added Attack Types with their icons
- Normals: Light, Medium, Heavy, AirLight, AirMedium, AirHeavy
- Specials: Special, EX, Super, AirSpecial, AirEX, AirSuper
- Throws: Throw, ThrowFollowup, AirThrow, AirThrowFollowup
- New
StandardState
base state, and NeutralState
.
- Associated
OnReturnToNeutral
callback
- Movement:
- Now can be customized through Variables blocks
- Added ability to turnaround when not facing the target
- Added Stand to Crouch and Crouch to Stand
- Added Crawling states
- Physics:
- Added Physics constant for different states
OnLanding
callback
- Landing lag can be managed dynamically
- New throw / throw teching system
- VFX spawns on hit/block
- Helpers
- StandardHurtbox and StandardColbox added automatically. Can be stopped with
NoHurtbox
and NoColbox
flags
- Attack Cancels added automatically depending on type. Can be customized in Variables.
- Misc / General
- Documented functions on almost all modules
- Added an interface for module constants, treated as variables for now
- Fixed a bug where branches in Reaction phase wouldn't be used
- Fighting UI back in for now
- Known Issues
- State flags of earlier files are still shown