F8 框架初衷:希望自己点击 F8,就能开始制作游戏,不想多余的事。
F8 Framework original intention: Just click F8 and start making the game, don't want to be redundant.
F8 Framework是一个优雅,轻量,符合直觉的基于Unity引擎的游戏框架,组件围绕F8一键启动,不用繁琐的启动配置,最低的心智负担,框架整体遵循以极少的使用成本开发游戏。
Unity 2021.3.15f1+
构建可支持:Win / Android / iOS / Mac / Linux / WebGL / 微信小游戏(构建文档)
- 1. 热更新版本管理(内置) - 选择打包平台,输出路径,版本号,远程资产加载地址,启用热更新,全量打包,分包,空包。
- 2. 高速本地缓存(内置) - 高速本地缓存,下载并缓存byte、json、text、Texture等可序列化资产,设置缓存数量、大小、存活时间,清理缓存。
- 3. 代码热更新(接入HybridCLR) - HybridCLR 是一个特性完整、零成本、高性能、低内存的近乎完美的Unity全平台原生c#热更方案。
- 1. 配置表(内置) - 使用Excel作为配置表,兼顾高性能、高适应性,点击F8加载手动生成的 Excel 二进制缓存,运行时自动读取最新 Excel,无需频繁导表。
- 2. 资源加载(内置) - 编辑器下:点击F8自动生成资产索引/AB名称,自动区分不同平台,清理多余AB和文件夹,Editor模式下减少开发周期。运行时:同步/异步加载单个资产,展开文件夹或同一AB下所有资产,自动判断是 Resources / AssetBundle 资产,加载Remote远程资产,获取加载进度,同步打断异步加载。你可以这样加载AssetBundle:单个资产单个AB、指定文件夹名称(文件夹第一层的AB)、设置多个资产为同一AB名(指定任意资产名)
- 3. 模块中心(内置) - 模块中心可以获取所有模块的实例,延迟加载策略,自由控制生命周期。
- 4. 日志管理(内置) - 打印日志,写入文件,上报错误。
- 5. 声音管理(内置) - 声音的播放/暂停/停止/进度控制,音量控制/保存,全局暂停/恢复。Audio分为三大类:背景音乐、人声、特效声。
- 6. 事件管理(内置) - 发送消息事件,事件监听,防止消息死循环,自动释放事件。
- 7. 时间管理(内置) - 提供Timer、FrameTimer两种计时器,暂停/恢复,自动释放Timer。
- 8. 补间动画(内置) - 播放/终止动画,有旋转/位移/缩放/渐变/填充动画,可根据UI的相对布局位移动画。
- 9. 引用池管理(内置) - 引用池管理,C# 对象,入池/取出/回收/清空。
- 10. 游戏对象池(内置) - 游戏对象池管理,GameObject 预加载池化,生成/销毁/延迟销毁,生命周期事件监听。
- 11. 本地化管理(内置) - 本地化 Text / TextMeshPro / Image / RawImage / SpriteRenderer / Renderer / Audio / Timeline 等组件,使用 Excel 作为多语言翻译表。
- 12. 有限状态机(内置) - 自定义有限状态机 FSMState / FSMSwitch,创建/切换状态/轮询/销毁。
- 13. 下载管理器(内置) - 支持localhost与http地址文件的下载,可本地写入、监听下载进度、断点续传,支持动态添加、移除、暂停、恢复下载。
- 14. UI界面管理(内置) - 处理界面加载、打开、关闭、查询、层级控制、自定义动画、自动获取组件索引。UI界面分为三大类:普通UI、模态弹窗、非模态弹窗。
- 15. 输入系统管理(内置) - 使用同一套代码,通过自定义输入设备,适配多平台,可热切换输入设备,或同时启用多套输入设备。
- 16. 游戏流程管理(内置) - 自定义流程节点 ProcedureNode,控制游戏流程的,添加/运行/轮询/移除。
- 17. 本地数据存储(内置) - 本地数据存储/读取。
- 18. SDK接入管理(内置) - 与原生平台交互,接入多个平台或者渠道SDK,登录/退出/切换/支付/视频广告/退出游戏/原生Toast。
- 19. 网络连接与通信(内置) - 使用 KCP / TCP / WebSocket 网络通讯协议建立长连接通道,支持Client端和Server端。
- Excel.dll:读/写 Excel(已修改缓存地址为Application.persistentDataPath)
- I18N.CJK.dll,I18N.dll,I18N.MidEast.dll,I18N.Other.dll,I18N.Rare.dll,I18N.West.dll:只为读/写 Excel
- ICSharpCode.SharpZipLib:压缩/解压缩
- Mirror(内置):KCP:Reliable UDP
- Mirror(内置):Telepathy:TCP
- Mirror(内置):Websockets:Websockets
- LitJson:序列化/反序列化 JSON(已修改字典Key可以使用int类型,增加Unity常用类型:Type,Vector2,Vector3,Vector4,Quaternion,GameObject,Transform,Color,Color32,Bounds,Rect,RectOffset,LayerMask,Vector2Int,Vector3Int,RangeInt,BoundsInt)
- MessagePack-CSharp:序列化/反序列化数据
安装git,使用git命令拉取:
git clone https://github.com/TippingGame/F8Framework.git
或者直接下载完整包,放入工程里。
在 Unity 包管理器中,使用 Git URL 添加 F8 核心包。
-
打开 Unity Editor
-
点击菜单的 Window 项,再点击 Package Manager 子项
-
点击左上角 + 号,选择 Add Package from git URL
-
输入 https://github.com/TippingGame/F8Framework.git,请确认导入成功
- 游戏启动器:游戏启动器示例。GameLauncher.cs
- 模块自定义改名:模块自定义改名。FF8.cs
- 视频教程:【Unity框架】开源 F8Framework 游戏框架介绍
- 游戏项目Demo:https://github.com/TippingGame/F8FrameworkDemo
- qq开发交流群:722647431
F8 Framework is an elegant, lightweight, and intuitive Game Framework based on the Unity engine. The components revolve around F8 one click startup, without the need for cumbersome startup configurations, with minimal mental burden. The overall framework follows the principle of developing games with minimal usage costs.
Unity 2021.3.15f1+
Support for building:Win / Android / iOS / Mac / Linux / WebGL / WeChat mini game(Building Documents)
- 1. Hot update version manager (built-in) - Select packaging platform, output path, version number, remote asset loading address, enable hot update, full packaging, subcontracting, and empty packaging.
- 2. High speed local cache (built-in) - High speed local caching, downloading and caching bytes Serializable assets such as JSON, text, and texture, set cache quantity, size, and lifetime, and clear cache.
- 3. Code Hot Update (Import HybridCLR) - HybridCLR HybridCLR is a full-platform native c# hot update solution for Unity with complete features, zero cost, high performance, and low memory.
- 1. Config table (built-in) - Using Excel as the configuration table, balancing high performance and adaptability, click F8 to load the manually generated Excel binary cache, and automatically read the latest Excel at runtime without the need for frequent table navigation.
- 2. Asset Manager (built-in) - At editor: Click F8 to automatically generate asset index/AB name, automatically distinguish different platforms, and clean up excess AB and folders, Reduce development cycle in Editor mode. At runtime: load a single asset synchronously/asynchronously, expand a folder or all assets under the same AB, automatically determine whether it is a Resources/AssetBundle asset, load remote assets, obtain loading progress, and synchronously interrupt asynchronous loading. You can load AssetBundle in this way: a single asset with a single AB, specify a folder name (AB on the first layer of the folder), set multiple assets to the same AB name (specify any asset name).
- 3. Module Center (built-in) - The module center can obtain instances of all modules, implement delayed loading strategies, and freely control the lifecycle.
- 4. Log Manager (built-in) - Print logs, write files, and report errors.
- 5. Sound Manager (built-in) - Play/pause/stop/progress control of sound, volume control/save, global pause/resume. Audio is divided into three categories: background music, vocals, and special effects sound.
- 6. Event Manager (built-in) - Send message events, monitor events, prevent message loops, and automatically release events.
- 7. Time Manager (built-in) - Provide Timer/FrameTimer has two types of timers, pause/resume, and automatically release the timer.
- 8. Tween Animation (built-in) - Play/Stop animations, including rotation/displacement/scaling/gradient/fill animations, which can be shifted based on the relative layout of the UI.
- 9. Reference Pool Manager (built-in) - Reference Pool Manager, C # object, pooling/retrieving/recycling/emptying.
- 10. GameObject Pool (built-in) - GameObject Pool Manager, GameObject preload pooling, generation/destruction/delayed destruction, lifecycle event monitoring.
- 11. Localization Manager (built-in) - Localize components such as Text/TextMeshPro/Image/RawImage/SpriteRenderer/Renderer/Audio/Timeline, and use Excel as a multilingual translation table.
- 12. Finite state machine (built-in) - Customize finite state machine FSMState/FSMSwitch, create/switch states/poll/destroy.
- 13. Download Manager (built-in) - Supports downloading of files from both local host and HTTP addresses, allowing for local writing, monitoring of download progress, and recovery of downloads. It also supports dynamic addition, removal, pause, and recovery of downloads.
- 14. UI interface manager (built-in) - Handle interface loading, opening, closing, querying, hierarchical control, custom animation, and automatic retrieval of component indexes. UI interfaces are divided into three categories: regular UI, modal pop ups, and non modal pop ups.
- 15. Input System Manager (built-in) - Using the same set of code, customize input devices, adapt to multiple platforms, hot switch input devices, or enable multiple sets of input devices simultaneously.
- 16. Game Procedure Manager (built-in) - Customize the process node ProcedureNode to control the game process, add/run/poll/remove.
- 17. Local data storage (built-in) - Local data storage/reading.
- 18. SDK Manager (built-in) - Interacting with native platforms, accessing multiple platform or channel SDKs, logging in/out/switching/payment/video advertising/exiting games/native Toast.
- 19. Network Manager (built-in) - Establish long connection channels using KCP/TCP/WebSocket network communication protocols, supporting both client and server ends.
- Excel.dll:Read/Write Excel (cache address has been changed to Application. persistentDataPath)
- I18N.CJK.dll,I18N.dll,I18N.MidEast.dll,I18N.Other.dll,I18N.Rare.dll,I18N.West.dll:Only for Read/Write Excel
- ICSharpCode.SharpZipLib:Compression/Decompression
- Mirror(built in):KCP:Reliable UDP
- Mirror(built in):Telepathy:TCP
- Mirror(built in):Websockets:Websockets
- LitJson:Serialize/Deserialize JSON (modified dictionary key can use int type, added Unity common types: Type,Vector2,Vector3,Vector4,Quaternion,GameObject,Transform,Color,Color32,Bounds,Rect,RectOffset,LayerMask,Vector2Int,Vector3Int,RangeInt,BoundsInt)
- MessagePack-CSharp:Serialize/Deserialize data
Install Git use git command to pull:
git clone https://github.com/TippingGame/F8Framework.git
Or download the complete package, Put it into the project。
In the Unity Package Manager, add the F8Framework package using Git URL.
-
Open Unity Editor
-
Click on the Window item in the menu, then click on the Package Manager sub item
-
Click on the + sign in the upper left corner and select Add Package from git URL
-
Input https://github.com/TippingGame/F8Framework.git, Please confirm successful import
- GameLauncher:Game Launcher Example.GameLauncher.cs
- Module renaming:Module customization renaming.FF8.cs