![Animated GIF of PICO-8 Animated GIF of PICO-8](https://i-blog.csdnimg.cn/blog_migrate/011f84663f340f4c27b852caa8ab8db3.png)
I love everything about PICO-8. It's a fantasy gaming console that wants you - and the kids in your life and everyone you know - to make games!
我喜欢PICO-8的所有内容。 这是一个幻想的游戏机,希望您-以及您生活中的孩子以及您认识的每个人-都能做游戏!
How cool is that?
多么酷啊?
You know the game Celeste? It's available on every platform, has one every award and is generally considered a modern-day classic. Well the first version was made on PICO-8 in 4 days as a hackathon project and you can play it here online. Here's the link when they launched in 4 years ago on the forums. They pushed the limits, as they call out "We used pretty much all our resources for this. 8186/8192 code, the entire spritemap, the entire map, and 63/64 sounds." How far could one go? Wolf3D even?
你知道游戏《塞莱斯特》吗? 它在每个平台上都可用,每个奖项都有一个奖项,通常被认为是现代经典。 那么第一个版本是作为hackathon项目在4天之内在PICO-8上制作的,您可以在这里在线播放。 这是他们4年前在论坛上启动时的链接。 他们突破了极限,因为他们喊道:“我们为此花费了几乎所有资源。8186/ 8192代码,整个spritemap,整个地图和63/64声音。” 一个人能走多远? Wolf3D甚至?
"A fantasy console is like a regular console, but without the inconvenience of actual hardware. PICO-8 has everything else that makes a console a console: machine specifications and display format, development tools, design culture, distribution platform, community and playership. It is similar to a retro game emulator, but for a machine that never existed. PICO-8's specifications and ecosystem are instead designed from scratch to produce something that has it's own identity and feels real. Instead of physical cartridges, programs made for PICO-8 are distributed on .png images that look like cartridges, complete with labels and a fixed 32k data capacity."
“幻想控制台就像常规控制台一样,但是没有实际硬件的麻烦。PICO-8拥有使控制台成为控制台的其他所有功能:机器规格和显示格式,开发工具,设计文化,发行平台,社区和参与者。它类似于一种复古的游戏模拟器,但是对于一台机器,从来没有存在过。PICO-8的规格和生态系统的,而不是从头开始生产的东西,有它自己的身份,并认为真正的设计,取而代之的物理墨盒,方案微微发8个分布在看起来像墨盒的.png图像上,带有标签和固定的32k数据容量。”
What a great start and great proof that you can make an amazing game in a small space. If you loved GameBoys and have fond memories of GBA and other small games, you'll love PICO-8.
这是一个伟大的开始,也证明了您可以在很小的空间内制作出出色的游戏。 如果您喜欢GameBoys并且对GBA和其他小型游戏有美好的回忆,那么您会喜欢PICO-8。
如何播放PICO-8弹药筒 (How to play PICO-8 cartridges)
If you just want to explore, you can go to https://www.lexaloffle.com and just play in your browser! PICO-8 is a "fantasy console" that doesn't exist physically (unless you build one, more on that later). If you want to develop cartridges and play locally, you can buy the whole system (any platform) for $14.99, which I have.
如果您只是想探索,可以访问https://www.lexaloffle.com并在浏览器中播放! PICO-8是一个“幻想控制台”,实际上并不存在(除非您再构建一个,以后再说)。 如果您想开发墨盒并在本地播放,则可以花14.99美元(我拥有)购买整个系统(任何平台) 。
If you have Windows and Chrome or New Edge you can just plug in your Xbox Controller with a micro-USB cable and visit https://www.lexaloffle.com/pico-8.php and start playing now! It's amazing - yes I know how it works but it's still amazing - to me to be able to play a game in a web browser using a game controller. I guess I'm easily impressed.
如果您使用的是Windows,Chrome和New Edge ,则只需使用微型USB电缆插入Xbox控制器,然后访问https://www.lexaloffle.com/pico-8.php并立即开始播放! 对于我来说,能够使用游戏控制器在Web浏览器中玩游戏真是太神奇了-是的,我知道它是如何工作的,但仍然很神奇。 我想我很容易被打动。
It wasn't very clear to me how to load and play any cartridge LOCALLY. For example, I can play Demon Castle here on the Forums but how do I play it locally and later, offline?
我还不太清楚如何在本地加载和播放任何盒带。 例如,我可以在论坛上播放“恶魔城堡”,但如何在本地以及以后离线播放?
The easy way is to run PICO-8 and hit ESC to get their command line. Then I type LOAD #cartid where #cartid is literally the id of the cartridge on the forums. In the case of Demon Castle it's #demon_castle-0 so I can just LOAD #demon_castle-0 followed by RUN.
简单的方法是运行PICO-8并按ESC以获取其命令行。 然后,我键入LOAD #cartid,其中#cartid实际上是论坛上墨盒的ID。 对于恶魔城堡,它是#demon_castle-0,所以我可以先加载#demon_castle-0,然后运行。
Alternatively - and this is just lovely - if I see the PNG pic of the cartridge on a web page, I can just save that PNG locally and save it in C:\Users\scott\AppData\Roaming\pico-8\carts then run it with LOAD demon_castle-0 (or I can include the full filename with extensions). THAT PNG ABOVE IS THE ACTUAL GAME AS WELL. What a clever thing - a true virtual cartridge.
或者-这很可爱-如果我在网页上看到墨盒的PNG图片,则可以将该PNG保存在本地,然后将其保存在C:\ Users \ scott \ AppData \ Roaming \ pico-8 \ carts中使用LOAD demon_castle-0运行它(或者我可以在扩展名中包含完整的文件名)。 上面的PNG也是实际的游戏。 多么聪明的事-真正的虚拟墨盒。
One of the many genius parts of the PICO-8 is that the "Cartridges" are actually PNG pictures of cartridges. Drink that in for a second. They save a screenshot of the game while the cart is running, then they hide the actual code in a steganographic process - they are hiding the code in two of the bits of the color channels! Since the cart pics are 160*205 there's enough room for 32k.
PICO-8的许多天才之处之一是“墨盒”实际上是墨盒的PNG图片。 喝一秒钟。 他们在购物车运行时保存了游戏的屏幕截图,然后在隐写过程中隐藏了实际代码-他们在颜色通道的两位中隐藏了代码! 由于购物车图片为160 * 205,因此有足够的空间容纳32k。
A p8 file is source code and a p8.png is the compiled cart!
一个p8文件是源代码,一个p8.png是已编译的购物车!
如何制作PICO-8游戏 (How to make PICO-8 games)
The PICO-8 software includes everything you need - consciously constrained - to make AND play games. You hit ESC to move between the game and the game designer. It includes a sprite and music editor as well.
PICO-8软件包含您在制作和玩游戏时需要的所有内容-有意识地加以限制。 您按ESC键可以在游戏和游戏设计师之间切换。 它还包括一个精灵和音乐编辑器。
From their site, the specifications are TIGHT on purpose because constraints are fun. When I write for the PalmPilot back in the 90s I had just 4k of heap and it was the most fun I've had in years.
在他们的网站上,规范很严格,因为约束很有趣。 当我在90年代为PalmPilot撰写文章时,我只有4k的堆,这是我多年来最开心的事情。
Display - 128x128 16 colours
显示-128x128 16色
Cartridge Size - 32k
墨盒尺寸-32k
Sound - 4 channel chip blerps
声音-4通道芯片震荡
Code - Lua
代码-Lua
Sprites - 256 8x8 sprites
精灵-256个8x8精灵
Map - 128x32 cels
地图-128x32摄氏度
"The harsh limitations of PICO-8 are carefully chosen to be fun to work with, to encourage small but expressive designs, and to give cartridges made with PICO-8 their own particular look and feel."
“精心选择了PICO-8的苛刻局限性,以使其有趣,以鼓励小型但富有表现力的设计,并使使用PICO-8制成的墨盒具有自己独特的外观和感觉。”
The code you will use is Lua. Here's some demo code of a Hello World that animates 11 sprites and includes two lines of text
您将使用的代码是Lua。 这是Hello World的一些演示代码,该动画可以动画11个精灵,包括两行文本
t = 0
music(0) -- play music from pattern 0
function _draw()
cls()
for i=1,11 do -- for each letter
for j=0,7 do -- for each rainbow trail part
t1 = t + i*4 - j*2 -- adjusted time
y = 45-j + cos(t1/50)*5 -- vertical position
pal(7, 14-j) -- remap colour from white
spr(16+i, 8+i*8, y) -- draw letter sprite
end
end
print("this is pico-8", 37, 70, 14)
print("nice to meet you", 34, 80, 12)
spr(1, 64-4, 90) -- draw heart sprite
t += 1
end
That's just a simple example, there's a huge forum with thousands of games and lots of folks happy to help you in this new world of game creation with the PICO-8. Here's a wonderful PICO-8 Cheat Sheet to print out with a list of functions and concepts. Maybe set it as your wallpaper while developing? There's a detailed User Manual and a 72 page PICO-8 Zine PDF which is really impressive!
那只是一个简单的例子,这里有一个巨大的论坛,上面有成千上万的游戏,很多人很高兴在PICO-8的全新游戏世界中为您提供帮助。 这是一份精美的PICO-8速查表,可打印出一系列功能和概念。 也许在开发时将其设置为墙纸? 这里有详细的用户手册和72页的PICO-8 Zine PDF,真是令人印象深刻!
And finally, be sure to bookmark this GitHub hosted amazing curated list of PICO-8 resources! https://github.com/pico-8/awesome-PICO-8
最后,请确保将这个GitHub托管的PICO-8资源精选列表添加书签! https://github.com/pico-8/awesome-PICO-8
![image image](https://i-blog.csdnimg.cn/blog_migrate/2cce6540118ceb4ecba4f135139161f1.png)
![image image](https://i-blog.csdnimg.cn/blog_migrate/391c42d77f041a8d41883ddac3444632.png)
在其他编辑器中编写PICO-8代码 (Writing PICO-8 Code in another Editor)
There is a 3 year old PICO-8 extension for Visual Studio Code that is a decent start, although it's created assuming a Mac, so if you are a Windows user, you will need to change the Keyboard Shortcuts to something like "Ctrl-Shift-Alt-R" to run cartridges. There's no debugger that I'm seeing. In an ideal world we'd use launch.json and have a registered PICO-8 type and that would make launching after changing code a lot clearer.
对于Visual Studio Code ,有3年的PICO-8扩展名是一个不错的开始,尽管它是在Mac上创建的,所以如果您是Windows用户,则需要将“快捷键”更改为“ Ctrl-Shift” -Alt-R”来运行墨盒。 我没有看到调试器。 在理想的情况下,我们将使用launch.json并注册一个PICO-8类型,这将使更改代码后的启动更加清晰。
There is a more recent "pico8vscodeditor" extension by Steve Robbins that includes snippets for loops and some snippets for the Pico-8 API. I recommend this newer fleshed out extension - kudos Steve! Be sure to include the full path to your PICO-8 executable, and note that the hotkey to run is a chord, starting with "Ctrl-8" then "R."
史蒂夫·罗宾斯( Steve Robbins)最近有一个“ pico8vscodeditor ”扩展,其中包括用于循环的代码段以及用于Pico-8 API的代码段。 我推荐这个较新的扩充功能-史蒂夫(Steve)! 确保包括您的PICO-8可执行文件的完整路径,并注意要运行的热键是和弦,从“ Ctrl-8”开始,然后是“ R”。
![Telling VS-Code about PICO-8 Telling VS-Code about PICO-8](https://i-blog.csdnimg.cn/blog_migrate/af42567f4219244dad4313ab44a832f9.png)
Editing code directly in the PICO-8 application is totally possible and you can truly develop an entire cart in there, but if you do, you're a better person than I. Here's a directory listing in VSCode on the left and PICO-8 on the right.
完全有可能在PICO-8应用程序中直接编辑代码,您可以在其中真正开发整个购物车,但是如果这样做,那么您比I会更好。这是VSCode左侧的目录列表和PICO-8在右边。
![Directories in PICO-8 Directories in PICO-8](https://i-blog.csdnimg.cn/blog_migrate/90bf4eecf34b0cb40af4a173594573e5.png)
And some code.
和一些代码。
![Editing Pico-8 code Editing Pico-8 code](https://i-blog.csdnimg.cn/blog_migrate/01eb4572e6c80933dcb6ab77682ff021.png)
You can export to HTML5 as well as binaries for Windows, Mac, and Linux. It's a full game maker! There are also other game systems out there like PicoLove that take PICO-8 in different directions and those are worth knowing about as well. There is a rich tiny game development community out there, and you'd do yourself a favor to explore sites like https://pigame.dev.
您可以导出到HTML5以及Windows,Mac和Linux的二进制文件。 这是一个完整的游戏制作者! 还有像PicoLove这样的其他游戏系统,它们将PICO-8带向不同的方向,这些系统也值得一读。 那里有一个丰富的小型游戏开发社区,您可能会自己去探索https://pigame.dev之类的网站。
物理PICO-8控制台怎么样 (What about a physical PICO-8 Console)
A number of folks have talked about the ultimate portable handheld PICO-8 device. I have done a lot of spelunking and as of this writing it doesn't exist.
许多人都在谈论最终的便携式手持式PICO-8设备。 我做了很多摸索,截至撰写本文时,它尚不存在。
You could get a Raspberry Pi Zero and put this Waveshare LCD hat on top. The screen is perfect. But the joystick and buttons...just aren't. There's also no sound by default. But $14 is a good start.
您可以得到Raspberry Pi Zero,并将此Waveshare LCD帽子放在顶部。 屏幕是完美的。 但是操纵杆和按钮……不是。 默认情况下也没有声音。 但是$ 14是个不错的开始。
The Tiny GamePi15, also from Waveshare could be good with decent buttons but it has a 240x240 screen.
同样来自Waveshare的Tiny GamePi15可以使用不错的按钮,但是它具有240x240的屏幕。
The full sized Game Hat looks promising and has a large 480x320 screen so you could play PICO-8 at a scaled 256x256.
完整尺寸的Game Hat看起来很有希望,并且具有480x320的大屏幕,因此您可以以256x256的比例播放PICO-8。
The RetroStone is also close but you're truly on your own, compiling drivers yourself (twitter thread) from what I can gather
RetroStone也很接近,但您确实是一个人,可以根据我自己的收集来自己编译驱动程序( twitter线程)
The ClockworkPI GameShell is SOOOO close but the screen is 320x240 which makes 128x128 an awkward scaled mess with aliasing, and the screen the Clockwork folks chose doesn't have a true grid if pixels. Their pixels are staggered. Hopefully they'll offer an alternative module one day, then this would truly be the perfect device. There are clear instructions on how to get going.
ClockworkPI GameShell关闭了,但屏幕为320x240,这使128x128成为带有锯齿的尴尬缩放混乱,并且Clockwork员工选择的屏幕没有像素的真实网格。 它们的像素交错。 希望他们有一天会提供替代模块,那么这确实是完美的设备。 关于如何开始有明确的说明。
The PocketCHIP has a great screen but a nightmare input keyboard.
PocketCHIP具有出色的屏幕,但有噩梦般的输入键盘。
For now, any PC, Laptop, or Rasberry Pi with a proper setup will do just fine for you to explore the PICO-8 and the world of fantasy consoles!
目前,任何具有适当设置的PC,笔记本电脑或Rasberry Pi都可以很好地帮助您探索PICO-8和幻想游戏机的世界!
Sponsor: OzCode is a magical debugging extension for C#/.NET devs working in Visual Studio. Get to the root cause of your bugs faster with heads-up display, advanced search inside objects, LINQ query debugging, side-by-side object comparisons & more. Try for free!
赞助商: OzCode是在Visual Studio中工作的C#/。NET开发人员的神奇调试扩展。 通过抬头显示,对象内部的高级搜索,LINQ查询调试,并排对象比较等,可以更快地找到错误的根本原因。 免费试用!