bimap到大的记忆

发布于 2025-01-19 15:24:09 字数 139 浏览 4 评论 0原文

我正在用java编写一个类似于《Among us》的游戏(目前该游戏的重要部分是玩家只能看到大地图的一部分),而我绘制地图的方式是使用大几倍的位图比屏幕更大,我移动了地图的位置,但是位图对于内存来说太大了,有人有办法帮助我解决这个问题吗? 或者加载地图的不同想法?

I am coding a game in java similar to Among us (A game where the important part, for now, is that players see only part of a big map) and the way I was drawing the map is with a bitmap that is several times larger than the screen, and I move the position of the map around, but the bitmap is too large for the memory, does anyone have an idea to help me fix this?
or a different idea for loading the map?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

东北女汉子 2025-01-26 15:24:09

Afaik,大多数地图UI(无论是使用真实地图还是游戏地图)都使用瓷砖系统,将地图分为瓷砖,根据需要加载和卸载。请参阅经典 view system compose ui

而且,如果您正在开发游戏,请查看您的游戏框架是否提供某种地图解决方案。

AFAIK, most map UIs (whether with real maps or game maps) use a tile system, where the map is divided into tiles that get loaded and unloaded as needed. See Peter Laurence's libraries for the classic View system and Compose UI.

And, if you are developing a game, see if your game framework offers some sort of map solution.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文