V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
lakechan96
V2EX  ›  分享创造

OhMyDanmaku 桌面实时弹幕系统 源代码开放

  •  
  •   lakechan96 · 2015-07-25 23:24:53 +08:00 · 4764 次点击
    这是一个创建于 3198 天前的主题,其中的信息可能已经有所发展或是发生改变。
    基于.NET WPF
    UDP Socket通信
    更多细节都在简单又明了的readme里啦,欢迎查阅w

    地址:http://github.com/LakeChan/OhMyDanmaku

    欢迎issue和pullRequest

    并没有什么技术含量的作品OAO
    16 条回复    2015-09-20 16:24:24 +08:00
    RIcter
        1
    RIcter  
       2015-07-26 00:46:31 +08:00
    oh,膜拜石头大神_(:3」∠)_
    66666
    pandada8
        2
    pandada8  
       2015-07-26 00:48:11 +08:00
    oh,膜拜石头大神和Ricter菊苣_(:3」∠)_
    66666
    yaqink
        3
    yaqink  
       2015-07-26 01:28:47 +08:00 via iPad
    oh,膜拜 石头大神 和 Ricter 菊苣 和 pandada _(:3」∠)_
    66666
    msg7086
        4
    msg7086  
       2015-07-26 01:40:05 +08:00
    oh,膜拜楼上各路大神菊苣_(:з」∠)_
    prprp
    kawaiiushio
        5
    kawaiiushio  
       2015-07-26 04:09:09 +08:00 via iPhone
    oh,膜拜石头大神和Ricter菊苣_(:3」∠)_
    66666
    KexyBiscuit
        6
    KexyBiscuit  
       2015-07-26 04:44:22 +08:00 via Android
    oh,膜拜石头大神、Ricter 菊苣、pandada 大触、yaqink 和 msg7086 _(:3」∠)_

    prprpr
    pimin
        7
    pimin  
       2015-07-26 06:19:58 +08:00
    我就想知道这个东西单纯幻想出来的,还是真的放在上面地方用过
    Epsil0n9
        8
    Epsil0n9  
       2015-07-26 08:28:26 +08:00
    oh,膜拜石头大神、Ricter 菊苣、pandada 大触、yaqink 、 msg7086 和 KexyBiscuit 师傅 _(:3」∠)_


    prprp
    zsx
        9
    zsx  
       2015-07-26 10:10:16 +08:00
    orz一下楼上诸位(虽然都不认识)_(:з」∠)_

    https://github.com/zsxsoft/danmu-client
    https://github.com/zsxsoft/danmu-server

    然后默默拿出了自己基于Nodejs + Nwjs的弹幕客户端 + 服务端实现_(:з」∠)_
    molinxx
        10
    molinxx  
       2015-07-26 10:52:14 +08:00 via iPhone
    oh,膜拜上路各种被prpr的各种大神菊苣大触师傅!

    prprprpr
    lakechan96
        11
    lakechan96  
    OP
       2015-07-26 23:52:24 +08:00
    @zsx 感觉自己的这个效率还是不够好,请教一下您这个大概的弹幕渲染思路和资源管理方面大致是怎么样的?
    zsx
        12
    zsx  
       2015-07-27 08:56:09 +08:00
    @lakechan96
    ```javascript
    DD.CommentFrame.prototype.render = function() {
    this.ctx.clearRect(0, 0, this.width, this.height); //清空结果画布
    var bufCanvasCtx = this.bufCanvas.getContext("2d");
    bufCanvasCtx.clearRect(0, 0, this.width, this.height); //清空buffer画布
    //渲染各层精灵到buffer画布上
    for (var i = 0; i < this.layers.length; i++) {
    for (var j = 0; j < this.layers[i].length; j++) {
    this.layers[i][j].draw(bufCanvasCtx);
    }
    }
    //往主图层上绘制buffer图层
    this.ctx.drawImage(this.bufCanvas, 0, 0);
    };
    ```
    ```javascript
    (function animate() {
    that.updateSprite(); //更新Sprite
    that.clearSprite(); //清除无效Sprite
    that.render();
    that.fps = that.countFps(); // 计算FPS
    that.renderTimer = window.requestAnimationFrame(animate, that);
    //console.log(that.renderTimer);
    })();
    ```
    zsx
        13
    zsx  
       2015-07-27 08:59:16 +08:00
    @lakechan96 不过这块弹幕部分不是我写的_(:з」∠)_ 源自另外一个开源项目,对其进行了改造而已……
    lakechan96
        14
    lakechan96  
    OP
       2015-07-27 17:21:27 +08:00
    感谢w
    grzhan
        15
    grzhan  
       2015-08-12 20:39:43 +08:00
    已star √
    mikangchan
        16
    mikangchan  
       2015-09-20 16:24:24 +08:00
    orz 膜拜楼上菊苣
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1867 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 16:36 · PVG 00:36 · LAX 09:36 · JFK 12:36
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.