0 Favourites

Branch Programming - Visual Edition

  • I was wondering. Has anyone thought of this yet ? I'm aware construct sets the bar really high for some features and it's really complete, but some simple necessities feel like a hard-to-get result when you have a billion conditions that limit them or enable them.

    In construct you can have a character, for instance:

    -walk

    -run

    -crouch

    -attack

    I need to make conditions within these 4 stances to make it understandable that you can attack while walking. You can attack while crouching. You cannot attack while running, you cannot run while crouching and so on.

    This system can turn quite confusing if your game has a bunch of stances to wich priorities may vary, so I was wondering about branching and if there was a possible way to get it to C2.

    This way you can link which actions are conditioned to a current one, and not make exceptions to every other actions that are not currently 'true'.

    I don't know. This would also make animation workflow much simpler.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Why not use Booleans?

    on key x pressed, and variable run = false, then attack

  • yes, you can use a Boolean, actually for all of my test and project, my character can run, jump, swim...etc and use different weapons, at the same time....with like 40 event (or less)

    I means, if you use just one sprite for you character, you can make a different animation for everythings (mario style...)

    If you would like to make an advance animation, you have to "split" your character in different sprite, like arms, body...etc

    and you can make a "dinamic" animation for everything...for my opinion, the last one is better, but depends....

  • The way I'm currently managing it is with booleans actually. The only part that pains me is that when there are MANY booleans, your conditions turn into a giant list like

    IsStand

    XIsWalk

    XIsRunning

    XIsAttacking

    XIsJumping

    XIsSpecial

    XIsEtc...

    So you have to limit conditions based on a big list of booleans and (if it happens that you want to add a new state/boolean) you'll have to retrace all of the current actions to add that exception/permission to every other action you've already set.

    It's just no that practical

  • There is a FSM plugin but TBH I haven't worked it out.

    Adding a finite state machine as a 'first class' concept in Construct would be great, with visual editing tools. It's something virtually every game needs.

  • You could just get rid of those booleans and use "if playing animation" checking instead and use a single boolean like "Busy" which activates when player is doing something that restricts movement etc. In my game I just set "Busy = 0" into all controlling events and set it to 1 when attacking, jumping etc. There's also a boolean for jumping so player can still move left and right during the animation. All of this also works well with my rather complex AI system.

  • LemonDROP You could probably use arrays for this. I use arrays for a weapon switching system and it is minimal events. Same principle here could be used. Not at my home computer so can't upload a CAPX

  • Booleans is the way to go. Or just go with the FSM Plugin which work quite well.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
0 Favourites
Babylon3D: Standard Edition
416 38,438
tunepunk's avatar
tunepunk
Unread hot topic
54 17,006
rtkiii's avatar
rtkiii
Unread hot topic
0 Favourites
Visual, How Visual is Visual?
35 2,357
deadeye's avatar
deadeye