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


Joined: 25 Nov 2000 Posts: 944 Location: Cambridge, UK  |
Posted: Mon May 12, 2008 5:25 pm Post subject: It's all in your head, Part 11 |
 |
|
There’s been an awful lot going on at Introversion in the last six weeks, so much so that I’ve felt at times completely overloaded with the sheer number of tasks that need attending to. Mark describes it as playing “Director Tennis”, batting away each problem as it comes towards us and existing only in the moment, never able to sit back and contemplate the higher level strategy. I’d gotten into the habit of working in London for a couple of days a week, which was barely enough to fit all the frantic meetings in, followed by another day when the required people commuted to my house in Cambridge for yet more day long meetings. Three days a week spent almost entirely talking – and planning, scheduling, and all that stuff that responsible directors are supposed to do. I swear to god, sometimes it feels like an episode of the West Wing, with one crisis blending into the next at 200 miles per hour, non stop.
Suffice to say, Subversion progress has been slow during this time. Despite being a Director I like to arrange lots of creative time away from everyone else, because I’ve found it just doesn’t happen if I’m in a house full of people. For whatever reason, Creation is a solitary pursuit for me. Thankfully things have died down a little now, most of the crises have been averted or postponed, and I’m back to a more regular schedule. There hasn’t been a strong theme to the Subversion work since the last update – but I’ve been working on a number of different ideas, so I’ll just run through them all and you’ll have to put up with the scattershot delivery.
One of my intentions is to create a really swish graphical user interface – the sort that everyone wishes computers really used, and the sort that you only ever see in films. One of my ideas is to do away with the traditional 2d interface and project everything onto the inside of a sphere. Focussed windows can be brought closer in 3d space, and you effectively have a huge desktop extending 360 degrees around you. Looks kinda swish, so long as you have 4xAA. Otherwise the jaggies get you. I’m not 100% sold on this interface idea yet, but it’s a fun experiment.
We’re using offscreen buffers for the individual windows now (openGL FrameBuffer Objects specifically), which means I can do whatever I want with them after they’ve been rendered as they’re simply textures. I’ve also experimented with Vertex Arrays for performance enhancements in the city generator (previously it was rendering pretty slowly – the result of 50,000 odd buildings) and found some pretty big speedups, but the big revelation is the openGL Vertex Buffer Objects extension. It basically lets you upload static geometry directly into super-fast memory on your graphics card, and then render the whole lot with just a few commands. I’m still experimenting but it’s extremely fast, rendering the whole city (about 1 million polygons) in around 10ms. This is the way I’ll be going in future I think.
Regarding the update from February where I talked about script systems, I’ve now made the decision to go with Lua and integrated it into the game. All game objects can now have a script running on them, and I’ve developed some basic debugging and exploring tools for the script state. In the screenshot above you can see the System Explorer – it’s basically a system engineer’s layout of the whole elevator system, showing how all of the individual components are connected. Scripts running on each component have their own independent state and can communicate with each other by passing messages down the connections – you can see the Signal Bus in the diagram which runs vertically down the elevator shaft, connecting every component on every floor to the master computer that controls the whole elevator system. The control computer itself has the most complex of all the scripts, handling button presses on the floors, sensor inputs from the elevator shaft, and controlling the doors and main motor. For those of you who are interested in scripting for Subversion, here’s a sample of script code from the Elevator Control Computer, which controls pretty much everything. Functions in scripts are called automatically – all objects can declare a function called Update, and it will be called once a second if it exists. Similarly, message handlers can be written with names matching the incoming messages – eg the Elevator Door has a function called ReceiveMessage.OpenDoor, which is automatically called when the door receives an OpenDoor message from the control computer.
For those not even remotely interested in scripting languages, obviously don't click on this incredibly geeky picture.
Regarding the quad-tree experiments from the last Subversion update, I’ve since concluded that they’re not a particularly good idea. Locking the game world to square blocks makes life easier for the map makers but pretty much everyone else suffers, including the players who are limited to a fundamentally blocky world. There are ways around it but eventually you just end up asking what’s the point – we’re going with arbitrary polygons and that’s it. It did make me realise how bad the existing map tools are though – lots of work is required here I think. Although I am planning to do a lot of procedural content generation, you can’t really beat hand-made locations and I’m thinking the most important bits of the game will almost all be hand made by Introversion. Procedural content will widen the experience by filling in all the less important surrounding areas. And if we get the script system and tools right, user made content will give a steady stream of cool new content after launch for everyone to get stuck into. That’s the dream – procedurally generated content, hand made special content, and user made content, all in one game. |
|
| |
|
|
|
 |
 |
 |
 |
 |
