Game Programming and Development Tools

Video Tutorials – HanClinto

HanClinto

Administrator

Posts: 1828
From: Indiana
Registered: 10-11-2004
Hey all!

Over the weekend, I created a few video tutorials for Mite (the MUD engine I'm sure most of you know I'm working on).

Here's the best of the 3 tutorials (prolly tells you the other 2 were pretty bad )
Jabberwocky "Get" Tutorial

I know many people here have downloaded Mite to look at it -- if I can ask for some feedback, what has been the most daunting thing for you?

What would you like to see a tutorial of? Would a basic "howto get started" video tutorial be helpful, just to see what to do, what to type, and to see it work?

I programmed the thing, so it's very hard for me to guess what would be helpful for new users to see. This is your chance to complain! If you don't mind sharing publicly, what's been most daunting about using the Mite engine? If you don't want to post but have thoughts to share, I'd love to hear them via e-mail or chat -- e-mail is hanclinto at gmail [dot] com, and my AIM/Yahoo nick is HanClinto.

Thanks in advance! I really appreciate any and all feedback -- *especially* if it's negative.

Respectfully,
clint

------------------
http://www.includingjudas.com/christiangame.html

[This message has been edited by HanClinto (edited August 15, 2005).]

Jari

Member

Posts: 1471
From: Helsinki, Finland
Registered: 03-11-2005
Hi Clint. Thanks for the fine tutorial.
Though it's the object tab I don't quite understand. Looks like there are some players (from the db?) and object and room definitions?

I have been reading through the scripts and if I understand correctly the "miteScriptContext Context" in param list is the object containing user input and it has pointer to player object (Context.Subject). What other params can you have? And can subject be something else than player?

I think you have coded this well and adding verbs is easy but in the end I had this feeling that you have to type quite much in order to process the user input using Context object and when ever you want to call/exec script.

In what class do the scripts (methods) belong to? It would be simpler to just call Exec("FnName",args); instead of miteScriptManager.Exec("fnName",obj);

And any change you could eliminate the need to use .Type when setting or getting one of Subject's attribute? (Context.Subject["ATTR"].Bool)

Well I hope that the feedback was useful.

God bless.

------------------
And whatsoever ye do in word or deed, do all in the name of the Lord Jesus, giving thanks to God and the Father by him. - Col 3:17

Unless the LORD builds the house, they labor in vain who build it; unless the LORD keeps the city, the watchman stays awake in vain. - Psalms 127:1

[This message has been edited by Jari (edited August 16, 2005).]

HanClinto

Administrator

Posts: 1828
From: Indiana
Registered: 10-11-2004
Hey Jari! Thanks for trying out Mite -- I *really* appreciate the feedback!

quote:
Originally posted by Jari:
Hi Clint. Thanks for the fine tutorial.
Though it's the object tab I don't quite understand. Looks like there are some players (from the db?) and object and room definitions?

Yes -- you are correct in saying that all of the things in the world are in the objects tab. Anything that you interact with in the game world is stored there -- this includes rooms, items, weapons, players, npc's, etc.

One of the problems with several existing MUD engines is that they pigeon-hole the game creator into creating a specific type of MUD. This is *great* for users who want to create that kind of MUD, but for people who want to create MUDs that break the "norm", it's a little bit difficult.

So for instance, TigerMUD (which is a *great* looking engine btw, and one of the lead programmers, adammil, has been on the forums here a number of times and seems a really cool guy) is another C# MUD that is targeted specifically at making a specific type of MUD -- the database looks roughly like this:

actions
commands
items
mail
mobs
rooms
spells
users

So let's say I wanted to have a spiky hedgehog that walked around and sniffed things and ate things, but I also wanted to be able to pick it up and wield it as a weapon, or cook it and eat it -- that's an 'out-of-the-norm' thing, and it wouldn't exactly fit in TigerMUD very easily. Or let's say I wanted to have a stats system that was based off of love/joy/peace/patience/kindness/goodness/faithfulness/gentleness/self-control (the fruits of the spirit)? That doesn't fit into the system of TigerMUD, and it would take a LOT of work to hack something like that in there.

With Mite, something like that comes much more naturally. You just set up your attributes, and have your scripts react accordingly. Now I know it can be difficult to do that with Mite, but if that's the kind of thing you want to do, it will be a whole lot easier with using Mite than to have to hack someone else's engine, or just creating your own custom one. Mite tries to take care of as much of the tedium as possible, and leaves you to program the game mechanics. You think, "Hrm, I want a game that is set in the spiritual realm, and I want my strength to be dependent on these spiritual factors, depending on these conditions" -- well you can sketch it out, and have a framework in Mite that is prepared to receive your ideas.

I realize that working in Mite isn't always extremely easy, but what I'm doing is trying to make it *easier* for people who aren't uber-programmers to create quality MUDs -- it may take a little bit of elbow grease, but I can't think of how else people could create these MUDs without coding them themselves from scratch.

Sorry for the tirade -- I'll probably copy-paste that at some point into some "Mite Manifesto".

I typed all of that to give you an idea of *why* the Objects table is the way it is -- everything's lumped together there so that I don't pigeonhole your design process -- I let the game designer pigeonhole themselves. Create your own categories, your own way of thinking about the game, and let your imagination run wild. I'm actually curious to see how out-of-the-box people can think with this MUD -- when it gets more stable and released, I would love to have a mini competition (like a 24 hr contest) to see who can create different types of games with Mite (such as a billiards game, or online head-to-head chess, or a collaborative painting game, or just *something* as different as possible) -- just to try and break people out of the mental hold that D&D and Tolkien has over people. Let's have a game without Magic Missile as a low-level spell, okay?

That's the whole point of Mite -- to allow people to more easily create quality MUDs that break the norm.

So to answer your question, yes, all in-game objects are in the objects table. Accounts log into an object, so that object could be an object designed to be a normal human player, it could be a space-ship object if you didn't really have player-characters, or it could be a loaf of bread.
"go north"
"You can't move. You are a loaf of bread."

I hope that made sense?

quote:
Originally posted by Jari:
I have been reading through the scripts and if I understand correctly the "miteScriptContext Context" in param list is the object containing user input and it has pointer to player object (Context.Subject). What other params can you have? And can subject be something else than player?

