游戏屏幕外渲染黑屏

While I was capturing some game footage from Zelda II, I noticed a strange little glitch. I was in a tunnel while fighting an ax-wielding red Daira, and part of a slime flickered on the left of the screen. When I moved forward, I saw there was, in fact, a slim just off the screen.

当我从Zelda II捕获一些游戏画面时,我注意到一个奇怪的小故障。 我在和一个挥舞着斧头的红色Daira战斗时在一条隧道里,一部分粘液在屏幕左侧闪烁。 当我向前走时,我发现屏幕上确实有一个细长的屏幕。

Half of a red slime flickers on the left of the screen
屏幕左侧有一半的红色软泥闪烁

So, why did this happen?

那么,为什么会这样呢?

ñintendo的PPU (Nintendo’s PPU)

During my research on the Nintendo PPU, picture processing unit, I learned a lot about scanline rendering in addition to what made sprites wrap around the screen. This happened when a sprite’s X position went past 255. While most players would consider this a software bug, it was a significant limitation in the NES renderer that developers had to deal with.

在对Nintendo PPU ( 图片处理单元)进行研究的过程中 ,除了使Sprite环绕屏幕外,我还学到了很多有关扫描线渲染的知识。 当精灵的X位置超过255时,就会发生这种情况。尽管大多数玩家都认为这是软件错误,但这是开发人员必须处理的NES渲染器的重大限制。

If you think about it, the NES is an 8-bit system. That means the X and Y position of any sprite on the screen can only go from 0–255. Today, we would use an unsigned integer to represent this. When you try to add 1 to an 8-bit value set to 255, it loops around back to 0. With the NES having a screen resolution of 256 x 240, that meant there was technically no place to hide sprites horizontally offscreen.

如果您考虑一下,NES是一个8位系统。 这意味着屏幕上任何子画面的XY位置只能在0-255之间。 今天,我们将使用无符号整数表示这一点。 当您尝试将1设置为设置为255的8位值时,它会循环回到0。由于NES的屏幕分辨率为256 x 240,因此从技术上讲,没有地方可以在屏幕外水平隐藏子画面。

For most of the games created on the NES, this was not ideal. With nowhere to place sprites off the screen, it presented a challenge to move them into view when scrolling. To get around this, developers took advantage of the CRT’s overscan. This was a boundary along the edge of the screen where pixels were stilled rendered but technically not visible on most TVs of the time.

对于在NES上创建的大多数游戏而言,这并不理想。 由于无法在屏幕上放置精灵,因此在滚动时将它们移到视图中是一个挑战。 为了解决这个问题,开发人员利用了CRT的过扫描功能。 这是沿屏幕边缘的边界,在该边界上像素仍被渲染,但在当时大多数电视上在技术上都不可见。

渲染场景 (Rendering A Scene)

Let’s take a look at an example of how this worked in a bit more detail. The NES could only display 32 columns and 30 rows of tiles on the screen at a given time.

让我们来看一个更详细的示例。 NES在给定时间只能在屏幕上显示32列和30行的图块。

Graphics from the Space Ranger PV8 Art Pack — Created by Luis Zuno
太空游侠PV8艺术包中的图形-路易斯·祖诺(Luis Zuno)创建

Well, most NES developers knew that the last column of the screen was not visible on CRTs. There was a similar gutter on the bottom of the screen, but since the last visible scanline happens at 240, it wasn’t as much of an issue. The NES could skip rendering the last column and blank it out in order to create a gutter for anything offscreen.

好吧,大多数NES开发人员都知道,屏幕的最后一列在CRT上不可见。 屏幕底部有一个类似的装订线,但是由于最后一条可见的扫描线发生在240,所以这并不是什么大问题。 NES可以跳过渲染最后一列并使其空白以创建屏幕外所有内容的装订线。

The overscan area is masked off in black on the right and bottom of the screenshot
屏幕截图的右侧和底部以黑色遮盖了过扫描区域

A lot of games took advantage of this area players couldn’t see. Unfortunately, when you play older NES games in emulators or on modern TVs, you see this area, and it’s a bit jarring.

