简体   繁体   English

JRebel在游戏开发中的表现(性能)

[英]JRebel in game development (performance)

I'm programming a game in plain Java (no external libraries). 我正在用普通Java(没有外部库)编写游戏。 Running the project with JRebel enabled slows the performance down and frame rate goes below 1 fps. 在启用JRebel的情况下运行项目会降低性能,并且帧速率会低于1 fps。

Is there any way to use JRebel for game development? 有什么方法可以使用JRebel进行游戏开发吗? Can I for example "run" JRebel manually after I've done some changes to the code, so that it wouldn't slow down the game, but I would still see the changes without restarting the application? 例如,在对代码进行一些更改后,是否可以手动“运行” JRebel,以免减慢游戏速度,但是在不重新启动应用程序的情况下仍然可以看到更改?

I'm using Eclipse and Java 1.6, latest JRebel. 我正在使用Eclipse和Java 1.6,最新的JRebel。 I have no prior experience with JRevel, so any help is welcome. 我没有使用JRevel的经验,因此欢迎您提供任何帮助。 Thanks. 谢谢。

This doesn't seem like a good fit for JRebel. 这似乎不适合JRebel。 The intent is that when you're running an application that takes a long time to redeploy, like a complex WAR, you can reload classes on the fly. 目的是,当您运行需要长时间重新部署的应用程序时(例如复杂的WAR),您可以即时重新加载类。 How long does it take to restart your game? 重新启动游戏需要多长时间?

Web applications are very rarely doing work when a request is not happening, so you can develop, reload, test, develop...etc. 当没有发生请求时,Web应用程序很少工作,因此您可以开发,重新加载,测试,开发...等。 Your game is likely performing work even as you code, so JRebel is likely struggling to keep reloading classes as you type, since every frame your code needs a new class definition. 即使您编写代码,您的游戏也可能正在执行工作,因此JRebel可能会在键入时不断努力重新加载类,因为代码的每一帧都需要一个新的类定义。 That's my guess. 那是我的猜测。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM