MV3D Development Blog

January 30, 2007

Finally, Progress!

Filed under: Uncategorized — SirGolan @ 9:55 am

I am happy to report that MV3D works on Windows using Python-Ogre now. I also figured out what was wrong with the GUI. Maybe I mentioned that the Windows-like GUI skin was seemingly broken. It turns out that CEGUI subtly changed the names of some DLLs and ALSO changed the name of their skin files. For some reason, the old style skin files are around, and– you guessed it, they refer to the DLLs by name. So WindowsLookSkin.scheme is now WindowsLook.scheme. Fixing the filename issues in MV3D code lets me use the Windows-like skin again. Happyness! The other skin– while it looks good in some apps– just doesn’t do it for me. Here’s a pair of Windows screen shots:


For some reason, it looks like the whole image is partly gray. I’m not quite sure what the deal is there. I suspect it is CEGUI related though.

I’ve also gotten Ogre, OIS, and CEGUI python modules to compile, link, and import successfully in Linux. However, although I get no errors in MV3D, it just comes up as a black screen. It’s trying to render frames, but nothing is coming out for some reason. It isn’t an Ogre thing since the Python-Ogre demos run fine. I haven’t been able to get the Python-Ogre CEGUI demos to run at all yet (they seem to have CEGUI file name issues as well!), so it could be CEGUI related.

Finally, I was able to mark a ticket as finished. I added support for adding and deleting AssetGroups and Assets in the AssetTool webapp. Now it is considered fully functional, though it could use some sprucing up visually. That isn’t high on my list, so I marked it as done. One thing that I’m not too fond of with it is that to create a new Asset or AssetGroup, you have to enter the constructor info for it. In other words, the file name (as the import goes) and the class name must be entered. It’s not as big a problem with AssetGroups because there is only one type of AssetGroup. It is possible to include multiple AssetGroup types, but I don’t see any reason currently. I solved this problem in the IGE by using a type of asset called a CodeAsset (which at its most basic form stores the file name and class name of a constructor) and using an asset browser (filtered to only show CodeAssets) to select the appropriate class. That may be a solution to implement here as well. It is just a little odd to have Asset Code be itself an Asset.

Some video stuff came up last night, so I was stuck in Windows, but hopefully tonight, I will be in Linux and will be able to work on getting the client to work there. I just hate doing development on Windows. It makes me feel all icky.

In other (MV3D) news, I theoretically have OctreeArea splitting itself up amongst the servers simulating it, but I haven’t tested yet. In order to get the full benefit of this, I have to figure out how do quickly transfer ownership of objects from one server to another.

Input from anyone who knows Twisted well would be much appreciated. :) Here’s the issue. Let’s say you have four servers. Server A, B, C and D. Server A has a (pb.Cacheable) object that it is hosting– say a MV3D Avatar. MV3D considers server A as the master server for the object. Server B has a cached reference to the object and is considered by MV3D to be a slave server for the object. Servers C and D also have a cached reference to the object, but are just caching– they aren’t slaves (i.e. lowest priority). C is caching from A and D is caching from B.

MV3D decides it wants to switch the master server for the object from server A to server B (A would become a slave). What is the fastest way to do this assuming that both A and B have completely up to date copies of the object and C and D must continue caching (though it doesn’t really matter if they switch which server they are caching from as long as any clients connected to them don’t see a blip). How would you go about doing this in the fastest way?

This scenario does work and has been tested, but it is definitely not done the fastest way. What currently happens is that on server B, a new object is created and all the data is copied from the old object (including the list of caching clients). The new object then replaces the old object. The new object is sent to server A (all data gets transferred over the wire). Server A copies all its caching clients from the old object to the new and then puts the new object in place.

As you can see, in this case, all the data is sent from server B to server A, but server A already has the data– server B just needs to have the pointer to the remote object on server A in order to send future updates. My only thought in the matter is to somehow send a blank copy of the object from B to A, but I’m not sure how to do this and maybe there is a better way? Anyone out there know?