许多游戏都利用了玩家无法看到的这一优势。 不幸的是,当您在模拟器或现代电视上播放较早的NES游戏时,您会看到此区域,这有点令人不快。

子画面包装 (Understing Sprite Wrapping)

But let’s go back to the issue I captured in Zelda II. While it’s similar to what I outlined above, there is a bit more going on here.

但是,让我们回到我在《塞尔达传说II》中捕捉到的问题。 尽管它与我上面概述的相似,但这里还有更多事情要做。

When I kill the Daira, the slime is moving away from the player but accidentally wraps around
当我杀死Daira时,粘液从玩家身上移开,但不小心缠绕

In the above still, you can see half of the slime on the left side of the screen. Technically we expect the off-screen sprite to be hidden in the overscan area. I guess that since the sprite’s movement is still being calculated, even when it’s not visible, I happened just to capture it when it was about to come onto the screen, and its X position was precisely at 256. This would turn into 0 and momentarily wrap around the screen and accidentally render on the left side of the screen.

在上面的静止图像中,您可以在屏幕左侧看到一半的粘液。 从技术上讲,我们希望将屏幕外的精灵隐藏在过扫描区域中。 我猜想,由于精灵的移动仍在计算中,即使它不可见,我也碰巧只是捕获了它,即将它移到屏幕上时,它的X位置恰好在256。这将变成0,并暂时环绕屏幕并意外地在屏幕左侧渲染。

Most of the sprites in Zelda II are 16 pixels wide, equal to 2 sprites across. This just happened to be a rare edge-case where the overscan gutter only being 8 pixels wide wasn’t enough to hide the sprite. I love these little glitches. They add to the unique characteristics that make the NES so unique. All due to some hard limitations that developers learned to work around or ignore. Today that would be considered a more serious rendering bug.

Zelda II中的大多数精灵都是16像素宽,等于2个精灵。 这只是一种罕见的边缘情况,其中仅8像素宽的过扫描装订线不足以隐藏子画面。 我喜欢这些小故障。 它们增加了使NES如此独特的独特特征。 归因于开发人员学会解决或忽略的一些严格限制。 今天,这将被视为更严重的渲染错误。

代码示例 (Code Example)

Learning how to hide sprites in the overscan gutter is a critical technique for making more authentic looking 8-bit games. That’s why when I designed Pixel Vision 8, my Fantasy Game Console, I added support masking off the right and bottom of the screen. You can do this in the Chip Editor Tool by setting the number of columns and rows to be included in the overscan area.

学习如何在过扫描沟中隐藏子画面是制作更真实外观的8位游戏的关键技术。 这就是为什么当我设计我的Fantasy Game Console Pixel Vision 8时 ,在屏幕的右侧和底部添加了遮罩的支持。 您可以在Chip Editor Tool中通过设置要包含在过扫描区域中的列数和行数来执行此操作。

If you are interested in learning a bit more about how this works in PV8, or in general, I wrote a little Lua code example to help visuals the overscan.

如果您有兴趣了解更多有关它在PV8中的工作方式的信息,或者总的来说,我写了一个Lua代码示例来帮助可视化过扫描。

When you run this code in PV8, it will output the following:

在PV8中运行此代码时,它将输出以下内容:

The visible resolution of 256x240 is 248x232 taking into account the overscan
考虑到过扫描,256x240的可见分辨率为248x232

If you are new to game development or looking to make a more authentic looking 8-bit game, try to emulate some of their more interesting quarks from these systems. The NES had so many based on the hardware limitations that they helped define the look and feel of the console and still inspire game developers today.

如果您不熟悉游戏开发,或者想制作出更真实的外观8位游戏,请尝试从这些系统中模拟一些更有趣的夸克。 NES有很多基于硬件的限制,以至于它们有助于定义游戏机的外观和感觉,并仍然启发着当今的游戏开发者。

翻译自: https://medium.com/pixelvision8/a-look-at-the-nintendos-off-screen-sprite-rendering-glitches-b9086069cad3

游戏屏幕外渲染黑屏


http://www.taodudu.cc/news/show-5768833.html

