Welcome, Unregistered.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Reply
Old 22-Apr-2012, 19:05   #1
reptile
Junior Member
 
Join Date: Oct 2004
Posts: 52
Default Sine Mora technical post mortem(ish)

Hey everyone,

i was going to write a technical post-mortem on our shooter, Sine Mora, but i just can't motivate myself enough to learn powerpoint, so i thought, hey, why not just post it on beyond3d, maybe someone will find it useful/interesting... so here it is.

Sine Mora is basically a shoot'em'up, in the tradition of Einhander, or R-Type. From a technical point of view, there were two things i was trying to make sure that make it into the game: solid 60fps and good image quality. The final game manages to maintain 60fps all the time except two occassions, unfortunately - we fell victim to regression and nobody noticed it until it was late - sorry (some cutscenes also drop frames, but they weren't considered important from a gameplay point of view)

The game is using forward rendering, mainly because i didn't want to give up hardware MSAA, and i just couldn't figure out a way to do it deferred in the 16ms allowed. Each objects has one main light (spot or directional) and a maximum of 8 point lights attached. Main lights also use a pretty standard PCF shadowmap - no big tricks here, directional shadows are frustum focused, with a distance of 800 units, fading out in the domain of 600-800. There are about 5-6 different materials in the game, each using an average of 2-3 textures, all of them DXT1/5. Distant objects switch to a simpler material with no crossfade - usually they're far enough for it to be completely unnoticable.

Sine Mora is rendered at 1280x544x4AA, with black bars on the top/bottom of the screen. This was a design decision to make it more cinematic. Aniso4x is used on most textures. Rendering order is something like this:

- Shadows are rendered into a 1024x1024 shadowmap.

- Reflections are rendered into a 640x272x0AA target, using oblique frustum clipping.

- The main opaque scene is rendered into a 1280x544x4AA target, the destination alpha is used to indicate pixels which are "important". Important pixels are not blurred when slomo is on.

- Transparent objects are rendered, still using the render target from the previous step.

- The zbuffer gets downscaled, storing its min/max values into a 640x272 target.

- Half-res (or quarter res, depends on how you look at it ) particles are rendered into a 640x272 target, using the downscaled min/max zbuffer to better approximate the high-res target. Fading is calculated for both values, and then averaged.

- Color & zbuffer gets reloaded into a 1280x544x0AA target, and the half res soft-particle buffer is upscaled on top of it, using FXAA. FXAA was much faster and better looking, then any bilateral upscale i've tried.. maybe i just didn't try hard enough

- Foreground transparencies are rendered, now this is an interesting step, because we've already lost AA at this point, but there are so few foreground draw calls, apart from bullets, that it's really not that noticable.

- The final target is resolved into a half-res buffer, using the alias-as-msaa hack, and then blurred. This blurred buffer is then used by the compositing shader for either a simple bloom, or to separate the background in slomo/boss intro modes. As a bonus, if the art filter is on, two volume textures are used to transform the final colour values into the first and second best matching entries of the C64 palette. (and no, i didn't use the vice palette as a reference )

- And finally, the GUI is rendered.

Average triangle count is 400.000-500.000, which is not a very relevant metric, but sounds good In stereoscopic 3D, some compromises had to be made to maintain the holy 60fps AA is reduced to 2x, and the horizontal resolution is halved. This does NOT apply to the GUI, which is still rendered in full resolution, even in 3D.

Because the game has a strong reliance on time manipulation (read: slooowmoo), all particle movements are scaled by current game speed. This also means, that animated textures (which we use a LOT) have to be blended too - all texture anim particles in the game fetch two texels (current frame vs next frame) and blend between them. Rewinding time required us to store game state every 4 frames, including particle data, and we play it back by restoring the newest frame and advancing the game by N frames, where N is 0..3. (to avoid jerky rewind - you can still spot some objects not rewinding as smoothly!)

So there it is... i hope some of you will find it an interesting read.
reptile is offline   Reply With Quote
Old 22-Apr-2012, 20:13   #2
AlNets
Posts may self-destruct
 
Join Date: Feb 2004
Location: In a Mirror Darkly
Posts: 15,178
Default

Thanks, reptile! Much appreciated.
__________________
"You keep using that word. I do not think it means what you think it means."
Never scale-up, never sub-render!
(╯□)╯︵ □ Flipquad
AlNets is offline   Reply With Quote
Old 22-Apr-2012, 20:25   #3
Gitaroo
Senior Member
 
Join Date: Nov 2007
Posts: 1,699
Default

someone post on neogaf from someone @ grasshopper said "stay tune for PS3 news" irc. Is it really coming?
Gitaroo is offline   Reply With Quote
Old 22-Apr-2012, 21:07   #4
reptile
Junior Member
 
Join Date: Oct 2004
Posts: 52
Default

AlStrong: thanks

Gitaroo: i cant comment on that but in the spirit of my original post, if it did, it would be using the SPUs to run some custom code for frustum/backface culling per-triangle, and for the FFT water surface simulation.
reptile is offline   Reply With Quote
Old 23-Apr-2012, 00:23   #5
Gitaroo
Senior Member
 
Join Date: Nov 2007
Posts: 1,699
Default

I bought your game on day 1 and its definitely the most high end shumps I have seen and enjoy it a lot. Only problem I have is its sometime its hard to see the bullets and the enemies, I think some reviews have touched on that. If you look at some other 2D shumps from cave, you distinguish between the background, bullets and enemies easily or 3D shumps like Ikaruga with fog. Thanks for the reply though, hope to see more games from you guys. Maybe some Vita support would be nice....
Gitaroo is offline   Reply With Quote
Old 23-Apr-2012, 08:58   #6
BadTB25
Senior Member
 
Join Date: Aug 2007
Location: Florida
Posts: 1,301
Default

Thanks for the topic reptile.
I didn't even know about the game, but will at least try the trial and maybe even purchase.
I used to love these type of games when I was much younger.

Good luck on getting the word out and hopefully a successful release.
BadTB25 is offline   Reply With Quote
Old 23-Apr-2012, 11:24   #7
SteelOak
Member
 
Join Date: May 2010
Posts: 115
Default

Thanks !
I was really suprised how good this game looks,really clean looking game and the art is just amazing.
SteelOak is offline   Reply With Quote
Old 23-Apr-2012, 22:14   #8
kagemaru
Senior Member
 
Join Date: Aug 2010
Location: Ohio
Posts: 1,350
Default

Man I wish I clicked on this thread sooner, thanks for the post reptile!
kagemaru is offline   Reply With Quote
Old 24-Apr-2012, 22:08   #9
Molecular
Registered
 
Join Date: Oct 2006
Location: Queens, New York
Posts: 8
Default

Thank you for your post reptile, I purchased the game day one and love it (schmups are my favorite genre). I heard the game is struggling here in the US but hopefully word gets out and more people will buy it. Will the game be updated to address those minor slowdown issues at some point (not that I have seen any yet, to be honest with you)?

How is the game doing in Japan?
Molecular is offline   Reply With Quote
Old 24-Apr-2012, 22:27   #10
Rotmm
Member
 
Join Date: May 2008
Posts: 688
Default

I'm another one that would like to thank you for that interesting and insightful post.

Unlike others here, I'm not a big fan of schmup, especially side-scrollers.. Even going back to Defender and Scramble I have just not been able to get along with them. And my most despised schmups of all? Bullet Hell Schmups.

And yet I bought Sine Mora day one.

Fuck me if it isn't just beautiful, with a rock-steady framerate meaning beautifully reactive controls.

I still die a lot and suspect that I'll never see the conclusion of the story, but I don't regret my purchase one little bit.
Rotmm is offline   Reply With Quote
Old 25-Apr-2012, 07:13   #11
Billy Idol
Senior Member
 
Join Date: Mar 2009
Location: Europe
Posts: 4,039
Default

thanks for the post!!
I am going to buy this game today...didn't know about it, but love those type of games!! (Except the game "Blood Money", which I hate because of those flip your control input towers mid level )
__________________
I bid farewell with a rebel yell...
Billy Idol is offline   Reply With Quote
Old 25-Apr-2012, 17:25   #12
archangelmorph
Senior Member
 
Join Date: Jun 2006
Location: London
Posts: 1,551
Default

Hi reptile,

Great post...

Especially interested on the fact that you guys maintain such a low number of materials in the game?

I'm assuming you've taken the ubershader approach?

Can you comment briefly on what your 5-6 material are?

Also do you guys do static branch removal on those shaders or just absorb the cost of branching on the ALUs?
__________________
blog
twitter
archangelmorph is offline   Reply With Quote
Old 25-Apr-2012, 17:46   #13
reptile
Junior Member
 
Join Date: Oct 2004
Posts: 52
Default

Thank you for the feedback guys!

Gitaroo: yeah the background separation issue is still there to a degree. we've tried a few things, and the current one was the best. not perfect, i know.

Molecular : i have no idea... but the number on the leaderboard screen doesn't make us happy

archangelmorph : the main material is actually quite simple, it has a diffuse, a normal, and a "mask" texture. (the mask texture has different things encoded in its r/g/b channels, like selfillum, and such). Then there's a "metal" version (just a fancy name - it's basically got a reflection cubemap added on top), and things like vegetation and light shafts have their own, simplified materials. There's no branching in the shaders at all, i compile up to 36 variations of a shader, so you could say, that it is indeed an ubershader approach. Maintaining 60fps required the shaders to be relatively simple - no big magic going on there, it's just the artists were amazingly good
reptile is offline   Reply With Quote
Old 25-Apr-2012, 18:21   #14
archangelmorph
Senior Member
 
Join Date: Jun 2006
Location: London
Posts: 1,551
Default

Quote:
Originally Posted by reptile View Post
archangelmorph : the main material is actually quite simple, it has a diffuse, a normal, and a "mask" texture. (the mask texture has different things encoded in its r/g/b channels, like selfillum, and such). Then there's a "metal" version (just a fancy name - it's basically got a reflection cubemap added on top), and things like vegetation and light shafts have their own, simplified materials.
We did something very similar to this back on Explodemon...