shinygerbil


Joined: 22 Dec 2004 Posts: 4349 Location: Out, finding my own food. Also, doing the shinyBonsai Manoeuvre(tm)  |
Posted: Mon May 12, 2008 5:30 pm Post subject: |
 |
|
Awesome. I really like the idea of the 3d desktop - perhaps you could incorporate some of the things being used in Compiz for Linux, such as nifty ways of organising your workspaces.
Also, I'm glad you've decided to go for Lua. It definitely seems like the way forward!  |
|
| |
|
|
|
 |
 |
 |
 |
 |
aiusepsi

Joined: 19 May 2007 Posts: 3 Location: London  |
Posted: Mon May 12, 2008 6:08 pm Post subject: |
 |
|
The thing about 3D desktops like that is although they look astoundingly cool, in practice simpler things usually work better. The real trick is in making it cool without impairing usability.
So I take it that each component in the elevator system is a physical object within the game? Does that mean that if I were to say, blow up the master control computer, the whole thing would stop working? |
|
| |
|
|
|
 |
 |
 |
 |
 |
NukeLord

Joined: 03 Nov 2006 Posts: 509 Location: Liverpool, England  |
Posted: Mon May 12, 2008 6:16 pm Post subject: |
 |
|
| I like the idea of the sphere, but it might be slightly difficult to read well due to the distortion, unless perhaps when a window is focused it unspherises into a normal rectangular window. Unless that's what you meant when you mentioned bringing it closer in 3d to the screen. |
|
| |
|
|
|
 |
 |
 |
 |
 |
DarkMatter
Joined: 12 Dec 2007 Posts: 2
 |
Posted: Mon May 12, 2008 6:25 pm Post subject: awesome |
 |
|
| Lua is awesome so ive heard!! And I've always been intrigued with FBO's |
|
| |
|
|
|
 |
 |
 |
 |
 |
shinygerbil


Joined: 22 Dec 2004 Posts: 4349 Location: Out, finding my own food. Also, doing the shinyBonsai Manoeuvre(tm)  |
Posted: Mon May 12, 2008 7:05 pm Post subject: |
 |
|
I hasten to add, I don't mean the stupid things in Compiz like wobbly windows that get in the way of usability. I mean the stuff that helps you sort and organise your windows, etc.
Also, I second nukeLord's idea for the unsphericalisation(?) thing. Otherwise people are gonna get confused.  |
|
| |
|
|
|
 |
 |
 |
 |
 |
barabanus

Joined: 14 Nov 2007 Posts: 4 Location: Kiev, Ukraine  |
Posted: Mon May 12, 2008 7:58 pm Post subject: |
 |
|
| I knew you'd choose Lua - it's beautiful and aesthetic language, though I wonder if those 50,000 buildings with their scripts on every occasion won't blow up one's CPU. |
|
| |
|
|
|
 |
 |
 |
 |
 |
jelco


Joined: 18 Feb 2006 Posts: 5149 Location: Cygnus X-1  |
Posted: Mon May 12, 2008 8:02 pm Post subject: |
 |