相关文章:

  • 《塞尔达:时之笛》感想:空筐的艺术
  • 在线迷宫生成器 python_在Python/Pygame中创建迷宫,但不确定如何创建墙
  • 不可思议有氧机器人_不思议迷宫蒸汽之都7个机器人怎么获得 7个隐藏机器人获得方法攻略...
  • excel函数简单计算试题(案例)count sum rank
  • excel函数计算第几周的方法
  • 计算机上怎么用函数算比例,如何使用Excel函数计算所占的比例
  • 20000元!魅族史上最贵的手机:无开孔+无按键,为什么会怀才不遇
  • 有什么适合学生党使用的无线蓝牙耳机?四款学生党无线耳机
  • 无线充电19年准备起飞,是什么让其受到了市场追捧?
  • 真无线耳机什么牌子好?无线入耳式耳机音质排行榜!
  • 魅族zero手机
  • android 耳机数据线,如果买安卓手机不送充电器和耳机?你还买不买
  • 氮化镓充电器哪家做得好_【一点资讯】主流品牌已多达近10款: 氮化镓充电器怎么选? www.yidianzixun.com...
  • 氮化镓充电器哪家做得好_主流品牌已多达近10款:氮化镓充电器怎么选?
  • 01项目需求分析
  • vs安卓开发发布_【详细解析】手机系统两年就停更?其实安卓厂商也有苦衷......
  • 【Django】开发日报_12_Day:手机号码管理系统-实现订单功能
  • 【2.3.3被拒】苹果iOS上架没有真机提供ps制作屏幕截图
  • 如何让你的APP变小及手机各屏幕尺寸
  • ssm+ajax实现新增和修改(layerui后台系统模板)
  • 【2.3.3被拒】苹果iOS上架屏幕截图尺寸ps制作教程
  • ios 隐藏app的插件,iOS9如不越狱 彻底隐藏预制iOS App
  • ios 隐藏app的插件_iOS 10系统可能可以隐藏APP了,iPhone 桌面变得更加整洁
  • ios隐藏功能-APP因第三方支付被拒
  • 苹果隐藏app_iOS14资源库功能被网友集体吐槽:隐藏的App都被看到了
  • iOS 10隐藏APP图标 – 让隐私的APP从桌面上消失
  • ios显示wifi无网络连接到服务器,iOS APP没有联网权限解决办法
  • iOS APP上架各种被拒问题补充
  • iOS APP功能测试(个人总结完整版)
  • iOS app 瘦身

