MV3D Development Blog

November 30, 2006

Baby Steps

Filed under: Uncategorized — SirGolan @ 9:11 am

I made a small amount of progress last night. For the first time, I was actually able to start a server that uses the new OctreeArea and connect to it with a client. I could even walk around. Unfortunately, collision detection seemed like it was somewhat messed up. On the other hand it seems like objects can move from one octree node to another– but maybe that was just an odd bug which acted like a feature. Node splitting is definitely broken. It split the parent node twice so that it ended up with 16 branches where it was only supposed to have 8.

I was playing with 3DS Max for the videos I was working on and decided to try exporting stuff to Ogre. It was ok. Static models were a breeze to export. No problems whatsoever. There is even a physics exporter as part of the Octopus plugin. It could be just what I need for physics properties. Anyway, it wasn’t all good unfortunately. I wasn’t able to export any models that had animation such as player models. The exporter bugs out for some reason while saving the skeletons or something. This will have to be figured out relatively soon.

The videos are done, so I’m now getting back into MV3D stuff.

November 21, 2006

Idiot of the Day

Filed under: Uncategorized — SirGolan @ 12:20 pm

And the idiot of the day award for yesterday goes to the electrician who was overheard saying “Hey! Maybe this big red button in the server room is the air conditioner’s power switch I’m looking for!” Just before lifting the protective plastic cover around the button and pushing it. That was the Emergency Power Off (EPO) button for our server room which causes the UPS to physically disconnect its batteries and switch itself off. Needless to say, this is not very good for servers. I didn’t get everything back online until late last night. What’s even better is that the electrician’s company installed the EPO button in the first place about 4 months ago.

Is it just me, or is a big red button under a plastic cover not something that should just be pressed for the heck of it? Even if you know nothing about electrical codes (and why there needs to be a big red button in a server room and all), big red buttons are not something to hit unless it’s an emergency and you know what you’re doing.

BTW, if you are wondering, the red button is there in case of a fire. It is pressed to make sure that the combination of water from the sprinklers and power from the UPS will not electrocute any firemen. :) Running servers while they are getting wet is also a bad idea. They have a much better chance of surviving a fire if they are shut off before they get wet– assuming it’s not the servers that are on fire.

November 17, 2006

World Editor Thoughts

Filed under: Uncategorized — SirGolan @ 3:30 pm

Well, I just realized both MV3D servers (including the one that hosts the development website) aren’t totally back up after a power outage the other day (got to install that UPS!), so instead of posting this to the dev website, I’m forced to write it here. Oh the horror! Sorry if I jump around or write about steps a and f, but miss b,c,d, and e. You should be used to that if you read stuff here often though. :)
I just did a little research, and it seems like it would be no problem for me to create a view setup similar to any 3D modeling program within Ogre. I can split the screen into 4 boxes which can show views from the top, side, front, and what your character sees. The top/side/front views could easily be set to wireframe as well so that you can see through objects. This will probably be useful in World Editing, though I think I may make it an easy option to switch into (say hit F10 or something to swap between normal view and that). Placing and moving objects with those views should be a snap because it would be very easy to line them up. The cameras for all the views should be independently controllable just like a 3d program.

Next, ideas for creating objects. I need to create an asset type for ClassGenerators if there isn’t one because when creating an object in MV3D, you just need an area to put it in, and a ClassGenerator. The ClassGenerator specifies the Python class that is becomes the object. More on assets in a bit. Somehow, you’d need to be able to select an asset to use as the object. That would require an asset selector. The asset selector should probably show assets from a particular asset group and should be configurable so that only assets of certain types are selectable. So that way, if you specified it should only show object creating assets, it would do that. Anyway, once you select the asset, it should let you place it.

