Game
Project TUSSLE

8 years ago

Feature Friday - Articulate!


So, let’s say you’re working on a character in the builder. You don’t know python, so you’re using the Basic Fighter System. One problem, though: you need projectiles! Projectiles are an important part of Smash Bros and other Platform Fighters, and TUSSLE is no different! Previously, projectiles, particle animations, and other extra visual effects (known in-game as “articles”) required you to program them in Python, even to load them through XML! If you don’t know Python, you’d be out of luck!

Thankfully, that is no longer the case! We have added on a system for loading articles from XML just like fighters and actions! If you’ve looked at the action update before, you’ll have a good idea of where to start. Articles have subactions and groups just like actions do, with only a few differences. Let’s take a look at one of Hitboxie’s articles:

5d0b94ec740ad.png

It’s set up much like an action would be, with sprite, length, and spriteRate (currently left off to default at 0, since this article is not animated) but it also has some new fields: img_width, origin_point, and facing_direction.

img_width is the size of an individual frame of animation in a sprite sheet. You’ll recognize this from the fighter.xml, where it is used to slice up the fighter’s sprites. Articles can have different sizes than fighter images, so you can define a new one here. If left off, the sprite will default to using the entire image.

origin_point is the offset from the center of the fighter that the article is created on. For example, this article is created at (0,0), the centermost point of Hitboxie. These indexes are based on the center in the form of (x,y), where positive x is forward and positive y is downward.

facing_direction is the default direction of your sprite. 1 is right, -1 is left, and 0 is neither/symmetrical. If the actor’s facing direction is different than the article’s default direction, it will flip the animation to face the same way.

You’ll also notice a new group, collision. These events fire whenever the article collides with any object, and checks what classes that object has. If they have a class that has subactions assigned to it, it will run them. In this case, if the splatArticle collides with an AbstractFighter (any playable character) or a Platform (things you can walk on), it deactivates itself.

A few other quirks of Articles over Actions:

  • Articles need the full file name, since there are no prefixes, and the engine does not pre-scrape the directory and load them into memory. It will search the directory defined as article_path in fighter.xml

  • Even though the subaction says “ChangeFighterSpeed”, it works on articles as well. This will likely be changed to simply, “ChangeSpeed” in the future to avoid confusion.

  • The Article XML file can be defined with the new <articles> tag in fighter.xml. Just point it to an XML file containing your articles.

  • There are some new article-specific subactions, such as deactivateSelf (used above in the collision events) as well as recenterOnOrigin that moves the article back to its origin point on the fighter (computed from the fighter’s current position if they’ve moved)

If you’d like to see it in action, Zero will be getting some Article love in this week’s stream! Head over to https://www.twitch.tv/digiholic tomorrow at 4PM MST (3 PM PST) and watch! We’re in the home stretch on finishing TUSSLE’s first unofficial fan character! (I may be the developer but I’m still a fan darnit!)



0 comments

Loading...

Next up

WARNING! Challenger Approaching!

Legacy Editor: Re-imagined

Feature Friday - Control Freak

Feature Friday - Minor Text Fixes

"Thanks guys for endless hours of fun." 👍

(My first fan art. Read the article, please.)

#sonic #mario #photoshop

What do you think guys in my robot?Just a beginner in 3d modeling..

My instagram https://www.instagram.com/rojhonbb/

Terraria

An infected room from the second part of Cybel ! Are you up for some cleansing?

Levels' maps.