Sign in to follow this  

FSM Gui or write by hand?

This topic is 4849 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Just wondering what folks think of MaxPayne's gui fsm machine versus something like QuakeScripts or UnrealScript written by hand. Any disadvantages to MaxPayne system? How about ease of use, etc. The only thing I can think as a downside is that you can't create new functions in MaxPayne gui, can you? You guys hit any limits with MaxPayne system? About animation, do you guys prefer prebuilt doors and such that are like in quake/half-life or do you like building your own animations inside the editor? Or both? When I mapped in half-life's hammer editor I liked the prebuilt logic because I could make levels fast without worrying about writing any code. Do you also prefer this style of mapping or do everything yourself? Thanks.

Share this post


Link to post
Share on other sites
Every object in max payne can be made dynamic. Once it's so you can check off boxes in dialog box that tell you which events this object responds to. Say if you check off bullet collision then a glass object can do something when it's hit with any bullet. You invoke a FSM dialog box for glass object that has three sections. In the first section or edit box you can list events that you want to happen when the bullet collides with glass. The second section is state specific and you write down events that you want to happen when an object is in specific state and third section you list events that you want the object to do after any state(if any at all)was executed. Basically a regular FSM system.

So you write your scripts into these edit boxes say you write:

this->DO_hide(true);

but you don't write a regular script text files like you do with lua or unrealScript for example.

I noticed that you can also send custom messages to objects thru this dialog box system. There is a great tutorial on this system from max payne official site:

http://www.rockstargames.com/maxpayne/

and then navigate to the max payne 1 and to mods section. It shows how to use their mod tools that come with the game.

Interestingly, say you're making a door. You make a brush then you move it and set keyframes and their names just like you would in genesis3d. That way you can make any kind of door and animate it any which way. You can if you want, send a message to any dynamic object or to a trigger when an animation starts. Say at the end of the 1st keyframe which is named "opened door" for example you can trigger some other object to do something like turn off a trigger that opens the door.

This is unlike in half-life or quake where you don't have animation system built into the editor. Just wanted to know whether game devs prefer lots of scripting or do they want prebuilt functionality or both? Basically, is it worth my time to put in an animator into the editor and have folks use it. Should I put in a FSM like dialog box system as MaxPayne has or do you want to write scripts in editor or in msvc or in dedicated editor outside of world editor? Or you don't like writing scripts and instead want to mod with predefined entities? I haven't done this system before so I'm not even sure if some things are doable. Say offering some control to the modders only to find out that engine needs to be adjusted as well. Should modders then modify system dlls? So I have all these questions before hand to tell me where I should be going with it. Thanks.

Share this post


Link to post
Share on other sites
Hmm, it doesn't look much different from other in-game editors I've used. I doubt 90% of modders will need to make their own functions if you have a good set to begin with, so that's ok. It's nice to have separate tabs for the different events that an object can respond to, but it would be even better if it gave you drop-down boxes for all the different actions it can produce in the script, instead of you having to type 'A_Play3dSound()' or whatever.

Regarding the animations, I would like the best of both worlds. I want prefabricated objects with inbuilt keyframes, such as doors that open by rotating 90 degrees, but I'd also like to be able to specify new keyframes for special purposes too. I shouldn't have to script every door I add to the level, but if I want one to fall off the hinges when I open it, that should be possible too.

For anyone else who's interested, I got a good idea of the system from this link.

Share this post


Link to post
Share on other sites
Kylotan wrote:
>> but it would be even better if it gave you drop-down boxes for all the different actions it can produce in the script <<

I think Max Payne 2 system has this now. Anyways, thanks for the feedback.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
If you can make the 'canned' parts also be scriptable at a lower level -- to allow adding additional canned components or new options checkboxes/value sliders (without hardcoding).

Having the gui to clone stuff quickly (yet with nice optionals to vary them or customize some) will speed up scenario asset creation. Its also easier for a non-programmer to use the gui.

Share this post


Link to post
Share on other sites
Kind of like having a script and have the fsm gui parse it and make it available in the dialog boxes, etc. Also, like you say allow the gui to be extended thru dlls. That sounds good.

Share this post


Link to post
Share on other sites
This is a good question for the people who will be using your editor. Some designers love scripting languages (as the are more flexible), while others don't want to touch that level of detail (anything that looks like programming to them is too low level; they prefer working with UIs).

If you are the only user, go with whatever will be the most effective for you. Alternatively, you could write your logic in lua (or some other scripting language) and have it exposed through UI state machines.

Share this post


Link to post
Share on other sites
This reminds me a lot of the Xml Action/Event system I was building (and soon to rebuild for Manta-X). You declare a series of actions that can be performed by entities along with a series of events that can act as triggers. The editor will then assign a list of actions to the events of an entity. In my game, it'll be in the form of a list box for the actions with perhaps a combo box to select the entity event you want to hook. The file itself will be stored as Xml as this can quite easily represent the situation we're talking about here. I've not used the Max Payne system, but from this post it sounds a lot like the system that's going to be built into Version 1 of Manta-X. I think Half Life 2 was built in a similar way.

Share this post


Link to post
Share on other sites

This topic is 4849 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this