It's all in your head, Part 11

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 11

Postby Chris » Mon May 12, 2008 6:25 pm

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.

Image

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.

Image

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.

Image

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.
User avatar
shinygerbil
level5
level5
Posts: 4667
Joined: Wed Dec 22, 2004 10:14 pm
Location: Out, finding my own food. Also, doing the shinyBonsai Manoeuvre(tm)
Contact:

Postby shinygerbil » Mon May 12, 2008 6:30 pm

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! :)
Here is my signature. Make of it what you will.
Image
User avatar
aiusepsi
level0
Posts: 4
Joined: Sat May 19, 2007 4:40 am
Location: London

Postby aiusepsi » Mon May 12, 2008 7:08 pm

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?
User avatar
NukeLord
level4
level4
Posts: 525
Joined: Fri Nov 03, 2006 2:08 pm

Postby NukeLord » Mon May 12, 2008 7:16 pm

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
level0
Posts: 2
Joined: Wed Dec 12, 2007 11:02 pm

awesome

Postby DarkMatter » Mon May 12, 2008 7:25 pm

Lua is awesome so ive heard!! And I've always been intrigued with FBO's
User avatar
shinygerbil
level5
level5
Posts: 4667
Joined: Wed Dec 22, 2004 10:14 pm
Location: Out, finding my own food. Also, doing the shinyBonsai Manoeuvre(tm)
Contact:

Postby shinygerbil » Mon May 12, 2008 8:05 pm

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. :P

Also, I second nukeLord's idea for the unsphericalisation(?) thing. Otherwise people are gonna get confused. :o
User avatar
barabanus
level0
Posts: 4
Joined: Wed Nov 14, 2007 12:39 pm
Location: Kiev, Ukraine
Contact:

Postby barabanus » Mon May 12, 2008 8:58 pm

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.
An Experiment in Gameplay Design
http://occamus.blogspot.com
User avatar
jelco
level5
level5
Posts: 6018
Joined: Sat Feb 18, 2006 7:45 am
Location: Cygnus X-1
Contact:

Postby jelco » Mon May 12, 2008 9:02 pm

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. :wink:)

Jelco
"The ships hung in the sky much the same way that bricks don't."
- Douglas Adams
Rkiver
level5
level5
Posts: 6405
Joined: Tue Oct 01, 2002 10:39 am
Location: Dublin, Ireland

Postby Rkiver » Mon May 12, 2008 9:07 pm

In a word, oooh shiney.


Also yay for scripting.
Uplink help: Read the FAQ
Dyakson
level0
Posts: 2
Joined: Tue May 13, 2008 12:24 am

Postby Dyakson » Tue May 13, 2008 12:28 am

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? :D
User avatar
briceman2
level2
level2
Posts: 123
Joined: Wed Dec 12, 2007 4:30 am

Postby briceman2 » Tue May 13, 2008 12:51 am

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
level1
level1
Posts: 15
Joined: Sat Dec 30, 2006 4:42 pm

Postby captainslow » Tue May 13, 2008 1:52 am

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 :P
EvilPanda
level0
Posts: 6
Joined: Wed May 07, 2008 4:09 am
Location: Los Angeles
Contact:

Postby EvilPanda » Tue May 13, 2008 2:49 am

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?
Each problem that I solved became a rule which served afterwards to solve other problems.
Rene Descartes
User avatar
Pox
level5
level5
Posts: 1786
Joined: Sat Mar 03, 2007 11:23 am
Location: Melbourne

Postby Pox » Tue May 13, 2008 7:42 am

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
level5
level5
Posts: 6405
Joined: Tue Oct 01, 2002 10:39 am
Location: Dublin, Ireland

Postby Rkiver » Tue May 13, 2008 8:23 am

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.
Uplink help: Read the FAQ

Return to “Introversion Blog”

Who is online

Users browsing this forum: No registered users and 1 guest