User:Wmonroe4/Random notes

From Sirikata Wiki
Jump to: navigation, search

This is a page I've made to document miscellaneous thoughts I've had about Meru/Sirikata. These will be very stream-of-consciousness, and may be moved elsewhere and/or organized in a sensible manner later, but no guarantees. If you see anything here that is important and should really be in the main part of the wiki, on the developer list, or emailed to other participants, let me know. If you see anything that's completely stupid, do put a note on the discussion page, or just delete it if it's completely wrong and possibly toxic. (I think other people have the permission to edit this page...)

Building Sirikata on Ubuntu (4/5/2011)

Always remember: the Gates wireless is haunted. Bring an Ethernet cable.

It's a good thing git saves its progress so a wireless interruption doesn't cause the whole clone process to start over.

Q: Why is make depends failing with a bunch of "can't find bzlib.h" errors?

A: Not all the dependencies are installed!

Q: How do I install the dependencies? Is that what full-depends is for?

(Me running around in circles trying to get this option to work)
full-depends should not be prefixed with sudo, even though it enables use of root. It suggests that you use fulldepends (no hyphen), but that's exactly the same thing, except according to the makefiles, the no-hyphen version is deprecated in favor of the hyphen version.
Hmm...full-depends is failing on the chromium build. Gives me a usage message -- maybe there's a typo in the build scripts for 64-bit architectures, or multiprocessor systems, or some such oddity. It's failing in /externals/berkelium/util/build-chromium.sh, called from /dependencies/install (I'm pretty sure).
Oh. That's not how I get the dependencies. Here we go:

A: No, just do the stuff in the section underneath labeled "Linux". All the dependencies are in that list.

OGRE and COLLADA know what's up. They're the only dependencies that are using the full power of all 8 of my hyperthreaded processors to build.

Make the final build using make -j8 to take advantage of parallel processing! (Replace 8 with the number of processors you have on your box. Or just use 8, but the extra threads won't buy you any time if you have less than 8 processors.)

Wow. That final build was surprisingly easy. I guess let's try out the program...

Running locally for the first time (4/5/2011)

No scene is provided. I guess I'll just run the commands and see what happens.

$ cd build/cmake/
$ ./space
$ ./cppoh

I hope all of these OpenGL/OGRE settings are right.

If you think there's something wrong with the OGRE settings, just delete ogre.cfg -- it should let you start from scratch.

Empty world. Wait, no -- I see my own hands. Oh, okay, it just takes a while to load. I see frogs and birds and a landscape! Success!

(I should have expected this delay: Getting Started for Users#Troubleshooting)

I don't know how to get it to run in fullscreen...

Ctrl-Enter doesn't run the script -- Shift-Enter is the right key combination.

The Hello World script just gives me an error in the console:

std/script/scripter.em:67: Error: Error trying to send message.  Do not have a presence associated with this object to send message out from, or do not have sporef to send to.

Just clicked on the window to try to restore focus and the client segfaulted. Looks like the server's still up and running, though. (cppoh is the client, space is the server, right?)

I wish I could press multiple direction keys at once to move.

How do I quit space? C-C has no effect.

Or maybe it does -- ten seconds later I get:
[FORCEQUIT] FATAL: [FORCEQUIT] Fatal error: Quit forced by timeout.
mObjects.size=0
[FSMQ] INFO: FSMQ: underflow: 0, blocked: 0
[FSMR] INFO: FSMR: Bytes used: 0
[FSMR] INFO: FSMR: Underflow: 0 max messages: 0
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >'
  what():  mutex: Invalid argument
Aborted

Also, when I exit the client normally, I get this:

UI Action triggered. action = 'action_exit'.
[TCPSST] ERROR: DELETING STREAM 33441792
[FORCEQUIT] FATAL: [FORCEQUIT] Fatal error: Quit forced by timeout.
Summary of drop data:
EOF

That doesn't look normal. I guess it exited, though.

Rebuilding (4/7/2011)

Whoops, looks like I'm going to have to redo the build. I ran "make clean" hoping it would just get rid of intermediate files, but the executables are gone too. I had a backup, but it was on an NTFS drive, and all the permissions are messed up. By the way, the resulting directory structure is on the order of 8 GB -- way too large for my Dropbox space (or my AFS space, like I would ever try to work with such a sprawling system over AFS).

make -j8 depends doesn't work -- I think it's passing the -j8 to other build tools, and they're failing because it doesn't apply to them. Okey dokey, one processor it is.

(2 hours pass.) Okay, done again. Oh, looks like I've built the Debug target this time. Oh, well. Let's see...

$ ./space_d
$ ./cppoh_d

Waiting for the world to load...sweet! Looks like it's working.

Scripting (4/7/2011)

Now let's try some script...

>>>system.print("\n\nHello World!\n\n");

Hello World!

I think we're golden. What happens if I move the frog?

var frog = system.presences[0];
var pos = frog.getPosition();
pos.x += 20;
frog.setPosition(pos);

The camera moved. That's interesting. Maybe presences[0] isn't the selected object, maybe it's me.