GithubHelp home page GithubHelp logo

ellanjiang / gameframework Goto Github PK

View Code? Open in Web Editor NEW
5.5K 5.5K 1.4K 6.61 MB

This is literally a game framework, based on Unity game engine. It encapsulates commonly used game modules during development, and, to a large degree, standardises the process, enhances the development speed and ensures the product quality.

Home Page: https://GameFramework.cn

License: MIT License

C# 100.00%
game-development game-frameworks game-modules unity unity3d

gameframework's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gameframework's Issues

加载某个资源就会导致整个游戏死机,无法进行任何操作(Android端)

这个问题是这样的,就是加载实体(ShowEntity)的操作,生成Android版本跑的,一加载某个实体就会卡住(无响应的状态)。
后来发现是加载某个资源的时候出问题的,加载这个资源的时候,就会卡住。
目前发现的是,加载这个资源的时候没有成功调用OnLoadAssetSuccess,但是也没有报错。

一加载这个资源就会导致整个游戏死机,无法进行任何操作。

这个问题在Editor和PC版里都是正常的,只有Android版本会出现这个问题。

能不能提供一个思路或方向给我,我现在有点迷失方向了。

框架版本:3.1.6
Unity3D版本:2018.3

希望增加 UDP, WebSocket, HTTPS 支持

建议 GameFramwork 支持一些必要的网络通讯协议:
UDP --> 提供 UDP 基础支持,游戏开发者通过派生自己实现 KCP.
WebSocekt --> 为支持 H5 游戏
HTTPS --> 用于 Passport

ProcedureChangeScene.OnUpdate 异常,很少触发

NullReferenceException: Object reference not set to an instance of an object.
at Game.ProcedureChangeScene.OnUpdate (GameFramework.Fsm.IFsm`1[T] procedureOwner, System.Single elapseSeconds, System.Single realElapseSeconds) [0x00000] in <00000000000000000000000000000000>:0
at GameFramework.Fsm.FsmManager.Update (System.Single elapseSeconds, System.Single realElapseSeconds) [0x00000] in <00000000000000000000000000000000>:0
at GameFramework.GameFrameworkEntry.Update (System.Single elapseSeconds, System.Single realElapseSeconds) [0x00000] in <00000000000000000000000000000000>:0

官方demo一启动就报错

为什么ab都处理好了启动时也会报错,崩溃停了,也是黑屏

2018-08-04 23:18:59.920362+0800 starforce[770:251825] [DYMTLInitPlatform] platform initialization successful
2018-08-04 23:19:00.150500+0800 starforce[770:251716] Built from '2018.2/release' branch, Version '2018.2.1f1 (1a9968d9f99c)', Build type 'Release', Scripting Backend 'il2cpp'
2018-08-04 23:19:00.168410+0800 starforce[770:251716] -> registered mono modules 0x10140abd0
-> applicationDidFinishLaunching()
2018-08-04 23:19:00.413372+0800 starforce[770:251716] Metal GPU Frame Capture Enabled
2018-08-04 23:19:00.414608+0800 starforce[770:251716] Metal API Validation Disabled
-> applicationDidBecomeActive()
GfxDevice: creating device client; threaded=1
Initializing Metal device caps: Apple A8 GPU
Initialize engine version: 2018.2.1f1 (1a9968d9f99c)
UnloadTime: 1.914000 ms
Game Framework Version: 3.1.4
UnityGameFramework.Runtime.BaseComponent:Awake()
 
(Filename: /Users/builduser/buildslave/unity/build/Runtime/Export/Debug.bindings.h Line: 43)

Game Version: 0.1.0 (0)
UnityGameFramework.Runtime.BaseComponent:Awake()
 
(Filename: /Users/builduser/buildslave/unity/build/Runtime/Export/Debug.bindings.h Line: 43)

Unity Version: 2018.2.1f1
UnityGameFramework.Runtime.BaseComponent:Awake()
 
(Filename: /Users/builduser/buildslave/unity/build/Runtime/Export/Debug.bindings.h Line: 43)

Init language settings complete, current language is 'ChineseSimplified'.
StarForce.ProcedureLaunch:InitLanguageSettings()
StarForce.ProcedureLaunch:OnEnter(IFsm`1)
UnityGameFramework.Runtime.<Start>c__Iterator0:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
 