Quote:
Originally Posted by reptile View Post
There's no branching in the shaders at all, i compile up to 36 variations of a shader, so you could say, that it is indeed an ubershader approach. Maintaining 60fps required the shaders to be relatively simple - no big magic going on there, it's just the artists were amazingly good
Definitely evident in the look of the game...

Really nice work dude...
__________________
blog
twitter
archangelmorph is offline   Reply With Quote
Old 25-Apr-2012, 18:38   #15
Kasersky
Member
 
Join Date: Sep 2009
Posts: 305
Default

any chance you can share how many people+time frame it took you guys to develop the game.
Kasersky is offline   Reply With Quote
Old 28-Apr-2012, 11:54   #16
Billy Idol
Senior Member
 
Join Date: Mar 2009
Location: Europe
Posts: 4,039
Default

Bought it, tested it...cool game!!
__________________
I bid farewell with a rebel yell...
Billy Idol is offline   Reply With Quote
Old 29-Apr-2012, 23:12   #17
RudeCurve
Senior Member
 
Join Date: Jun 2008
Posts: 2,809
Default

Thanks for posting this, wasn't even aware of the game's existence...been busy with other stuff. Anyway I just bought it and it's currently downloading now..will be playing it tonight. There needs to be more advertising for these games. If it hadn't been for this thread I probably would've never known about it and would've never purchased it.
__________________
I'd rather have 1680x1050 at 48fps...than 1920x1080 at 30fps...
RudeCurve is offline   Reply With Quote
Old 30-Apr-2012, 03:22   #18
BadTB25
Senior Member
 
Join Date: Aug 2007
Location: Florida
Posts: 1,301
Default

I played the demo and liked it. I will hit the purchase button tonight when I get home.

Good job and thanks for the post mortem/advertisement.
BadTB25 is offline   Reply With Quote
Old 30-Apr-2012, 22:28   #19
dlm
Member
 
Join Date: Oct 2006
Posts: 349
Default

Bought this, played it a lot, really enjoy it. Although wow does it have the steepest difficulty curve for achievements!

Must play more...

Edit: Please make autofire faster. The fact that you can break the game with a turbocontroller and manual fire is a bit silly.

Last edited by dlm; 30-Apr-2012 at 23:02.
dlm is offline   Reply With Quote
Old 30-Apr-2012, 22:52   #20
BadTB25
Senior Member
 
Join Date: Aug 2007
Location: Florida
Posts: 1,301
Default

Bought it last night and was surprised that the story played different than the demo. It seems that the demo was a snippet of the full game, but with different stages not in the same order.

Got to Chapter 2 before signing off for the night. Will play more tonight.
BadTB25 is offline   Reply With Quote
Old 30-Apr-2012, 23:51   #21
Gitaroo
Senior Member
 
Join Date: Nov 2007
Posts: 1,699
Default

Please patch the pipe section in the factory man, I have 5 ppl playing and gave up on the game after dying too many times.
Gitaroo is offline   Reply With Quote
Old 01-May-2012, 00:23   #22
RudeCurve
Senior Member
 
