 |
|
|
Introversion The Introversion Forums
|
 |
 |
 |
 |
|
 |
 |
 |
 |
 |
Chris Introversion Staff


Joined: 25 Nov 2000 Posts: 1095 Location: Cambridge, UK  |
Posted: Tue Dec 23, 2008 6:10 pm Post subject: It's all in your head, Part 12 |
 |
|
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!
(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.
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.
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.
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.
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.
Last edited by Chris on Sat Jan 03, 2009 6:18 pm; edited 2 times in total |
|
| |
|
|
|
 |
 |
 |
 |
 |
Rkiver


Joined: 01 Oct 2002 Posts: 6380 Location: Dublin, Ireland  |
Posted: Tue Dec 23, 2008 6:21 pm Post subject: |
 |
|
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? |
|
| |
|
|
|
 |
 |
 |
 |
 |
xyzyxx


Joined: 02 Jul 2003 Posts: 3779 Location: Iowa, USA  |
Posted: Tue Dec 23, 2008 6:29 pm Post subject: Re: It's all in your head, Part 12 |
 |
|
| Chris wrote: |
| we also did the Chronometer project, |
What? Was it finished? Scrapped? Are you releasing it soon? What? |
|
| |
|
|
|
 |
 |
 |
 |
 |
Ebola


Joined: 09 Nov 2003 Posts: 413 Location: London, Leicester  |
Posted: Tue Dec 23, 2008 6:41 pm Post subject: |
 |
|
| Rkiver wrote: |
One question still remains. What the hell is it? |
What ever it is, it's damn pretty. |
|
| |
|
|
|
 |
 |
 |
 |
 |
Wandel
Joined: 08 Jul 2008 Posts: 3
 |
Posted: Tue Dec 23, 2008 6:46 pm Post subject: |
 |
|
| Rkiver wrote: |
| One question still remains. What the hell is it? |
I don't care, I want it. Now. |
|
| |
|
|
|
 |
 |
 |
 |
 |
Varsity

Joined: 07 Feb 2005 Posts: 122 Location: England  |
Posted: Tue Dec 23, 2008 6:58 pm Post subject: |
 |
|
| Confirmed: Subversion is not about streets! |
|
| |
|
|
|
 |
 |
 |
 |
 |
prophile


Joined: 18 Feb 2005 Posts: 1543 Location: Southampton, UK  |
Posted: Tue Dec 23, 2008 7:20 pm Post subject: |
 |
|
| I really like the glow effect from all the lines there. |
|
| |
|
|
|
 |
 |
 |
 |
 |
Phelanpt


Joined: 10 Aug 2006 Posts: 1839 Location: Portugal  |
Posted: Tue Dec 23, 2008 7:21 pm Post subject: |
 |
|
| *drools* |
|
| |
|
|
|
 |
 |
 |
 |
 |
Ace Rimmer

Joined: 07 Dec 2006 Posts: 10800 Location: The Multiverse  |
Posted: Tue Dec 23, 2008 7:24 pm Post subject: |
 |
|
Did he say "playable"?  |
|
| |
|
|
|
 |
 |
 |
 |
 |
martin


Joined: 19 Nov 2004 Posts: 3212 Location: England / ::1  |
Posted: Tue Dec 23, 2008 7:46 pm Post subject: |
 |
|
| Most impressive. I'm wondering how moddable that geometry generator system will be? can we add our own scripts to generate sub geometry? |
|
| |
|
|
|
 |
 |
 |
 |
 |
WaywardG

Joined: 23 Dec 2008 Posts: 2
 |
Posted: Tue Dec 23, 2008 7:50 pm Post subject: |
 |
|
| 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. |
|
| |
|
|
|
 |
 |
 |
 |
 |
faemir
Joined: 01 Apr 2007 Posts: 20
 |
Posted: Tue Dec 23, 2008 7:52 pm Post subject: |
 |
|
Whatever it is it looks awesome
Also, what was the chronometer project? |
|
| |
|
|
|
 |
 |
 |
 |
 |
jelco


Joined: 18 Feb 2006 Posts: 5972 Location: Cygnus X-1  |
Posted: Tue Dec 23, 2008 8:25 pm Post subject: |
 |
|
*drool*
That looks sweet - oh, and the post itself is interesting as well.
Jelco |
|
| |
|
|
|
 |
 |
 |
 |
 |
NukeLord


Joined: 03 Nov 2006 Posts: 521 Location: Liverpool, England  |
Posted: Tue Dec 23, 2008 8:29 pm Post subject: |
 |
|
Oh wow, that looks bloody awesome, whatever it turns out to be. Good luck with future progress!  |
|
| |
|
|
|
 |
 |
 |
 |
 |
Xocrates


Joined: 13 Dec 2006 Posts: 5174
 |
Posted: Tue Dec 23, 2008 8:58 pm Post subject: |
 |
|
| faemir wrote: |
| Also, what was the chronometer project? |
It's another Introversion project about which we know even less than Subversion
| 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"! |
|
| |
|
|
|
 |
 |
 |
 |
 |
|
 |
 |
 |
 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
 |