Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

savestate #11

Open
51843267 opened this issue Sep 12, 2023 · 7 comments
Open

savestate #11

51843267 opened this issue Sep 12, 2023 · 7 comments

Comments

@51843267
Copy link

能哥,如果存档必须保存到本地,该如何做呢

@nenge123
Copy link
Owner

不是,因为这个0.5.8是原未修改代码。所以你可以参考old里面的数据库操作。

原未修改代码可以通过全局函数或者配置函数处理

配置函数处理
搜索quickSaveState
设置方法再new EJS(,config)

全局函数搜索onsavestate

config.onsavestate = function (obj)
var {screenhot,state} = obj;

config.onloadstate = function (fn)
fn(statebuffer)

全局函数2 搜索 EJS_loadState(statebuffer)

@nenge123
Copy link
Owner

当你理解他的事件操作,还可以把存放储存去服务器(自己的服务器,放github不可能的)

但是不建議存儲即使存檔。因為文件很大的,1-7MB。
所以最好储存电子存档,32kb-128KB。但是电子存档只存在任天堂游戏

@51843267
Copy link
Author

能哥,谢谢你这么快的回复,你能加个qq或者微信吗

@nenge123
Copy link
Owner

加微信就算了,还让不让人打游戏了。弄个微信群,互助吧

@51843267
Copy link
Author

哈哈,好的能哥

@nenge123
Copy link
Owner

image

@51843267
Copy link
Author

谢谢能哥,我加了长颈鹿那个

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants