Naked War: Camera Routines (are hard work)

Community Forums/Showcase/Naked War: Camera Routines (are hard work)

John Pickford(Posted 2005) [#1]
Naked War is a turn-based email game in which each side has four units. Fundamental to the concept, all 4 units turns are planned ahead of time and executed together. This works really well for email and prevents cheating as the turn is sent before you get to see the outcome.

Having 4 units move at once means there is quite a lot of information to take in when the turns are executed. My original solution used multiple camera views with each unit having in inset close up view all overlaid on a top down view which attempts to keep everything visible.

This works really well and you get lots of cool shots of the units in action but quite a few people have found this confusing - especially when they are first learning to play.

Here is a turn using the multicam system:

http://www.zee-3.com/video/multicamturn.wmv

All along I thought a single camera view would be good but I thought it would be virtually impossible to create a satisfactory single viewpoint that could keep up to 8 active objects visible at all times on complex maps (with walls, cliffs, bridges etc.).

Anyway, at the weekend I had a bit of a brainwave. What if I use an isometric style view with a limited number of angles, and score each viewpoint in realtime according to how many of the active objects are visible? By using a very long (but zoomed in) view I can treat it as an almost parallel projection so in each tile I can store a simple flag to say whether that tile is visible from any given angle. In the end I found that 8 angles was pretty much enough to achieve the result.

What surprised me is that by not worrying about finding the impossible perfect angle, the best available angle is great 99% of the time.

Throw in an autozoom feature and a few tweaks and you have a pretty smart looking camera which conveys a lot of information without overloading the viewer.

Here's the exact same turn using the single camera view:

http://www.zee-3.com/video/monocamturn.wmv

A pleasant surprise was how well the two views complement each other. The player can switch between the views on the fly.

There is no manual camera control in either video.


Robert Cummings(Posted 2005) [#2]
I like it.

I don't believe in user-controlled cameras. Perhaps nintendo will get that right one day.


BlitzSupport(Posted 2005) [#3]
The isometric view is way better... very nice. The only thing that throws me off is that I tend to hear the shot, then have to look for where it's coming from, by which time I've failed to spot what's happening.

It might be worthwhile drawing attention visually to who's about to fire in some way or other (ideally with accompanying sound). Seeing where the shot is aimed beforehand will make it more tense if it's aimed in your general direction.

(BTW Your server must fairly rock -- I was getting sustained 470+ K download speeds for those two videos.)


John Pickford(Posted 2005) [#4]

It might be worthwhile drawing attention visually to who's about to fire in some way or other (ideally with accompanying sound).



Yep, I'm looking into that now. The multicam view takes care of this by wobbling the window a bit just before firing. I'm looking for something else for the monocam.

That's good news about the server!

EDIT: Came up with a solution. Video uploading now...


Matt McFarland(Posted 2005) [#5]
I think your game is looking very very very very nice! I cant wait until it's finished and congratulations on your hard work!


Bouncer(Posted 2005) [#6]
I have said it before, but I'll say it again....

DAMN this project looks good... the gfx are so... hmmm... commercial quality.

Keep it up.


John Pickford(Posted 2005) [#7]
Okay new vid:

Because shots are staggered (for clarity) anyway, I realised I can make the camera zoom in on the unit taking the shot.

In this turn I've got two tanks on opposite sides of the map shooting at the same time (but staggered)

http://www.zee-3.com/video/monocamplus.wmv

(You can hear an email arriving at the end of the vid - good old fraps!)


Tri|Ga|De(Posted 2005) [#8]
SUPERP!

This must go commercial!


John Pickford(Posted 2005) [#9]
It is commercial. The software will be free but we'll be charging to use the service. We havent worked out the pricing yet but we're looking at about 12GBP for a number of 'challenges' each one will allow you to start a game (which can go on for an indefinite number of turns). You'll be able to challenge anyone - the recipient doesn't have to pay anything.

We're calling this a 'community' game with all sorts of stuff built around the game community. More details when we get closer to launch.


BlitzSupport(Posted 2005) [#10]
Yes, that's much better. It really looks the business!

I was thinking (on that last video) that when the tank goes on a long journey, the engine sound is quite repetitive. I wondered if it might sound decent if the engine noise was sped up/slowed down very slightly according to the angle of the tank body (up a bit when climbing, down when descending). It would add a little variation, especially when there's more than one moving at a time.


Matt McFarland(Posted 2005) [#11]
Ahh is it a UK Only game?


John Pickford(Posted 2005) [#12]
Not at all.


FBEpyon(Posted 2005) [#13]
This game seems to be coming alone very nicely..
Im still wondering how much you would charge for the engine there is alot of things I could see that could be made using this style of engine..


Mark Tiffany(Posted 2005) [#14]
Wow. This looks very good John, the third movie definitely feels like it plays better and is less confusing, although the zoomed in versions were pretty neat too. One thing though, I'd zoom to the tank before the turret moves round, not after it rotates but before firing. Also agree on the sound thing, some slight variation would be good.


John Pickford(Posted 2005) [#15]
Another, slightly more frivolous mode. A Dallas style split-screen.

http://www.zee-3.com/video/splitscreen.wmv


John Pickford(Posted 2005) [#16]
I got the look ahead system working. The system now takes two types of input - points that affect the camera target and zooming (scrolling) and points that affect the rotation. These latter points are used for the look ahead system so when a unit approaches a part of the landscape where it might be obscured, the camera will (hopefully) rotate to prevent this.

It works pretty well I think. It's a bit twitchy in places and sometimes the optimal route isn't what a human camera operator would do. But overall I think it's pretty good for a 100% automated system.

http://www.zee-3.com/video/lookahead.wmv


Warpy(Posted 2005) [#17]
Looking good! I noticed it wobbled a bit on the corners of that castle, but it's still impressive.
By the way - the wmv files on your server load as text in firefox, meaning the MIME types haven't been set up properly. Might want to look at the apache config to fix that...


John Pickford(Posted 2005) [#18]
Yeah, I'm sure I can iron out that wobbling. It's a matter of knowing when to stop and move on to something else. You could spend forever on cameras.

I think I can improve some of the rotations. Currently when it chooses a new angle it goes by the shortest way around (which seems logical). But I think it might be better to choose the direction based on the visibility score of the intervening angles. So it's better go go the long way around if it keeps the unit(s) in view.


Server stuff: No idea what any of that means. I'll pass the comments on to someone who does. Cheers.


Warpy(Posted 2005) [#19]
Maybe some curve-fitting algorithms would help reduce the wobble - ie smooth out those L-shapes to more of a diagonal.


John Pickford(Posted 2005) [#20]
It's all curves. The camera rotates about the target. It's more to do with decisiveness and choosing the best direction to turn.


Booticus(Posted 2005) [#21]
Dude. Rockin'. Must have it. :)


Qube(Posted 2005) [#22]
John, that is some very impressive camera work indeed. It's nice to see attention to detail where it all makes the difference :)

*side note*
The WMV files opening as text files in firefox is a simple fix on the server side.

add the following line into the httpd.conf on the server (if using apache)

AddType Windows Media Audio/Video file .wmv


John Pickford(Posted 2005) [#23]
Cheers. I'll be speaking to (drinking beer with) our 'IT department' tonight.

I've fixed most of the 'wobbles' with the camera now. I think it's pretty much as good as it can get for an automatic system now. It's probably not worth posting another video for a small improvement.