HTML5游戏到本机应用程序 [英] HTML5 game to native app

查看:99
本文介绍了HTML5游戏到本机应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用HTML5制作游戏。我最熟悉HTML5,而不是更喜欢高级语言,比如C ++。 HTML5是一个很好的写游戏平台。我唯一的问题是我想将我的游戏作为本机应用程序运行(你可以启动没有互联网浏览器功能,全屏等),但我不知道有什么用。我环顾四周,找到了MOBILE平台(如PhoneGap),但没有桌面(如Windows,Mac和Linux)。最终,尽我所能地搜索,我找到了TideSDK。 TideSDK类似于PhoneGap,但适用于计算机操作系统,并且可以在所有三种流行的(Windows,Mac和Linux)上运行。但是,TideSDK的游戏运行速度还不够快。它不支持window.requestAnimationFrame,因此为游戏循环执行setInterval使得它非常慢。这么慢,我会猜测它是2或3 FPS。我在Chrome上尝试了完全相同的游戏,它运行正常。

I am making a game in HTML5. I am most familiar with HTML5, and prefer it over a higher level language, such as C++. HTML5 is a great platform for writing games on. My only issue is that I want to run my game as a native application (that you can startup w/o internet browser features, is fullscreen, etc.), but I don't know what there is to use. I looked around and found stuff for MOBILE platforms (such as PhoneGap), but no desktops (such as Windows, Mac, and Linux). Eventually, searching around as hard as I could, I found TideSDK. TideSDK is similar to PhoneGap, but is for computer operating systems, and ran on all three popular ones (Windows, Mac, and Linux). HOWEVER, TideSDK doesn't really run fast enough for a game. It doesn't support window.requestAnimationFrame, and so doing a setInterval for a game loop made it very slow. So slow that I would take a guess it was going 2 or 3 FPS. I tried the exact same game on Chrome, and it runs fine.

我可以使用的替代方案对HTML5游戏来说足够快吗? (我不想通过XCode [和其他平台上的其他IDE]来制作Webkit框架,它不是真正的跨平台,而且非常耗时。如果我不得不这样做,我会这样做) b $ b对于我正在运行的系统,我使用的是Mac(OSX 10.8,Mountain Lion),但是我可以访问Windows 7,而Ubuntu 12.04是32位。

Is there an alternative I can use that will be fast enough for HTML5 games? (I don't want to go through XCode [and other IDE's on other platforms] to make a Webkit frame, it isn't really cross-platform, and is time consuming. I would do it if I had to, though) For my system I am running on, I use a Mac (OSX 10.8, Mountain Lion), but I have access to Windows 7, and Ubuntu 12.04 32-bit.

推荐答案

我会看看电子

http://electron.atom.io/

相当不错的文档,看起来可以完全满足您的需求。

Fairly good documentation and looks to do exactly what you are looking for.

性能方面,它在我尝试的应用程序中表现良好!

Performance wise it has held up well in the apps I have tried!

这篇关于HTML5游戏到本机应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