It's all in your head, Part 12

The only place you'll ever hear the truth
User avatar
Chris
Introversion Staff
Introversion Staff
Posts: 1172
Joined: Sat Nov 25, 2000 7:28 pm
Location: Cambridge, UK
Contact:

It's all in your head, Part 12

Postby Chris » Tue Dec 23, 2008 7:10 pm

Subversion has had a tough ride during the latter half of 2008. During that time we shipped Multiwinia and we also did the Chronometer project, so time has been short. Work has still occurred on Subversion, but a lot of it is internal – difficult to demonstrate, and more concerned with the inner workings of the project than externally flashy stuff. So I don’t have a huge amount of cool new stuff to show, but this blog was never about showing the polished finished article – it’s about the development process of an Introversion game.

So, enough excuses, on with the update!

Image
(xvid codec required)

The first half of the video shows the latest version of the Subversion city generator. It now operates in a very different (and much better) way. Once the road network has been finished, a new system takes over – which I’ve called the Geometry Generator. This system is responsible for running all the different procedural generation algorithms in turn as they are required, generating all of the data of the city and pushing it onto the graphics card in realtime before your eyes, starting with a road network and ending at the buildings and skyscrapers.

Image

Some technical details for those interested: This system operates on a hierarchical data structure that represents all the 3d geometry in the world. It searches that data structure, looking for “stub” nodes that haven’t yet been generated. Lets say it finds a node of type “Park” with an outline, and nothing else. It then searches a database of generation rules, looking for anything that can help it generate a park node. Once it finds one it will run that generator and add more detail into the park – such as trees, a lake, a few paths, etc. Those objects then become new child nodes in the hierarchical data structure, and can be generated in more detail later if the rules exist and if you want that much detail. So you could write all the generation rules for Park/Lake/Path/IcecreamVendor/Swings/Slide/Bins etc, going into stupid levels of detail, and the GeometryGenerator would just take care of it for you. You can generate higher levels of detail for objects near the camera, and throw away unnecessary high detail a long way away. This system can be extended easily – if I decide that streets are suddenly vital to Subversion, I can write generators for Street, Road, Pavement etc and add more detail to those previously empty nodes – streetlamps, bins, chairs etc.

Image

One thing I’ve found : you can generate data at an astonishing rate. This system can generate data at a max of around 10,000 polygons per second (its half that in the vid because fraps is very cpu hungry), but it’s not particularly optimised at the moment. In a couple of minutes this system can build a city with over a million polygons. The previous city generator from a year ago couldn’t do anything like this. Firstly I was using openGL display lists, which wouldn’t even be able to render 1M polygons at a decent frame rate, never mind have generation occurring at the same time. I’m now using Vertex Arrays, or Vertex Buffer Objects if your gfx hardware supports it, which are an order of magnitude faster at rendering. Secondly there was no way to update display lists dynamically, but I’ve now figured out a reliable way to update Vertex Arrays with new graphics data every frame, which is why you can now see the city growing in realtime before your eyes – that’s the Geometry Generator, pushing newly generated geometry onto the graphics card in realtime. And thirdly, I’ve made the whole generation system multi-core, freeing it up from the render loop and making good use of my dual-core cpu. All three of those breakthroughs have occurred in the last six months, making this system possible.

Image

The second half of the video shows the work-in-progress generating the insides of buildings. Right now only three bits of detail exist : support columns, elevator shafts (empty), and stairwells. But crucially, and this is where the real magic has happened : the insides of the building now use the same Geometry Generator system as the city and the same data structures, meaning the whole thing has been unified. So instead of generating Parks and Streets and Buildings, we are now generating Floors and Windows and Stairwells, but the underlying system is the same. The transitions still need a lot of work – you would be forgiven for not believing me, but you can click on any building in the city view, and the Geometry Generator will spawn that building’s shell and generate all the data inside the building dynamically. The result is that the buildings all look like they are half-finished construction sites, with just the frameworks and shells of the buildings, and none of the office details. Obviously lots more to do here.

Image

So that’s where things are at the end of 2008. You may be wondering, what happened to the elevators and the buttons and the lua scripts and stuff? Most of that material was moved out of the project while I integrated the Geometry Generator from it’s prototype into the main codebase, and things are still a little bit untidy, but they will be coming back next. I’ve got a clear first playable in my head now, although we are a long way off still, and simulation of the insides of the building is next on the list once I’ve got some basic geometry working. I’d also like to see the transitions from City to Site handled better – ideally I’d like the Site to appear in the city view, inside the buildings you just clicked on, but we’ll see – it may be too much of a render burden, but it would look pretty cool.