Join Date: Jun 2008
Posts: 2,809
Default

Played a little late last night and was blown away by the gorgeous graphics. Been awhile that a developer released a old school side scrolling shmup. Game plays great and some of the stages and bosses reminds me of Darius and In The Hunt. Were you guys inspired by those games?
__________________
I'd rather have 1680x1050 at 48fps...than 1920x1080 at 30fps...
RudeCurve is offline   Reply With Quote
Old 01-May-2012, 06:39   #23
Billy Idol
Senior Member
 
Join Date: Mar 2009
Location: Europe
Posts: 4,039
Default

Man, pipe section in factory is killer! Did not die once until this part...where i lost all my credits
Will get through it!!!!!
__________________
I bid farewell with a rebel yell...
Billy Idol is offline   Reply With Quote
Old 18-Jul-2012, 18:42   #24
Molecular
Registered
 
Join Date: Oct 2006
Location: Queens, New York
Posts: 8
Default

Finally finished the game this weekend, it was a nice blast. The last two bosses can be tough, but it was rewarding to get through the entire game. Again, the graphics are awesome and really puts the 360 to good use. I hope the Vita port will be a financial success for you.

I noticed that the 360 gets a lot of schmups, definitely more so than PS3. Right now on PS3 I have Super Stardust HD, Soldner X series (2 games actually) and today I am going to get Dyad, because it reminds me of Tempest 2000 on the Jaguar and Nitrous Oxide on PS1.
Molecular is offline   Reply With Quote
Old 06-Aug-2012, 20:28   #25
reptile
Junior Member
 
Join Date: Oct 2004
Posts: 52
Default

Thank you all for your feedback - greatly appreciated! Since the game has been announced for the other two platforms as well, i thought i add a few machine-specific details to this little technical monologue of mine.

PS3. Although the game was born on the ps3 originally, so many things were added and modified since the switch to the x360, that i really had to go back and polish up the cell version. Resolution/aa/af is the same as the x360 version, and there are some minor differences here and there, probably nothing anyone (except me ) would notice. The SPUs are busy frustum/backface culling per-triangle, using my own code, which is plain C, and not optimised by hand, but i deemed it "good enough" - it's never the bottleneck anyway. As a personal note, i really like the output of the ps3 more than the x360, and although there is some gamma ramp tweaking in the x360 version to undo the "smart" output curve, i still prefer the ps3 version.

Vita. Now this was a b****. And it's all my fault, i insisted on keeping the 60fps _and_ native resolution. Shaders had to be significantly simplified, as i just couldn't find a way to maintain detail and those above at the same time. The vita version has some simplified geometry as well (although not everything, only a few models here and there), and still, geometry processing bottlenecks forced me to use the CPU cores to do some additional culling. Bounding volumes are generated for each 32 tris in each model, used by an async culling job (on 2 cores) to generate new indexbuffers each frame. The game still has some slowdowns (worst case being 45fps) in certain sections, but i think it's not too bad, and the crisp native resolution was definitely worth it. edit: oh and if you happen to have red/cyan anaglyph glasses, there's a little extra for you in the options, keeping in tradition with the other versions

Last edited by reptile; 06-Aug-2012 at 20:40. Reason: additional info
reptile is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 21:13.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.