Editing objects. All Objects should define a GUI for editing their properties. Since the properties for each type of object are completely different, this is definitely necessary. Part of me wonders if it would be best to generate the GUI in code, or even dynamically. Doing it without that would mean that developers would have to design (by hand) the GUI and code it for each object type, making creating new object types more of a pain. It would be easier on the developer to inherit from somewhere and just add to the properties GUI from there; however, that may cause retarded looking GUIs. Either way, a custom GUI for each object is necessary because for instance, a PC type object would have editable properties for health, experience, and so forth while a rock sitting on the ground would not.

Defining assets. This could be something that is best left outside the game. Many things in MV3D are specified by an asset (which is part of an asset group). For instance, images, models, sounds, pieces of code, and GUI layouts would all be examples of assets. Asset groups are just a way for people to say “these assets are part of Mike’s medieval fantasy pack” or whatnot. Anyway, the assets themselves will always be edited/created/etc outside of the game in 3D software, text editors, GUI editors, etc. It probably makes sense to have some sort of program that lets asset creators add, modify, and delete assets in a simple fashion that connects to a game server in order to register the assets within the game automatically….. oh… DUH! This sounds like the job for a WebApp. Asset creators could log in to it, upload the asset to the web app, and edit all the asset metadata. Cool. A good first step would probably to just be able to edit asset metadata. One issue is that there can be any number of asset types which can have completely different metadata. For a silly example, one asset type downloads via HTTP/FTP so it requires a URL. Another one may use some peer2peer mechanism to download and require whatever info for that. So, there needs to be a way to generate and parse HTML forms based on the structure of an asset object. I think that’s do-able. Ok, way off subject here. But first, you know what would also be cool? If you could dump a .3ds file on the web app and it would run Ogre’s conversion utility to generate the Ogre .mesh file and stuff. That would be cool.

The other major component of the world editor will be related to modifying the terrain. I’ve discussed this a bit in other places, but the general idea for terrain height modification is to show a greyscale image where lighter colors represent higher points on the terrain and allow the user to ‘paint’ over it with various operations. I think the image shown should not be directly used in the heightmap as each pixel in the image is limited in range between 0 and 255 and is an integer whereas the value for the height of that image can be a decimal number between… the extents of a 32bit float. (-a lot to +a lot) I think in the old MV3D, I made 0 be the lowest point in the terrain and 255 be the highest and everything in between would scale accordingly. That’s probably a good idea still. It would probably also be nice to be able to adjust the points in the 3d view as well.

In addition to adjusting the heights of the terrain, people will need to paint things on it such as roads, grass, sand, rocks, etc. (I’m talking flat texture maps on the terrain) For this, I’ll need the splat material compositor I’ve been thinking about working, but other than that, it could work similarly to the height editor with its image that you draw on. Painting directly to the 3d view should work as well. In addition to flat things, there will be non flat things such as vegetation. Once again, this could work similarly to the height editor.

One problem with editing the terrain will be that MV3D’s current terrain consists of a grid of terrain blocks which are not really connected to each other. Somehow, the editor will have allow you to modify the heights of one terrain along the edge, the heights on the corresponding edge of the terrain next to it will need to be modified as well.

I just had an interesting thought. Maybe it makes sense to not separate out terrain from regular objects. In MV3D, terrain is a regular object. Some places won’t have terrain even. So, all these terrain editing details could be part of the terrain object’s properties. That actually could work very well because some terrains will have features for grass and such while others may not.

Finally, not all objects in an area are viewable on the client. Some things just don’t have a visual representation. That makes them a little hard to select with the mouse. It should be possible to pop up a window that lists the content of the area and lets you select things. Once select something, it jumps into the properties of that object. When editing those objects, it may not even be possible to place them, so placing objects will have to be dependent on the type of object. That means the placement code should be part of the object properties GUI.

Ok, that’s probably enough blabbing for now. This is going to be a lot of work to put together, but it should be pretty kick-ass in the end.

Slow Times

Filed under: Uncategorized — SirGolan @ 12:20 pm

