Hacker News new | past | comments | ask | show | jobs | submit login
Mode7 Graphics Library for Playdate (github.com/risolvipro)
164 points by ecliptik on Jan 9, 2024 | hide | past | favorite | 29 comments



Tangentially, here's an explainer on how the original SNES Mode7 actually worked, with excellent animations demonstrating the input, settings, and output:

https://www.youtube.com/watch?v=3FVN_Ze7bzw

(I highly recommend the entire channel, Retro Game Mechanics Explained, https://www.youtube.com/@RGMechEx, for top-notch content)


The quality of these videos are absurdly high: technically very deep and well illustrated. I'd love to know what tools he uses to create them.


He actually did a video about part of the process, in this case importing memory data from the game into After Effects to annotate sprites with 1:1 tracking. It's pretty impressive and seems like a lot of work.

https://www.youtube.com/watch?v=yuVx4QI6fIM


My bet is that they used native code and an emulator for a lot of the effects.


Emulator with Lua capability.


I can also recommend these blog posts about mode 7 (2 parts)

https://www.coranac.com/tonc/text/mode7.htm https://www.coranac.com/tonc/text/mode7ex.htm


Also a full 3d library (likely will result in a lower fps): https://github.com/nstbayless/mini3d-plus


Question for Playdate owners:

How good is it as an actual game console instead of something to tinker with?

I've been tempted to buy it, but I can see myself just tinkering with its SDK, not playing that much. At this point I'm actually considering buying the Sharp transflective LCD that it uses[0] and just tinkering with it and an RP2040 instead.

Is it worth to actually play outside? Say during commutes, long trips, etc.

The form factor looks awful even for my not-that-big hands, and the crank looks a bit gimmicky, but the whole idea of it is sooo nice.

[0] https://www.adafruit.com/product/4694


If you want to try it without hardware, the SDK comes with a simulator [1] that runs on Mac/Linux/Windows. You can use a game controller with instead of the onscreen buttons, but afaik the crank is on-screen only. There are a good number of games that don't use the crank or use it in a limited function. Games purchased from Itch.io run without issue since they're DRM-free.

It is almost an ideal game system to tinker with for game development. Panic (the company that makes it) is very supportive of the SDK and ecosystem, and they even made a web tool called Pulp [2] to make creating games for it as low-friction as possible.

The community around it is outstanding and you can tell there's a lot of excitement that builds a culture of making fun and interesting games and apps. Textbook case of limitations breeds innovation. I recommend the Playdate Podcast to get an idea of the types of games it has and developers insight [2].

Hardware wise it feels like a dream, it is a bit small, but for 30min play sessions it doesn't feel cramped.

The screen looks amazing, but like others have commented, it needs the right light, otherwise it's difficult to view at the correct angle. I actually think having a backlight might actually make it worse with how the screen tech works.

1. https://play.date/dev/

2. https://podcast.play.date/

3. https://play.date/pulp/43718/edit/


It's great as a game console. The crank is a gimmick to a degree, but it's genuinely useful and fun for many games. Some games don't use it at all so it's easy to play as you wish.

Personally I'd prefer a bigger version that I can see better as my years advance and my vision gets worse. But, regardless, it's home to some great games.

The best thing about it from a developer point of view is the SDK. If you went the DIY route you'd have to start very low down the stack. I guess it's up to you: do you want to make a game or the scaffolding?

Obligatory plug: my Playdate game YOYOZO made it onto Ars Technica list of Best Games of 2023. And other games like Direct Drive have won awards and nominations. I feel this means the platform can definitely be taken seriously.


at least in my experience, there's kind of a dearth of games that you would actually want to play over and over or for extended periods of time, as opposed to playing for a few minutes here and there as a novelty. this has nothing to do with the actual hardware itself and its capabilities, just where the software library is at presently. nevertheless it is very fun to develop for.


If you were wondering like me: Playdate is a handheld gaming system, like the gameboy.


I love mode7 effect!

I made one script module for Adventure Game Studio here: https://github.com/ericoporto/mode7

Made a game in a jam using it: https://eri0o.itch.io/dont-give-up-the-cat


In case you're curious how games with first / third person camera work with Playdate and its screen, someone of course has ported Doom and recorded handheld gameplay:

https://nitter.net/NicMagnier/status/1267844459414372353#m

https://twitter.com/NicMagnier/status/1267844459414372353


There’s something very enticing about the limitations of the Playdate. Sure I could make a 1-bit B&W game for any platform, but that fact that that’s all I can do on the Playdate is somehow motivational.

All I ended up making was a Wordle clone, but it’s the only game I’ve ever made and I had a lot of fun doing it.


I'm curious on the addition of 3D objects alongside the mode7 floor like shown in the linked game: https://play.date/games/p-racing/

Does it use the mini3d library linked by nstbayless, or something else?


Lou's Pseudo 3D page mentions that Road Rash uses 3D models with a similar drawing mode [0], I guess?

> Road Rash and 3do Road Rash both have amazing graphics engines. The original Genesis version of the game pulled off a relatively accurate 3d sensation on the Genesis' 7.25mhz 68000 processor, complete with realtime scaling of the roadside objects. The 3do follow-up is no less fascinating, as it turns out to be a mixture of 3d and pseudo technique artistically combined to give the player an amazing sensation of speed.

> As I mentioned above, both the Road Rash and 3do Road Rash engines are a mixture of 3d and pseudo 3d trickery. They use a technique similar to the one described in the "Realistic Hills Using 3d-Projected Segments" chapter in which the hills are in 3d space, but the road's curves are not. Road Rash's curves use the same method described in this article, and each road segment has its own DDX or "x acceleration" value. Each segment also has a height which is relative to the last segment's height. There are roughly 50 segments on-screen at once.

> But where the 3do Road Rash is really interesting is that the programmers added warping which increases the sensation of speed that the player experiences: Objects far from the camera move more slowly, and objects near the camera move more quickly.

> The 3do Road Rash also adds polygonal roadside objects whose X coordinates are still relative to the road. These are used to create hills, buildings, and other relatively complex scenery. This uses a fair amount of data, so the geometry and textures both are streamed from the disc as the track is traversed.

---

[0]: http://www.extentofthejam.com/pseudo/


On Road Rash for Megadrive/Genesis, there's a patch for all the games allowing you to play the games with a much better frame rate.

You don't need any overclocked emulator, patch, plug and play.


I'm not convinced they aren't sprites...


The karts move much like the ones in the original SNES Mario Kart, so I think you’re right.

The boxy cars in the pseudo-rocket league clip, though, look like true 3D.


You might be right, but they don’t turn smoothly, so I’m not entirely sure. The ball is definitely a sprite, it always faces the same direction.


I had the opposite reaction to the boxy cars -- that was what made me think they are all sprites :)


I refuse to believe I'm the only one who thinks of the BBC Microcomputer's teletext mode when I see the other Mode7 mentioned: https://beebwiki.mdfs.net/MODE_7


THANK YOU. Was about to post the same link. Where's the double-height, blinking text? The domino characters? Such a look.


Yep, that's the first thing that came to mind for me too. It's a Brit thing I guess.


nope, i thought of that too! first time i've heard of the other mode7.


You and Dave Green -- always my heroes.


I was really hoping this was some kind of clever hack for the SAA5050 character generator in the BBC.


Teletext was basically nonexistent in the US.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: