|
|
发表于 2014-7-12 15:37:44
|
显示全部楼层
本帖最后由 drzzm32 于 2014-7-12 15:45 编辑
然后我试了下自己的游戏(VB .NET & OpenGL)右上是Fps。
5000弹幕弹型1:
5000弹幕弹型2:
10000弹幕弹型2:
然后资源占用:
明显帧率降下来了,况且我这是VB,VB哦~
但是内存占用没那么大。。。
我的判定算法:
估计多亏这个预判定:
- Shared Function BulletPreJudge(PlayerX As Single, PlayerY As Single, BulletX As Single, BulletY As Single, SetDistance As Single) As Boolean
- If Math.Abs(PlayerX - BulletX) < SetDistance And Math.Abs(PlayerY - BulletY) < SetDistance Then
- Return True
- Else
- Return False
- End If
- End Function
复制代码 判定:
- Shared Function BulletJudge(PlayerX As Single, PlayerY As Single, BulletX As Single, BulletY As Single, SetMinDistance As Single, _
- SetMaxDistance As Single) As Integer
- If WDJ_E.Base.MathGroup.Distance2D(PlayerX, PlayerY, BulletX, BulletY) > SetMaxDistance Then
- Return JUDGE_AWAY
- Exit Function
- ElseIf WDJ_E.Base.MathGroup.Distance2D(PlayerX, PlayerY, BulletX, BulletY) > SetMinDistance Then
- Return JUDGE_GRAZE
- Else
- Return JUDGE_MISS
- End If
- End Function
复制代码
@lrdcq 你发个截图看看? 这个VB也是解释执行啊,不是什么C#,C++的
|
|