2018-03-06 18:57:20

So I do play CR and I was wondering about the programming behind it all. When looking over the lambda documentation there is really no way of telling how all this was built. My things are as follows.
1 How were sectors made?
2 How do lifts work? are they movable rooms.
3 How do you code doors?
4 How do you create menus?
All of this stuff I want to learn but there is really no documentation in the moo programmers guide to understand how to do this.

Bitcoin Address:
1MeNca7h6m8du4TV3psN4m4X666p6Y36u5m

2018-03-06 19:18:37

@hurstseth405, the problem is that there's not a "conventional" way of doing it. Every moo (or even every programmer!) has their own way of creating these things. I've figured out that, over time, programming these kinds of things is designed deliberately to be challenging. LambdaCore is solely made to give you a core foundation to build off of, like a programming languages standard library is meant to. For example, Python's standard library, while extensive, only provides you the libraries to make a very basic GUI system; you have to write all the connections and systems that your app uses yourself. The same concept can be applied here. LambdaCore is like a standard library of the MOO programming language: documentation isn't meant to give you methods to create menus and any kind of game you want to make; rather, it's meant to give you a launch pad, of sorts, and create your own game based on what you have available to you.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2018-03-07 02:29:15

I know how to build rooms and describe them but when ever I write programs with correct sintax it does not compile.

Bitcoin Address:
1MeNca7h6m8du4TV3psN4m4X666p6Y36u5m

2018-03-07 04:25:17

then its not correct syntax lol. MOO won't take it if it has anything wrong with it, and even when it does, it still might traceback when you run it, you'll have to get all the bugs out etc. DO lots of input validation on your top level verbs, and use internals to do all the work.

like let's say you wanted to make a spin off of a #8 a generic containre, you wanted a locker that could lock to a player. first you need to test a few things, like if the thing calling the lock or unlock verb is actually a player, if its not, it can be assumed to be another verb, which you might not want, so the test if(is_player(caller)) is a good way to do that. Secondly, you might want to test that the person is in the same room as you. Sometimes the cores block players from seeing objnums, but just to be safe, so they can't trigger stuff remotely, you could do if (this.location == player.location || this in player.contents) or something to that effect to see if you're holding whatever it is or if its in the room with you.

Facts with Tom MacDonald, Adam Calhoun, and Dax
End racism
End division
Become united

2018-03-08 02:20:04

I want to make doors and stuff. I learn by example the best. Some of the stuff I have seen in games is really neat and I wanted to learn how to implement them for my self with out really stealing the code.

Bitcoin Address:
1MeNca7h6m8du4TV3psN4m4X666p6Y36u5m

2018-03-08 03:09:56

I want to say implementing doors is a relatively simple process, but that depends on your level of MOO coding knowledge, and it'll all depend on what sort of setup you have for exits, if you've modified matching, etc. If you're keeping the exit object, adding an opened property to them and modifying verbs to check for it might be the way to go. You'd also want a verb somewhere to open and close doors, messages for them being opened and closed, etc.

2018-03-08 20:46:28

I'm a beginner.

Bitcoin Address:
1MeNca7h6m8du4TV3psN4m4X666p6Y36u5m

2018-03-08 20:53:12

Regarding doors, I would create a child of $exit for those called generic door and chparent any exits that should be doors to that object. Then, modify the generic door appropriately.

2018-03-09 00:51:52

How would someone create this I know how to add commands to objects but as far as programming them on what to do that is where I hit the brick wall.

Bitcoin Address:
1MeNca7h6m8du4TV3psN4m4X666p6Y36u5m