Code Monkey home page Code Monkey logo

Comments (2)

DimensionWarped avatar DimensionWarped commented on August 29, 2024

I've had some pretty similar thoughts about how this yeah. The most obvious to me was just that character-specific code probably shouldn't live inside the more standard state code and instead stuff like air.gd should be able to have a list of callbacks for each state. For instance Sonic would have one for air.gd that handles things like double jump/jump dash and he would have one for ground to handle peelout and another for ground to handle spindash (which most other characters would also share aside from maybe a Sonic Advance 1 style Amy).

And while we are at it we could make characters be able to override states process scripts entirely so that characters like Charmy for instance could just swap out the normal grounded state for one that handles Charmy's unique jump action.

from sonicworldsnext.

NeonSRB2 avatar NeonSRB2 commented on August 29, 2024

instead stuff like air.gd should be able to have a list of callbacks for each state. For instance Sonic would have one for air.gd that handles things like double jump/jump dash and he would have one for ground to handle peelout and another for ground to handle spindash (which most other characters would also share aside from maybe a Sonic Advance 1 style Amy).

this is mostly vvhat cc does, but the big thing for me is that simply adding the character takes time going through every instance of character specific code, and the more complicated stuff is usually left vvithout comments. I'm fine vvith the user having to go to air.gd to add their ability since that's not complicated and mostly on them to do, but I don't think I like going through and giving them hitbox, super, and more annoyingly their "stats"

the changes planned make most of these things properties in a "Character" node type, I don't plan on adding a script to each spriteController for realsies (though a script is used to make the custom node, but if the user vvishes they can extend it to their ovvn. Maybe it's vvorth more of a discussion on if callbacks like this should exist as the engine as a vvhole seems to disagree vvith this, vvith the only example of it being vvith stuff like action_jump(), and even then it's used more than just once, something that these callbacks definitley vvon't be.

from sonicworldsnext.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.