Archive for the ‘ToeTag’ Category

glDrawFastAsHell

Tuesday, April 29th, 2008

I took some time off from my remix level to look at the ToeTag source again. The editor was getting a little choppy when the entire level is visible and I wanted to see what I could do to fix that.

The answer, it seems, is glDrawArrays. Holy crap! It takes some massaging of the data each frame to get it into contiguous arrays but, man, once it’s in there you can blast polygons to the video card. I can now work on my level with the whole thing visible. There are lots of places I can leverage glDrawArrays still so it will only get faster in the future.

Once I get as much as I can drawing through arrays, I’ll post a new version of ToeTag.

Very happy!

Quick Groups & Prefabs

Sunday, March 30th, 2008

I finished implementing Quick Groups today in ToeTag. It’s really interesting to me how I figure out the features that the editor needs simply by using it. I was constantly having to copy things like light fixtures or complicated wall structures and other things made of many brushes/entities. This sucked a lot because I had to reselect everything from scratch.

With ‘Quick Groups’, if you are diligent from the start of your map, you’ll be sitting pretty once you reach critical mass of detail. Every level designer knows what critical mass of detail is. That’s the point in the development of your map when you’ve established the visual theme and now you’re heading for the finish line. You’re working on gameplay and new areas but the visuals are more or less established. With ‘Quick Groups’ you’ll be able to copy complex brushes/entities from earlier in your map without a hassle. You select one brush/entity, hit CMD+OPTION+G and then all the other brushes/entities that are part of that quick group are selected.

It does smart things too. If you copy a group of brushes/entities that are part of a quick group, the new brushes/entities that are pasted into the map will be placed into a new quick group automatically so they will be selectable as a group as well.

Creating a quick group is easy as well. Select the brushes/entities that you want to be grouped together and hit CMD+G.

This is hugely powerful once you get the hang of it. And I’ll go even further and say that it’s more powerful than a prefab system. There, I said it.

Prefabs are a great idea in theory but when it comes to Quake levels you tend to customize things in every level. Your prefab library tends to morph to keep up with your current levels requirements. So you might as well use quick groups and work within the level itself.

And let’s face it - level designers like designing levels. They don’t want to use a bunch of stuff that someone else built. They want to build it themselves.

Sure, sometimes you need something standardized like a slipgate or a teleporter. If that’s the case, just open another map in ToeTag, copy and paste what you need. Prefabs be damned!

Progress

Tuesday, February 12th, 2008

I’m churning away on the guts of ToeTag as I want to have a full WAD editing system in place before the 1.0 release. It’s going to allow you to open and edit WADs with the same freedom you can open and edit MAPs with. It’ll look like a giant texture browser but give you all the power you need to import new textures, export existing ones, etc. It’ll be great!

I need to refactor a bunch of stuff first though and although my code structure is helping me out in many ways, I didn’t account for absolutely everything the first time through so there’s a little pain. Not a ton, but enough that it’s taking more time than I want it to. Oh well!

At any rate, screen shots will be posted once I have something working.

I definitely want to extend this as well to include PAK file editing. Shouldn’t be too hard once the WAD editing is in.

ToeTag 0.9 Released

Saturday, February 9th, 2008

And ToeTag marches forward. Version 0.9 is out!

ToeTag

One of the new features is the ability to set the rotation pivot anywhere in the world. Check it out!

ToeTag 0.9 - CSG Merge Fixed

Friday, February 8th, 2008

The “Merge” option on the CSG menu was using a lame routine that didn’t work fully and screwed up quite a bit. So I sat down and tried to come up with a new one. What I’m doing now is:

  1. Generate a list of unique vertices in the selected brushes (creating a vertex cloud).
  2. Loop through all of those vertices and generate a plane for every possible combination of 3 vertices.
  3. Check each plane and if (a) the normal is unique among the planes we’ve saved so far and (b) none of the vertices in the cloud lies in front of that plane, the plane is kept.
  4. Use the resulting set of planes to create a new brush.

And nobody is more surprised than myself to find that it works! Here’s a movie of it in action. Just think of the optimizations you could do to your levels with a tool like this:

::Click to Watch::

This version will ship sometime over the weekend!

ToeTag 0.9 Preview

Thursday, February 7th, 2008