January 25, 2007

Posting To LJ Fixes Things

Filed under: Uncategorized — SirGolan @ 4:41 pm

So, a few hours after I made my last post, I figured out the problem– using the PyOgre-ish CEGUI Callback method in Python-Ogre does some serious stack trashing. I have to use the Python-Ogre way of doing it, which is annoying. To specify a callback, you pass two args, a object and an attribute (as a string), so the callback gets called like this: object.getattr(attribute)(args). Annoying.PyOgre did it the sane way.. Just pass a function reference to it. It seemed to work to pass the function as the “object” and a blank string as the attribute, but apparently, that was doing really funky stuff that wasn’t immediately obvious. [I mean, really funky. I was making the first line of the callback function be a “return” (which should end the function there), but the rest of the function was being run!]

Anyhow, while I’m recompiling Python Ogre on Linux, I really wanted to take a moment and ask some of the frequent MMORPG players about this statement I saw on a MMORPG related forum:

“In [MMORPG Engine], items are expected to exist only in inventory, so they have an icon but not a display context. Items are also only created in the inventory manager, whereas the world manager needs to know about objects that are in the 3d world. ”

Is this the norm? Do you have stuff in your pockets that you can’t just drop on the floor in most MMORPGs? If so… Odd. I can sort of see some reasoning behind it– you don’t want people leaving junk all over the place. Seriously? Why not have a garbage collector that picks up all the stuff that’s been sitting around?

Someone in that thread commented that allowing people to drop stuff on the ground has lead to item duplication issues. Maybe that’s another reason against it. Seriously? It is pretty sloppy code if you can duplicate items through dropping and picking them up. In MV3D, an item doesn’t leave the game if you pick it up. (um. aside from the fact that there is currently no ‘pick up’ or ‘drop’ code at all in MV3D yet) You pick something up, and the same data that represented the object still represents the object. Doesn’t matter if you stuff it in your backpack or anything– it’s still the same object.

That’s all for now, though noticing ’s recent post, feel free to ask me to show you a picture of what I saw on my way to work this morning. :)

January 24, 2007

Still here..

Filed under: Uncategorized — SirGolan @ 2:07 pm

I’m still here. Still working on things. Mostly, I’ve been split between trying to get Python-Ogre to compile & run on Linux (it runs now– sorta), and converting MV3D to work with Python-Ogre (in Windows). It has been very frustrating to the point that I could have put together my own Python Ogre wrapper by this point. Right now, I have an “Unidentifiable C++ exception” that is causing the game to crash when you select a PC to use.

I haven’t been able to give MV3D my full attention lately due to various other things going on, but still, I have spent a lot of time on this one task that should have been simple.

January 11, 2007

Client Progress

Filed under: Uncategorized — SirGolan @ 11:37 am

So, I now have a version of the client that gets to the login screen running on Windows. I just updated it to the latest Python-Ogre release as well. Unfortunately, the MultiColumnListBox in the select PC screen bombs out.

Part of the problem is that for some reason, the GUI skin I had been using (WindowsLook) doesn’t work in the new version. Because of that, I have to go through all the places where GUIs are defined and change them over to the TaharezLook skin (which I’m not too keen on).

One reason this took so long is that in between the version of Ogre that PyOgre used (1.2.0) and the version that Python-Ogre uses (1.2.4), a new user input system has been included called OIS. All the keyboard and mouse handling had to be converted to that new input system. There were also lots of other little things that had to be changed since Python-Ogre does a lot of things differently from PyOgre.

Meanwhile, the server that runs Trac and SVN seems to be acting up right now. Web pages are giving Internal Server Errors, and SSH’ing to it spits out the MOTD and then disco’s you. I’ll have to check on it when I get home, but this means I can’t work on the remaining features of the Asset Web App (creating/deleting asset groups, deleting assets).