Image
Image
Last edited by Chris on Sat Jan 03, 2009 7:18 pm, edited 2 times in total.
Rkiver
level5
level5
Posts: 6405
Joined: Tue Oct 01, 2002 10:39 am
Location: Dublin, Ireland

Postby Rkiver » Tue Dec 23, 2008 7:21 pm

It's rather impressive to say the least, especially how you have it all feed into itself for the generation of, well everything.

One question still remains. What the hell is it?
Uplink help: Read the FAQ
User avatar
xyzyxx
level5
level5
Posts: 3790
Joined: Wed Jul 02, 2003 7:50 pm
Location: Iowa, USA
Contact:

Re: It's all in your head, Part 12

Postby xyzyxx » Tue Dec 23, 2008 7:29 pm

Chris wrote:we also did the Chronometer project,
What? Was it finished? Scrapped? Are you releasing it soon? What?
Some people talk because they have something to say. Others talk because they have to say something.
User avatar
Ebola
level3
level3
Posts: 436
Joined: Sun Nov 09, 2003 6:58 pm
Location: London
Contact:

Postby Ebola » Tue Dec 23, 2008 7:41 pm

Rkiver wrote:
One question still remains. What the hell is it?


What ever it is, it's damn pretty.
Wandel
level0
Posts: 3
Joined: Tue Jul 08, 2008 11:43 am

Postby Wandel » Tue Dec 23, 2008 7:46 pm

Rkiver wrote:One question still remains. What the hell is it?
I don't care, I want it. Now.
User avatar
Varsity
level2
level2
Posts: 122
Joined: Mon Feb 07, 2005 8:30 pm
Location: England
Contact:

Postby Varsity » Tue Dec 23, 2008 7:58 pm

Confirmed: Subversion is not about streets!
Group C
User avatar
prophile
level5
level5
Posts: 1541
Joined: Fri Feb 18, 2005 4:17 pm
Location: Southampton, UK
Contact:

Postby prophile » Tue Dec 23, 2008 8:20 pm

I really like the glow effect from all the lines there.
User avatar
Phelanpt
level5
level5
Posts: 1837
Joined: Thu Aug 10, 2006 4:20 am
Location: Portugal

Postby Phelanpt » Tue Dec 23, 2008 8:21 pm

*drools*
User avatar
Ace Rimmer
level5
level5
Posts: 10803
Joined: Thu Dec 07, 2006 9:46 pm
Location: The Multiverse

Postby Ace Rimmer » Tue Dec 23, 2008 8:24 pm

Did he say "playable"? :D
Smoke me a kipper, I'll be back for breakfast...
martin
level5
level5
Posts: 3210
Joined: Fri Nov 19, 2004 8:37 pm

Postby martin » Tue Dec 23, 2008 8:46 pm

Most impressive. I'm wondering how moddable that geometry generator system will be? can we add our own scripts to generate sub geometry?
GENERATION 22:The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.
User avatar
WaywardG
level0
Posts: 2
Joined: Tue Dec 23, 2008 8:39 pm
Contact:

Postby WaywardG » Tue Dec 23, 2008 8:50 pm

Looks terrific. I only wish the people who made games that are all about building cities would put as much effort into being able to produce cities that are this organic, as opposed to the boring square blocks that always end up being most practical.
User avatar
faemir
level1
level1
Posts: 20
Joined: Sun Apr 01, 2007 9:41 pm

Postby faemir » Tue Dec 23, 2008 8:52 pm

Whatever it is it looks awesome :D

Also, what was the chronometer project?
User avatar
NukeLord
level4
level4
Posts: 525
Joined: Fri Nov 03, 2006 2:08 pm

Postby NukeLord » Tue Dec 23, 2008 9:29 pm

Oh wow, that looks bloody awesome, whatever it turns out to be. Good luck with future progress! :D
User avatar
Xocrates
level5
level5
Posts: 5262
Joined: Wed Dec 13, 2006 11:34 pm

Postby Xocrates » Tue Dec 23, 2008 9:58 pm

faemir wrote:Also, what was the chronometer project?


It's another Introversion project about which we know even less than Subversion :P

Rkiver wrote:One question still remains. What the hell is it?


Since this thread needs more wild speculation, I'm going to say that it is in fact a Metagame. Therefore, and unbeknownst to us, the game was already released and these blog posts are a part of it.

Hence the title "It's all in your head"!
User avatar
xander
level5
level5
Posts: 16869
Joined: Thu Oct 21, 2004 11:41 pm
Location: Highland, CA, USA
Contact:

Postby xander » Tue Dec 23, 2008 10:02 pm

My jaw just hit the floor. That is amazing. I don't suppose anyone wants to buy me a new computer so that I can actually play this thing when it comes out? ;)

xander

Return to “Introversion Blog”

Who is online

Users browsing this forum: No registered users and 10 guests