The new version of ToeTag plods fowards steadily. I’ve added a bunch of stuff to this one, not the least of which is some pretty cool filtering. Filtering means that you have a new control on the toolbar that will allow you to filter out of the view any entities which are editor specific (lights, triggers, etc) as well as filter out based on skill level. So using this you could take a look at your level, as the player would see it, on Hard/Nightmare skill. This lets you verify that you’ve set your skill flags correctly without having to play the game over and over or meticulously go over your entities and checking their spawn flags. Here’s a movie of it in action:

:: Click to Watch ::

In the movie, you’ll be looking down at the final room of E1M2 in the 2D viewport. I first turn off editor only entities and then step through the various skill level filters so you can see which monsters and such appear on each skill level.

Should be useful!

ToeTag Nearing Completion

Friday, February 1st, 2008

Someone commented that updates seem to be slowing down for ToeTag and all I can say about that is … Yes. I mean, it works. It does what I want it to do for the most part so that’s why the updates have slowed. If it doesn’t do something critical then please, by all means, let me know!

I’m going to spend a chunk of the weekend cranking up a 0.9 release and then after that we roll on to the 1.0 real version. And it’ll be, for all intents and purposes, done!

I’ll add stuff over time, sure, but I’m not going to add features simply because I can. I want to limit feature additions to things that will get used by a typical person making a Quake level. The old 80% design rule - add features that will please 80% of your users.

I also spent a little cash and got a new logo/icon done for the editor. Check it out! I think it’s pretty swanky.

ToeTag logo

I also uploaded the source code for my multithreaded versions of LIGHT and VIS if you’re interested in those for your own projects or what-have-you. The original id tools source code is in this directory as well so you can see what I based mine on.

Source Code

Enjoy!

ToeTag Quick Look

Tuesday, January 29th, 2008

As I thought yesterday, the texture browser in ToeTag really benefits from this new Quick Look capability! It was a little more hassle than in Phorg since the Quake textures are read from a WAD file and then held in memory - they aren’t sitting on the hard drive. What this means is that before I call the Quick Look window in ToeTag, I write the selected texture out to the temp directory as a JPG file and then the Quick Look panel shows you that file. It’s seamless from the user’s point of view and that’s all that really matters.

Here’s a look at it in action. This will be in the next version of ToeTag:

toetag_quicklook_thumb.jpg
.: Watch It! :.

Multithreaded LIGHT & VIS

Saturday, January 26th, 2008

I decided to take a look at the LIGHT and VIS source today and see what would be involved with getting them to work multithreaded. I knew that id had put the code in there for their Alpha machines but that it was disabled for everyone else. It turns out the code was almost fine for OSX except for some function names I had to fix up and a tiny bit of code refactoring.

But the end result is awesome! It works!

Some sample timings I took:

DM4
Before:
LIGHT = 1 second
VIS = 8 seconds

After:
LIGHT= 1 second
VIS = 5 seconds

Cool, but not really all that exciting right? Look at this:

START
Before:
LIGHT = 14 seconds
VIS = 49 seconds

After:
LIGHT = 7 seconds
VIS = 35 seconds

That’s a 50% speed up for LIGHT and a 29% speed up for VIS!

Another one:

E1M2
Before:
LIGHT = 25 seconds
VIS = 37 seconds

After:
LIGHT = 13 seconds
VIS = 25 seconds

About the same gains. So it looks fairly linear in nature. Awesome!

One thing to note here is that this is with 2 threads. I have code in the utilities to detect how many CPUs or Cores you have and it uses that number of threads. Using more than that number would be inefficient and using less would be silly. For example, I have a dual core processor so I get 2 threads. If you had one of those new 8 core monstrosities, you would get 8 threads! I would love to see some numbers on those machines.

At any rate, this will be in the 0.8 release of ToeTag which will be along pretty soon. I want to add a few more things before I call it a new version.

You’ll know when you have the multithreaded tools because your output log will have some new lines in it:

==========================================
LIGHT
==========================================

—– LightFaces —-
extra sampling enabled
74 entities read
Using multithreading (2 threads)
lightdatasize: 60932
0 switchable light styles
1.0 seconds elapsed

==========================================
VIS
==========================================

—- vis —-
testlevel = 4
661 portalleafs
1900 numportals
Using multithreading (2 threads)
average leafs visible: 157
c_chains: 3088511
visdatasize:27319 compressed from 54863
30.0 seconds elapsed

Soon!

EDIT: Interested in the source code for these utilities? Click here!

Adding Movies To Documentation

Sunday, January 20th, 2008

I’ve started adding movies into the tutorials now. These are nice since you can see what should be happening on your screen when you follow what the text says. I added some to the 2-Point Clipping tutorial to start with. More to come!