Yes! Great job! Context is the context in which the script was called, and "subject" is the object that initiated the script call (if any -- check the ON_LOGIN script for an example of when there isn't a Subject yet, because the user's connection isn't attached to an object yet).

In the version you have, there is Context.CommandStr which is the whole string which the user entered to initiate this script (such as "get pen from table"). You also have a few methods to help you parse that string, GetWord() and GetWords() -- calling Context.GetWord(0) will give you the very first word "get". Calling Context.GetWords(1, 2) will get you the 2nd through the 3rd words, so "pen from", and calling Context.GetWords(1,3) will get you "pen from table", and you can also just call GetWords(1, -1) to get it through the end of the string, which is also "pen from table".

If you then located that pen object and stored it in a variable TargetObj, you could call TargetObj.Exec("say Put me down!"); and it would execute that command from the perspective of the pen (so Context.Subject would be the pen object in that new script call). So "yes", the subject can be something other than a player.

In the new version, I added "temporary variables" to the Context class, so that you can create your own parameters for contexts and pass them into scripts. This makes it easier to have inter-script communication, and I have a good example of this already typed up in the new Jabberwocky database. I thought about pasting it in here, but if it's okay, I'll just wait to give you the whole thing on Friday.

quote:
Originally posted by Jari:
I think you have coded this well and adding verbs is easy but in the end I had this feeling that you have to type quite much in order to process the user input using Context object and when ever you want to call/exec script.

Yeah, you do have to type a lot. :-\ I'm thinking of adding shortcuts, so that "Context.Subject" becomes "Subject", "Context.CommandStr" becomes CommandStr, "Context.Subject.Container" becomes SubjContainer, something like that. Not a lot of them, just a few.

quote:
Originally posted by Jari:
In what class do the scripts (methods) belong to? It would be simpler to just call Exec("FnName",args); instead of miteScriptManager.Exec("fnName",obj);

Currently, you can type:
Context.Subject.Exec("FnName"), and it will automagically put the Subject in the context of the new script call. Does that help? miteScriptManager *is* a lot to type -- I've kept names long and informative, but unfornately that's not very finger-friendly.

quote:
Originally posted by Jari:
And any change you could eliminate the need to use .Type when setting or getting one of Subject's attribute? (Context.Subject["ATTR"].Bool)

Well, C# (which is the default scripting language) is by default a strictly-typed language. That means that you have to explicitly declare what the type is of the object you're dealing with.

That was frustrating to some of my users, so that's one reason why I added Boo as a scripting language, so that people could have a typless language. It's a lot like Python, it doesn't need the semicolons, and just a little easier to type.

Does that answer your question?

quote:
Originally posted by Jari:
Well I hope that the feedback was useful.

*extremely* useful -- thanks for letting me know what your difficulties are! I'm very impressed that you got as far as you did on your own -- thanks so much for giving me some of your interest! You've done a really good job of picking this stuff up for not having any good tutorials to go off of -- you sortof just picked it up -- I'm very impressed.

Thanks, Jari!

In Christ,
clint

------------------
http://www.includingjudas.com/christiangame.html

Jari

Member

Posts: 1471
From: Helsinki, Finland
Registered: 03-11-2005
quote:
I'm very impressed that you got as far as you did on your own -- thanks so much for giving me some of your interest! You've done a really good job of picking this stuff up for not having any good tutorials to go off of -- you sortof just picked it up -- I'm very impressed.[/b]

Well I code some in C# and use the .net framework to execute C# scripts like you have done so this wasn't entirely new thing to me. And I like help because I have been always interested in scripting IDEs.


quote:
Originally posted by HanClinto:
So to answer your question, yes, all in-game objects are in the objects table. Accounts log into an object, so that object could be an object designed to be a normal human player, it could be a space-ship object if you didn't really have player-characters, or it could be a loaf of bread.
"go north"
"You can't move. You are a loaf of bread."

I hope that made sense?


Yes until the last line, heheh, jk.
Thanks for the info, I see that you want to make it very abstract.

quote:
Originally posted by HanClinto:
Currently, you can type:
Context.Subject.Exec("FnName"), and it will automagically put the Subject in the context of the new script call. Does that help?

Oh right I didn't realize that before. So correct me if I am wrong when I say that these two lines do exactly same thing:
Context.Subject.Exec("FindInRoom");
miteScriptManager.Exec("FindInRoom", Context);

quote:
Originally posted by HanClinto:

Well, C# (which is the default scripting language) is by default a strictly-typed language. That means that you have to explicitly declare what the type is of the object you're dealing with.

That was frustrating to some of my users, so that's one reason why I added Boo as a scripting language, so that people could have a typless language. It's a lot like Python, it doesn't need the semicolons, and just a little easier to type.

Does that answer your question?


Yes thank you. So Boo is typeless, that's nice. Would "Context.Subject["CAN_SEE"].Bool" be "Context.Subject["CAN_SEE"]" in Boo then?

I just started writing C# class that allows you to do this: "Context.Subject["CAN_SEE"] = 1" just to get the grip on C# again. So if you are interested I can give you the code if it turns out to be worth it.

I am curious though, how did you do the .Type thing in engine? Are Bool and Str variables in class that you set as appropriate?

Thanks.

------------------
And whatsoever ye do in word or deed, do all in the name of the Lord Jesus, giving thanks to God and the Father by him. - Col 3:17

Unless the LORD builds the house, they labor in vain who build it; unless the LORD keeps the city, the watchman stays awake in vain. - Psalms 127:1

[This message has been edited by Jari (edited August 16, 2005).]

HanClinto

Administrator

Posts: 1828
From: Indiana
Registered: 10-11-2004
quote:
Originally posted by Jari:
Yes until the last line, heheh, jk.
Thanks for the info, I see that you want to make it very abstract.

:-P

But yeah, I'm trying to make it very abstract, but I hope that I can make it specific enough so that it's still relatively-easy to use. So I think a good middle ground might be to code several example MUDs that people can easily extend, but when they get a handle on the system, then they can have the freedom to do whatever they want. Does that sound right to you? I often am frustrated with systems that are so generalized that they do almost nothing at all.

quote:
Originally posted by Jari:
Yes thank you. So Boo is typeless, that's nice. Would "Context.Subject["CAN_SEE"].Bool" be "Context.Subject["CAN_SEE"]" in Boo then?

I *think* so, but I'm not sure how Boo handles booleans. I think it would work though, yes.

quote:
Originally posted by Jari:
Oh right I didn't realize that before. So correct me if I am wrong when I say that these two lines do exactly same thing:
Context.Subject.Exec("FindInRoom");
miteScriptManager.Exec("FindInRoom", Context);

They're *very close*, but the difference being that Context has a CommandStr attached to it, and if you were to do Context.Subject.Exec("FindInRoom"), then you would lose that CommandStr (since Subject.Exec(str) creates a new context with a blank commandstr). However I did overload Exec() quite a bit, so I *think* typing:
Context.Subject.Exec("FindInRoom", Context.CommandStr);
miteScriptManager.Exec("FindInRoom", Context);
should be equivalent. But it's not any shorter. <g> I'm definitely open to suggestions for reorganization or what shortcuts I could put in there to make things easier to type -- before I was totally focused on functionality, and as we're getting more and more polished, I'm focusing on usability.

quote:
Originally posted by Jari:
I just started writing C# class that allows you to do this: "Context.Subject["CAN_SEE"] = 1" just to get the grip on C# again. So if you are interested I can give you the code if it turns out to be worth it.

Yes, I think that would be very helpful, thanks! I've been wanting to do this for a while, but I haven't gotten around to it. I think it would have to do with setting implicit type conversions to boolean, int, double and string, though I'm not sure exactly how to do that. If you wanted to do the work on that, I would totally take that, yes! Maybe I should give you access to the Mite source? Can I e-mail you at your voiceofhisword address?


quote:
Originally posted by Jari:
I am curious though, how did you do the .Type thing in engine? Are Bool and Str variables in class that you set as appropriate?

Heh, yes. They're just properties of my Attribute class, which do the automatic type conversion -- it was the best I knew how to do at the moment. Now we just need to link the implicit type conversion in there and we'll be set? I *think* C# supports implicit type conversion, I'm just not sure though.

Thanks, Jari!

Respectfully,
clint

------------------
http://www.includingjudas.com/christiangame.html

Jari

Member

Posts: 1471
From: Helsinki, Finland
Registered: 03-11-2005
quote:
Originally posted by HanClinto:
Yes, I think that would be very helpful, thanks! I've been wanting to do this for a while, but I haven't gotten around to it. I think it would have to do with setting implicit type conversions to boolean, int, double and string, though I'm not sure exactly how to do that. If you wanted to do the work on that, I would totally take that, yes! Maybe I should give you access to the Mite source? Can I e-mail you at your voiceofhisword address?

Well I'm afraid I don't have enough time to implement it right now, though I did finish writing the test code. However it would be great to take a look on the engine source so I can give more feedback. Yea please send me a email.

------------------
And whatsoever ye do in word or deed, do all in the name of the Lord Jesus, giving thanks to God and the Father by him. - Col 3:17

Unless the LORD builds the house, they labor in vain who build it; unless the LORD keeps the city, the watchman stays awake in vain. - Psalms 127:1

[This message has been edited by Jari (edited August 16, 2005).]