The lack of updates lately is due to there being not much progress. I believe I mentioned earlier that I have two video jobs I’m working on this month. Pretty much all of my non work time has been devoted to that.

I did do a couple of things such as make a small change to the DB Persisting routines that makes them about 10x faster. Still, that’s not saying a heck of a lot. They are slightly more usable now though.

The current plan is to work more on the Octree based Area code until it is at the point where objects can be placed in it and can move around. They’ll need to move from node to node as appropriate as well. Once that’s done, I’ll take a break from it and work on some of the world editing features. I’d really like to get those up to speed so that I can start building simple worlds. Hopefully, I’ll be able to keep the worlds persisted and use them for various testing efforts. Either way, this may require speeding up the DB Persisting stuff even further. Another 10x speed increase would probably be good. I’m just not sure how I can get that at this point as it seems I’ve sacrificed speed for flexibility in a big way here. I can persist any Python object to DB, but it takes for frikkin’ ever. Currently, it uses 4 tables: instances, properties, arrays, and dictionaries. I could cut out properties really because properties basically stores object.__dict__, which I’m sure even the non Python minded person could guess is a dictionary. Therefore, properties could be saved in dictionaries, but I don’t think that’ll speed anything up (and it could be a fair amount of work). I should probably not be lazy and do it because if it gets done now, that means no one will have to convert database data from the old way to the new.

The only other idea that I have for the database is to possibly start doing some batch transactions. That may speed things up a bit. This could also be pretty tricky because while you’d think you could just batch up all the transactions to write an array to disk, you can’t do that if the array contains an instance or something else that requires getting the next ID number from the database. You could keep track of all the ID numbers, but that limits you to only having one thread writing to the DB at a time. Maybe that solution is ok. I’ll have to think about it more.

I am, however, getting excited about world editing tools. I was reminded recently about Second Life’s in game editing tools and am thinking that I should really check them out in order to get some ideas. Clearly, their tools work well. Some of the content in there seems to look really nice. Yes, I know Sturgeons Revelation and all. But still, it seems like something that deserves looking at. Granted, I do not plan to use the world editor to generate models like in Second Life, but it should mostly be for placing models that have been made elsewhere (blender, 3dsmax, etc).

Part of the problem is that it’s hard to align things in a 3D view. The other part of the problem is that so far, I’ve yet to see a world editor type app that I really liked. I know what I don’t like, and what’s annoying, but really, there needs to be an intuitive way to do this.

November 2, 2006

Download Multiverse3D!

Filed under: Uncategorized — SirGolan @ 2:57 pm

This was too funny to pass up. I was doing a Google search for Multiverse3D, and it came up with this (do not hold me responsible if you click the link):

NoCD Crack Key Free No-CD Patch Serial Download Games Warez
MTV Sports Snowboarding - download NoCD crack; Mulldoon Legacy, The - download NoCD crack; Multiverse3D - download NoCD crack; Muppet Race Mania
www.exem.szm.sk/data/gamez/m.php - 23k - Cached - Similar pages

Damn, why am I wasting my time writing MV3D if there is already a crack and a warez download for it? I could just download that and I’d be finished.

Guess I should be flattered? :)

November 1, 2006

Shiny..

Filed under: Uncategorized — SirGolan @ 9:27 am

Here’s some shiny new screenshots of lights, shadows, water, and me getting totally bored with the 3d models I’ve been using up until now.

An amusing tidbit about the ones with the houses in them: those houses were made from the same object as the white cubes in previous images. I just changed the visual representation. So, in order to get them into the right place, I just kicked them around. It is very amusing to kick a house and watch it go flying (or rolling as the case was). I eventually realized that I had a world editor available to set the position manually, but kicking them around was entertaining.

There are some visual problems with the lighting unfortunately. I think it has to do with the vertex normals on the terrain. Don’t know what the deal is, and I’ve tried pointing them both out and in, so no idea.

Powered by WordPress