游戏屏幕外渲染黑屏_看Nintendos在屏幕外的精灵渲染故障相关推荐

  1. 切换器黑屏_机房的KVM切换器是什么,故障如何解决?

    在服务器机房的机架不便于存放多个显示器和键盘的空间里,KVM切换器起着重要的作用.KVM切换器能从本地或远程监视与控制多个计算机与服务器,由键盘.鼠标和显示屏组成的KVM控制台是最方便和经济的理想解决 ...

  2. mac obs 录屏黑屏_差点被录屏软件搞死.......

    文/逍遥子 部门领导要求把写的PPT讲解下并录屏,这对我来讲真的是 So easy,因为我MAC 里有两个很知名的录屏软件,之前用过,效果很好,画质清晰,声音还原也很好.公司要求下午6点前把视频发过去 ...

  3. android游戏黑屏,第五人格游戏进不去黑屏解决办法

    小编今天给各位玩家朋友们带来的是第五人格游戏进不去黑屏解决办法,很多的玩家朋友们在第五人格更新后都出现了黑屏.游戏无法进入等情况,这应该怎么办呢?小编把解决方法给大家整理在了下方,感兴趣的小伙伴们快来 ...

  4. 电脑更新重启后黑屏_手机黑屏了,重启后万事大吉?那可就错了!

    每当玩着手机,听着歌, 手机就突然黑屏了! 黑色的屏幕映着你错愕的脸 那是一种不能言说的痛~ 很多咚友面对黑屏 习惯重启之后就不予理睬, 但是这样对手机真的好吗? 导致黑屏的原因有很多, 今天小叮咚就 ...

  5. 第五人格服务器维护中怎么进游戏,第五人格游戏进不去黑屏怎么解决 第五人格游戏进不去黑屏解决攻略...

    <第五人格>是由网易推出的首款3D视角恐怖冒险解谜手游,采用了非对称对抗竞技玩法模式,不断探索,根据剧情任务来获得线索,剥开重重迷雾... 类型:动作冒险 大小:633.90M 语言:简体 ...

  6. 华为计算机黑屏怎么办,华为电脑开机屏幕没反应(开机黑屏的3个原因及解决法)...

    很多朋友在使用电脑时,突然发现电脑开机后黑屏无显示,机箱能够听到风扇转动的声音,但显示器无任何反应,因为自己缺乏对电脑知识的了解,不知道该怎么处理,本期文章就教教大家"解决电脑开机黑屏&qu ...

  7. vmospro启动黑屏_在Mac上从睡眠唤醒中修复黑屏 | MOS86

    有时候,当Mac用户从睡眠状态唤醒Mac时,Mac用户可能会遇到黑屏.如果你遇到这个问题,这个问题是很明显的当您尝试从睡眠中唤醒Mac或打开MacBook盖子时,屏幕保持黑色,尽管计算机显然清醒,键盘 ...

  8. 显示器连接服务器能看见鼠标却黑屏,电脑黑屏可以看到鼠标箭头怎么回事 电脑黑屏只看得到鼠标箭头的解决方法...

    使用电脑的时间久了,或多或少都有遇到过一些电脑故障问题,较为常见的故障就是电脑蓝屏.黑屏了,今天小编为大家带来的便是关于电脑黑屏的问题解答,最近有很多网友在开启电脑后一直是黑屏状态,只可以看到鼠标箭头 ...

  9. 7能进安全模式但正常启动黑屏_电脑进入系统后黑屏怎么解决

    电脑的普及也要归功于互联网技术的高速发展,正是因为如此,才会有更多的人使用电脑.如今虚拟环境对我们的影响已经大大的增加了.有用户也会遇到开机过了欢迎画面后,快要进入桌面却黑屏了,只有鼠标可以移动,这是 ...

最新文章

  1. Java 2实用教程(第五版)耿祥义 全部课后习题答案
  2. 在QT搭建的播放器外壳中嵌入SDL的窗口
  3. springboot整合liquibase入门实例
  4. 如何配置Spring的XML文件及使用
  5. 网站设计常用技巧收集
  6. 链路追踪在ERP系统中的应用实践
  7. opensource项目_Best of Opensource.com 2017:排名前27的文章和资源
  8. 细说 | 失效的private修饰符
  9. 下面是html5中新增的结构元素的是,HTML5的新的结构元素介绍
  10. Spring高级之注解@ComponentScan详解(超详细)
  11. 2020年6月“省时查报告”十大热门报告盘点(附下载链接)
  12. SourceInsight初学使用笔记
  13. mysql系统变量_MySQL系统变量
  14. 论Web控件开发 - 完美上传下载控件“新”(一)
  15. DP:最大公共子序列
  16. 【C语言】02-第一个C程序
  17. 全能地图下载器最终破解版及安装教程【最终破解版、完美注册、最全教程、支持win10】
  18. 软件可靠性课程复习要点
  19. Udacity Self-Driving数据集介绍
  20. 同济大学计算机考试模拟大一上,同济大学大学计算机access作业答案.docx

热门文章

  1. python中threading模块_python中threading模块详解
  2. 笔记整理1----Java语言基础(一)01 变量与数据类型+02 运算符与表达式+03 条件判断与循环语句+04 JAVA数组+05 函数与方法
  3. win10自带抓包工具_win10是否有抓包工具
  4. linux pmap 进程信息,Linux pmap命令
  5. 佳能eosr5和r6区别 佳能eosr5和r6价格
  6. 两个瓶子水怎样一样多_两个瓶子水怎样一样多_洋葱用处多,拿来养花能杀虫,自己在家也能种...
  7. 双目视觉标定原理详解(张氏标定)
  8. Python告诉你,究竟都是哪些人在听《惊雷》!
  9. Linux网络环境的配置?
  10. 【分享】快递100入驻集简云平台,实现无代码集成数百款应用