(Filename: /Users/builduser/buildslave/unity/build/Runtime/Export/Debug.bindings.h Line: 43)

Init current variant complete.
StarForce.ProcedureLaunch:OnEnter(IFsm`1)
UnityGameFramework.Runtime.<Start>c__Iterator0:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
 
(Filename: /Users/builduser/buildslave/unity/build/Runtime/Export/Debug.bindings.h Line: 43)

Init quality settings complete.
StarForce.ProcedureLaunch:OnEnter(IFsm`1)
UnityGameFramework.Runtime.<Start>c__Iterator0:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
 
(Filename: /Users/builduser/buildslave/unity/build/Runtime/Export/Debug.bindings.h Line: 43)

Init sound settings complete.
StarForce.ProcedureLaunch:OnEnter(IFsm`1)
UnityGameFramework.Runtime.<Start>c__Iterator0:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
 
(Filename: /Users/builduser/buildslave/unity/build/Runtime/Export/Debug.bindings.h Line: 43)

2018-08-04 23:19:05.226842+0800 starforce[770:251857] You are using download over http. Currently Unity adds NSAllowsArbitraryLoads to Info.plist to simplify transition, but it will be removed soon. Please consider updating to https.
Latest game version is '0.1.0', local game version is '0.1.0'.
StarForce.ProcedureCheckVersion:OnWebRequestSuccess(Object, GameEventArgs)
GameFramework.EventPool`1:HandleEvent(Object, T)
GameFramework.EventPool`1:Update(Single, Single)
GameFramework.GameFrameworkEntry:Update(Single, Single)
 
(Filename: /Users/builduser/buildslave/unity/build/Runtime/Export/Debug.bindings.h Line: 43)

Init resources complete.
GameFramework.Resource.ResourceManager:OnIniterResourceInitComplete()
GameFramework.Resource.ResourceIniter:ParsePackageList(String, Byte[], String)
UnityGameFramework.Runtime.<LoadBytesCo>c__Iterator0:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
 
(Filename: /Users/builduser/buildslave/unity/build/Runtime/Export/Debug.bindings.h Line: 43)

(lldb) 

无法加载编码为ANSI的数据表文件

按照官网的教程:http://gameframework.cn/archives/235
数据表文件需要保存为ANSI编码,但实际上,当我的数据表文件里包含中文的时候(在注释行里),加载文件会失败(不报错,但是加载不出数据)。

最终是将文件转换为UTF-8才能读取成功,请问是为什么呢?

Game Framework版本:3.1.1
Unity3D版本:2017.3

AssetObject被lock可能导致bug

虽然没有用到lock,但在处理时发现这个地方可能导致bug,需Ellan确认。

AssetObject在OnUnspawn()的时候会将其依赖资源全Unspawn,如果在资源层次上把某个AssetObject Lock了,它不会被Release掉,但依赖资源可能会被Release掉。下次加载该资源时就可能出现问题。

解决方法是AssetObject在Lock时,将其依赖资源也lock掉。

好吧,其实你没有开放接口可以对某个资源进行lock,不过说不准谁会自己加一个这样的接口。所以这算一个不是bug的bug。

Unity 2017.2 Error CS0619

Using the Unity 2017.2 Test the GameFramework project, is say:

Assets/Scripts/Runtime/Debugger/DebuggerComponent.WebPlayerInformationWindow.cs(21,60): error CS0619: `UnityEngine.Application.isWebPlayer' is obsolete: `This property is deprecated and will be removed in a future version of Unity, Webplayer support has been removed since Unity 5.4'

Assets/Scripts/Runtime/Debugger/DebuggerComponent.WebPlayerInformationWindow.cs(23,59): error CS0619: `UnityEngine.Application.srcValue' is obsolete: `Application.srcValue is obsolete and has no effect. It will be removed in a subsequent Unity release.'

I add the #if #endif to simple fix it

namespace UnityGameFramework.Runtime
{
    public partial class DebuggerComponent
    {
        private sealed class WebPlayerInformationWindow : ScrollableDebuggerWindowBase
        {
            protected override void OnDrawScrollableWindow()
            {
                GUILayout.Label("<b>Web Player Information</b>");
                GUILayout.BeginVertical("box");
                {
                    DrawItem("Absolute URL:", Application.absoluteURL);
                    DrawItem("Streamed Bytes:", Application.streamedBytes.ToString());
#if UNITY_5_4
                    DrawItem("Is Web Player:", Application.isWebPlayer.ToString());
                    DrawItem("Source Value:", Application.srcValue);
#endif
#if UNITY_5_3 || UNITY_5_4
                    DrawItem("Web Security Enabled:", Application.webSecurityEnabled.ToString());
                    DrawItem("Web Security Host URL:", Application.webSecurityHostUrl.ToString());
#endif
                }
                GUILayout.EndVertical();
            }
        }
    }
}

事件派发与释放机制

事件的释放机制逻辑似乎有些问题(3.1.7)
从应用池里获一个事件var eventArg = ReferencePool.Acquire<TestEventArgs>() 然后抛出GameEntry.Event.Fire(this, eventArg ),这两行代码似乎必须得绑定执行——如果在TestEventArgs里定义了一个其他参数object TestParam,每次给参数TestParam赋不同值,将eventArg作为一个全局变量,每次抛出时就会异常。
也就是说Acquire出来的对象不能重复使用、作为全局变量,Fire后就Release了。不知道这算不算是合理还是就是这么设计的

UI界面回收问题

UIForm类的回收函数OnRecycle里将序列号设成0,是否应设成-1才对?
出现此问题是因为程序里有个地方短时间Close一个UI两次,第一次关闭后序列号置0后,第二次关闭时就会把程序第一个打开的UI(序列号为0,但并非真正我要关的ui)给关了。

这个地方看看呢

GameFramework/GameFramework/Base/TaskPool/TaskBase.cs
internal void Initialize(int serialId, string tag, int priority)
{
m_SerialId = serialId;
m_Priority = priority;
m_Done = false;
}
这个方法里m_Tag要赋值吗?

将导出的 .unitypackage 发布到 release 中

如题, 这样只需要在 GitHub 即可获取最新的轮子, 无需自行编译或直接使用源码
目前 (2020.12.30) 可以看到, 最新的 tag: 2020.11.03 并没有在 gameframework.cn 中发布
更新日志也可以相应地同步到 Release 中, 方便对不同的版本进行纵向的对比

异步加载优化

异步加载资源的优化怎么办??
现在我需要控制上百个entity 并且有声音 特效
要怎么搞???
现有的这一套框架 单个异步加载不耗时间
如果控制实体太多了 就算是就不会卡顿 声音和实体也对应不上了

不支持webgl?

报错
NotSupportedException: Platform 'WebGLPlayer' is not supported.
at Flower.ProcedureCheckVersion.GetPlatformPath () [0x00000] in <00000000000000000000000000000000>:0

浏览器:Microsoft Edge,版本 102.0.1245.41 (正式版本) (64 位)
1111

网络组件解包问题

版本 Game Framework 2019.11.26,unity2018.4.1
问题:包头解析后,得到包的大小和消息id,当给包头的 PackageLeng赋值后,包体解析函数没有被调用。反之,不给包大小赋值就正常调用 包体解析函数。

EntityLogic Loading Slow

When I create Entity A. Then i attach 4 or 5 EntityLogic to Entity A. The game loading is somehow slow. Can you give me some advice?

提个建议

建议一整套解决方案叫GameFramework,这部分叫GameFrameworkCore

         Game
    UnityGameFramework
Unity          GameFrameworkCore

UI弹框队列

如果一个弹框已经打开了,但其实后面会有打开弹框的需求,但必须得等这个界面关闭后再出现缓存的弹框。看目前框架里没有支持

加入表格编辑的拓展

会考虑加入在unity中对表格进行编辑的功能么, 创建表 编辑表结构和内容 对其他表的引用

Unity 2017.2 UnityEditor not show

in Unity 2017.2,UnityEditor must in the folder Assets/Editor/xxx
I am new unity user. so i not know it work in unity old version.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.