Some updates on Rika

Rika's engine code:

~/link/rika/rika-engine % n stat

http://cloc.sourceforge.net v 1.08  T=0.5 s (86.0 files/s, 7802.0 lines/s)
----------------------------------------------------------------------------
Language       files     blank   comment      code    scale   3rd gen. equiv
----------------------------------------------------------------------------
Haskell           43       949       176      2776 x   2.11 =        5857.36
----------------------------------------------------------------------------
SUM:              43       949       176      2776 x   2.11 =        5857.36
----------------------------------------------------------------------------

Rika including most patched libraries (mostly GL):

~/link/rika % n stat

http://cloc.sourceforge.net v 1.08  T=2.0 s (220.0 files/s, 26622.5 lines/s)
----------------------------------------------------------------------------
Language       files     blank   comment      code    scale   3rd gen. equiv
----------------------------------------------------------------------------
Haskell          440      9040      9762     34443 x   2.11 =       72674.73
----------------------------------------------------------------------------
SUM:             440      9040      9762     34443 x   2.11 =       72674.73
----------------------------------------------------------------------------

Experimental game as a development test case:

~/link/__test_game__ % n stat

http://cloc.sourceforge.net v 1.08  T=0.5 s (42.0 files/s, 2818.0 lines/s)
----------------------------------------------------------------------------
Language       files     blank   comment      code    scale   3rd gen. equiv
----------------------------------------------------------------------------
Haskell           21       373        14      1022 x   2.11 =        2156.42
----------------------------------------------------------------------------
SUM:              21       373        14      1022 x   2.11 =        2156.42
----------------------------------------------------------------------------
Miku2

deferred shading + per pixel - diffuse and specular lighting

still buggy :)

miku

miku

No GUI?

I really have no idea what I'm doing now:

I'm rewriting the music-pad game using the rika engine without a gui, everything runs inside GHCi... odd.

Did some experimental live coding:

*Main MPS.Env MPS MusicPad.Type.Music> g <- m
main start:
calling scene before hook
*Main MPS.Env MPS MusicPad.Type.Music> [0, 3.. 15] .mapM_ (t g 3)
*Main MPS.Env MPS MusicPad.Type.Music> [0, 3.. 15] .mapM_ (t g 5)
*Main MPS.Env MPS MusicPad.Type.Music> [1, 5.. 15] .mapM_ (t g 7)
*Main MPS.Env MPS MusicPad.Type.Music> [1, 5.. 15] .mapM_ (t g 7)
*Main MPS.Env MPS MusicPad.Type.Music> [3, 4.. 8] .mapM_ (t g 1)
*Main MPS.Env MPS MusicPad.Type.Music> [3, 4.. 8] .mapM_ (t g 4)
*Main MPS.Env MPS MusicPad.Type.Music> ><

<interactive>:1:0: parse error on input `><'
*Main MPS.Env MPS MusicPad.Type.Music> p g
*Main MPS.Env MPS MusicPad.Type.Music> s g
*Main MPS.Env MPS MusicPad.Type.Music> q g
*Main MPS.Env MPS MusicPad.Type.Music> exiting script thread ..
calling scene after hook

It does make sound for the record ...

Another Blender Model

今天调了好长时间的光线,还是有错误,郁闷。

有点想放弃 rika 引擎了,开始查 Unity,翻 ZBrush。无意间碰到这个 miku blender model 就导进来看看,居然一次就通过了,相机和模型都正确渲染,有点出乎意料。

想了想,决定还是继续弄吧,不过进度确实太慢了。

miku

miku

Deferred shading

My stupid deferred shading algorithm seems to come together piece by piece, need to fix some non trivial bugs in the math lib to get it to work.

I really like the idea of deferred shading, it's an example of wholesale / data driven algorithm. Just love it.

1.png

1.png