|
I'm in favour of that sphere. Like you said Chris, it's one of those fancy interfaces you only see in movies, and I'd like to be able to use it myself as well!
I like where this is going. Currently it looks a lot like a very advanced form of SimCity/SimTower, heavily biased to the technical side of things, which means it will be more of an interactive version of AutoCAD than a real game. Nevertheless it looks really interesting.
| Chris wrote: |
| For those of you who are interested in scripting for Subversion... |
So the scripting part is going to be a main feature, in-game? Or just something for modders to create their own environments? (I know that you will probably not know a lot more than we do, but I can't help asking. )
Jelco |
|
| |
|
|
|
 |
 |
 |
 |
 |
Rkiver


Joined: 01 Oct 2002 Posts: 6250 Location: Dublin, Ireland  |
Posted: Mon May 12, 2008 8:07 pm Post subject: |
 |
|
In a word, oooh shiney.
Also yay for scripting. |
|
| |
|
|
|
 |
 |
 |
 |
 |
Dyakson
Joined: 12 May 2008 Posts: 2
 |
Posted: Mon May 12, 2008 11:28 pm Post subject: |
 |
|
This looks brilliant!
Would the gameplay allow you to, for instance, hack into the Elevator Control Computer and alter the script to stop the elevator full of security guards from reaching your Mission: Impossible team?  |
|
| |
|
|
|
 |
 |
 |
 |
 |
briceman2

Joined: 12 Dec 2007 Posts: 123
 |
Posted: Mon May 12, 2008 11:51 pm Post subject: |
 |
|
| Chris wrote: |
| Focussed windows can be brought closer in 3d space, and you effectively have a huge desktop extending 360 degrees around you. ... I’m not 100% sold on this interface idea yet, but it’s a fun experiment. |
I second (or third or whatever) others' hesitance about this. Maybe a "better" cut might be to do roughly the same thing, but only play with z-order and foreshortening of 2D windows. Some fancy/funky move-to-foreground, move-to-background, etc. effects plus intelligent / intuitive / prescient window management would achieve almost the same cool factor without the distortion eyeache / headache / GPU flooraches. Have a sea of drifting or dancing windows at various depths along the z axis... Windows could be kinda autonomous agents and jostle for foreground space... Or they could dynamically reorganize based on learned player habits -- so only a couple of window management keys would (after some learning curve) be sufficient for total domination of the interface...
| Chris wrote: |
| Regarding the quad-tree experiments from the last Subversion update, I’ve since concluded that they’re not a particularly good idea. |
Did you try hanging the non-quadtree data off a quadtree? I.e. adaptively extend the quadtree in areas where non-square geometry exists, and then use the leaf grid to decompose the arbitrary geometries into segments, with each sub-segment hanging off the appropriate quadtree node? The appropriate level of decomposition would be tunable (or just tuned) for whatever performance metrics you end up chasing -- and could vary per object, etc. You would get quadtree addressability (fast) and arbitrary geometry, adaptively rasterized into segmented approximations. Curve data within each quadtree node could be bezier or whatever, so there is no need to let the quadtree impose it's underlying "blockiness" on the represented geometries. The quadtree is just an organizer -- but quadtree-specific tricks (like easy editing of blocky worlds or unsmoothed first cuts / rough cuts) could be easily applied.
| Chris wrote: |
| ... but the big revelation is the openGL Vertex Buffer Objects extension. It basically lets you upload static geometry directly into super-fast memory on your graphics card, and then render the whole lot with just a few commands. |
So that's why I keep running into the feeling that the Darwinia engine is doing the bulk of it's rendering on the CPU side! Levels I create which have thousands of buildings render slower than expected. And likewise, when glow effects are closeup and are rendered to a large area of the screen, there is a huge performance hit ... which has always seemed weird because GPUs are tailored to applying textures to arbitrary areas. Darwinia must do a lot of CPU-side work that can be done more efficiently GPU-side. It's too bad learning curves and deadlines are the worst of enemies  |
|
| |
|
|
|
 |
 |
 |
 |
 |
captainslow
Joined: 30 Dec 2006 Posts: 14
 |
Posted: Tue May 13, 2008 12:52 am Post subject: |
 |
|
I know this isn't the place (or time) for requests, but please, please, OH PLEASE remember us wide-desktop people (my resolution, for example, is 3840x800) when you finish the graphics engine.
I was able to make Darwinia work with it, but Uplink and Defcon were a no-go. Time to even the score  |
|
| |
|
|
|
 |
 |
 |
 |
 |
EvilPanda
Joined: 07 May 2008 Posts: 6 Location: Los Angeles  |
Posted: Tue May 13, 2008 1:49 am Post subject: |
 |
|
| Have you thought about procedural architectural style? In a similar way that you created citymaps with different feels in blog 7, could you create styles of buildings, including facades, to match the pattern of the streets? |
|
| |
|
|
|
 |
 |
 |
 |
 |
Pox

Joined: 03 Mar 2007 Posts: 1786 Location: Melbourne  |
Posted: Tue May 13, 2008 6:42 am Post subject: |
 |
|
Oooh, shiny!
Also, I'm kind of over the all 3d-desktop thing: after playing with beryl for a few months I was craving a simple interface... sure, it's shiny, but quite irritating sometimes. If you do end up implementing it, please throw in an option for flat-style too  |
|
| |
|
|
|
 |
 |
 |
 |
 |
Rkiver


Joined: 01 Oct 2002 Posts: 6250 Location: Dublin, Ireland  |
Posted: Tue May 13, 2008 7:23 am Post subject: |
 |
|
| Pox wrote: |
Oooh, shiny!
Also, I'm kind of over the all 3d-desktop thing: after playing with beryl for a few months I was craving a simple interface... sure, it's shiny, but quite irritating sometimes. If you do end up implementing it, please throw in an option for flat-style too  |
Indeed it does look quite like the interfaces I played with in linux, compiz, beryl, XL and the like. I am quite interested to see what the scripting will enable us to do as the game progresses. |
|
| |
|
|
|
 |
 |
 |
 |
 |
|
 |
 |
 |
 |
|
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
|
|
|
 |