Overall, I’m getting rather frustrated with the lack of progress. I’ve spent a lot of time trying to get Python-Ogre working on Linux (with no success). I’m considering going back to PyOgre and dealing with its limitations for 6 months or so until the Python-Ogre guys (or whoever else) figures out a better solution.

Once the clients are back in order, I’ll be in desperate need of some 3D models. Anyone out there any good at creating low poly humanoid models? I know how, but suck badly at it.

January 7, 2007

Go-go gadget UPS!

Filed under: Uncategorized — SirGolan @ 5:24 pm

Not much to say about MV3D just now. I’ve been working on some uninteresting parts and trying to get through some of the tickets for the next release. On the client side, I need to wait until Python-Ogre works in Linux to do anything there. I have been hacking away at getting the Windows client w/ Python-Ogre working. It runs, but you don’t currently see the UI or mouse pointer.

I finally got around to installing the 3kva UPS for my home servers. It would have been simple to install if the 20A circuit had a 20A outlet on it (the ones which accept plugs where instead of two parallel contacts, one is perpendicular to the other). So I had to replace the outlet and had just been procrastinating about going to Home Depot to buy one.

I think with the current load (5 servers), it’ll give me about 20 minutes, but I’ll have to plug in to the serial port on it to verify that. 20 Minutes would be good. if I can run a serial cable over to the other side of the basement(*), I could set up all the servers to power down before the UPS batteries run out. apcupsd is your friend.

Hmm, now I should probably also think about data backup. I’ve been relying on RAID to save me in the event of a hard drive failure, but I should probably go a little further than that. It would be nice to have one more server class machine since has been asking for an Exchange email server, and I’ve been annoyed with decentralized authentication for windows machines here, so active directory would be a good benefit.

Am I nuts to be installing a 3kva UPS and thinking about having active directory and exchange in my basement? :) Ok, running cat5 to the kitchen and bedroom are probably higher on the list than that.

For anyone curious:

  • Firewall: Linux / Pentium (or P2?) / L2TP VPN (not 100% working at the moment)
  • Mail and Web server: Linux / P3 / Raid
  • File server and multimedia player: WinXP / P3 / 150GB / DVDRW drive (yes, 150GB is small for a file server these days..)
  • MV3D Alpha Server: Linux / 2x P3 Xeon / Raid (CPQ DL380 G1)
  • MV3D Dev Server: Linux / 2x P3 Xeon / Raid (CPQ DL380 G1)

I can also put video and audio through to any one of 3 TVs from: DVD player, VHS, File server, my desktop, a laptop, or a video camera via video switches in my office.

While I’m blabbing about my house-related geekery, I might as well have a todo list:

  • Extend network into the bedroom, kitchen, and living room.
  • Upgrade from b -> g wireless (the access point is in the basement unopened)
  • Install wall jacks instead of regular cable ends for all the ethernet.
  • Get a bigger switch… Should have taken a few of the 48 porters that my last company junked. :(
  • Install X10 stuff and write some python code to do cool stuff with it.

  • Upgrade the quality of the video/audio system and run outputs to the other office and the kitchen.
  • Nagios - Network monitoring system so that I get paged when a server is down or out of disk space or whatever
  • More space on the file server.. I have the drives, but the server can’t handle them.
  • Find some way to make the home theater (video projector, screen, and laptop) less time consuming to set up yet it must remain portable between the bedroom and livingroom. Find a PCMCIA soundcard that can do surround as well. :)
  • Add another NIC into the firewall so that there is a DMZ for public hosts (mail/MV3D servers)

* My basment is cool and has a nice built in server rack (at least, that’s what I use it for) off in a corner, but there’s only 3 sets of outlets, and they are all on the other side from the servers. I’ll eventually run a real outlet over to the server area, but for now, a 20A extension cord will do. The UPS is by the outlet, which is about 35′ (as the cable goes) from the servers. Unfortunately, it doesn’t have a network interface either.

Powered by WordPress