Sign in to follow this  
  • entries
    235
  • comments
    509
  • views
    172040

Editor Fun

Sign in to follow this  
SimmerD

89 views

Hopefully this weekend represents the last major work on the editor. It was a pretty satisfying project, but I have to get back to gameplay-related things.

The one area that was better on the old editor was the texture coordinate adjustment. I'm not sure if I'll just add a button or two for offsets, or sliders, or drag buttons.

On Saturday, I hooked up the move and rotate buttons in triangle mode, and the move button in vertex mode.

A big feature that I though I would never add was vertex and triangle undo. I had already put in undo for editor 'objects', but not for geometry manipulation. The levels are rather big and are triangle soup, so just saving all of the previous triangles wouldn't be practical.

Instead, I ended up implementing a one-level undo system that applies to most, but not all commands.

What I do is : before performing the requested operation, I grab tris based on the selected triangles or verts, plus any others that may be affected ( like neighbor tris on a vertex pull operation ), and save them in a set. If undo is pressed, it deletes the selected tris ( which are the new tris after the operation ), and the old ones are re-inserted.

Right now, there's only a single level of undo for tris and verts, but it seems to be enough.

Another request I implemented was a simplified first-person preview mode. Basically, when you turn on Scroll Lock, gravity & collision are turned on for a capsule around your camera, such that the camera is about eye-level. You can use WASD to walk around the level to more easily see how it will look in-game, and to get a very rough idea of navigability,

Here is a 1st-person shot of the cave city level.


A minor feature that went in yesterday was a button to kill duplicate triangles. This tends to happen when you have multiple grid pieces overlapping, like if you put a house with a floor on top of a grass or street grid. What it will do is find triangles that share all 3 vertices, and delete one of them.

I just thought of an improvement that would handle the case of different subdivision levels on one of the triangles...hmmm...

Lastly, I added triangle copy, which takes the selected tris, duplicates them, then selects the new ones, so they can be dragged and rotated into place. Great for duplicating rooms & hallways without exporting them as mesh or .geo first.


Sign in to follow this  


3 Comments


Recommended Comments

That is looking like a full fledged 3D model editor.

Things are looking good, have you posted any videos of your game yet? I wanna see it in action. Keep up the good work.

Share this comment


Link to comment
It might be a good idea to implement multi-level undo; when we did this in our editor we turned up all sorts of really freaky bugs inside our editor and level format that helped make the code way more robust and simple.

Share this comment


Link to comment
Yeah, it is getting more and more. I just added a new anchor vertex feature. I swear - no more features ! ;)

Re : undo - the editor works via deleting & adding tris, rather than modifying them, partly to support more general geometry undo.

I may be able to hook into those functions to put undo in there if need be...

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now