Off Topic > Off Topic
The Daily Talk Topic
Super Suit 12:
I've been wondering how to do configurable logic in a game. I realized I could just give each function a number (let's say, 3 is "spawnExplosion"), put those numbers in an array with a list of arguments and the next in the chain, and have something to sort through that and actually run the functions with the appropriate arguments.
Does anyone see any obvious problems with this? (IF would point at two different locations based on true/false, of course.)
Electrk.:
--- Quote from: Super Suit 12 on August 10, 2017, 12:22:40 PM ---I've been wondering how to do configurable logic in a game. I realized I could just give each function a number (let's say, 3 is "spawnExplosion"), put those numbers in an array with a list of arguments and the next in the chain, and have something to sort through that and actually run the functions with the appropriate arguments.
Does anyone see any obvious problems with this? (IF would point at two different locations based on true/false, of course.)
--- End quote ---
so sort of like events in blockland?
I don't see a problem with this. What language would you be using?
Super Suit 12:
--- Quote from: Electrk. on August 10, 2017, 12:27:57 PM ---so sort of like events in blockland?
I don't see a problem with this. What language would you be using?
--- End quote ---
C#, it's a Unity project.
Yeah, like events in blockland except with one input having multiple outputs and conditionals and such. You know how I talked about wanting to make Blockland 2? This is one of the key features I wanted. Something sort of like what Unreal has.
(In specific, this is going to be used in a configurable sports game thingy. I provide balls and logic systems, players build games with them. Or something. If I ever finish the game I'm currently working on, that is...)
TableSalt:
i hate things and stuff so how are you guys doing
Drydess:
down with the discussion topics