[HN Gopher] Byte-Sized Swift: Building Tiny Games for the Playdate
       ___________________________________________________________________
        
       Byte-Sized Swift: Building Tiny Games for the Playdate
        
       Author : rauhul
       Score  : 101 points
       Date   : 2024-03-12 17:18 UTC (5 hours ago)
        
 (HTM) web link (www.swift.org)
 (TXT) w3m dump (www.swift.org)
        
       | rauhul wrote:
       | Associated discussion on the swift forum:
       | https://forums.swift.org/t/byte-sized-swift-building-tiny-ga...
        
         | ladberg wrote:
         | Feeling pretty craft-y recently, huh?
        
       | Kon-Peki wrote:
       | Nice job!
       | 
       | Not being much of a swifty, I didn't know anything about that API
       | Notes thing. I like it a lot!
        
       | Neff wrote:
       | This is great to see more resources being made for the Playdate.
       | It is such a fun little console and the games made for it are
       | such a breath of fresh air
       | 
       | I hope Panic is able to either retrofit or make a v2 with a
       | backlight. I realized how low the contrast on the screen was
       | after my cataract surgery and seeing details in some of the games
       | becomes near impossible in less-than-ideal conditions.
        
         | msephton wrote:
         | The Sharp Memory LCD screen is opaque, unlike most other LCDs,
         | so can't work with a backlight. It could work with a front/edge
         | light but the results are not what you'd hope for.
        
       | favorited wrote:
       | I recently watched a neat conference presentation[0] about
       | generating Game Boy Advance binaries using LLVM - I wonder how
       | difficult it would be to use that ARM7TDMI toolchain with
       | Embedded Swift.
       | 
       | [0]https://www.youtube.com/watch?v=Q-Woh_Uzw5g
        
       | rgovostes wrote:
       | Recently: Embedded Swift on the Raspberry Pi Pico
       | https://news.ycombinator.com/item?id=39611111
        
       | hbn wrote:
       | Tangentially related, but Lucas Pope's new game, Mars After
       | Midnight, just released for $6 on Playdate. Played it for a bit
       | during my lunch break and it's really cool and creative.
       | 
       | I had read a few of his devlog posts[1] from a while back and
       | it's really cool to get an insight into his process. A while back
       | I had also gotten into reading his updates on the process as he
       | built his last game, Return of the Obra Dinn[2]. Only got 10
       | pages or so into the thread but again, his talent and attention
       | to detail are incredible.
       | 
       | [1] https://dukope.itch.io/mars-after-
       | midnight/devlog/261758/mar...
       | 
       | [2] https://forums.tigsource.com/index.php?topic=40832.0
        
       | ericlewis wrote:
       | Ah cool. I messed around with this a while ago:
       | https://github.com/ericlewis/swift-playdate
        
       | glhaynes wrote:
       | A Vision for Embedded Swift (https://github.com/apple/swift-
       | evolution/blob/main/visions/e...) has the details on this new
       | build mode and is quite interesting.                 Effectively,
       | there will be two bottom layers of Swift, and the lower one,
       | "non-allocating" Embedded Swift, will necessarily be a more
       | restricted compilation mode (e.g. classes will be disallowed as
       | they fundamentally require heap allocations) and likely to be
       | used only in very specialized use cases. "Allocating" Embedded
       | Swift should allow classes and other language facilities that
       | rely on the heap (e.g. indirect enums).
       | 
       | Also, this seems to maybe hint at (most of?) the Swift runtime
       | eventually being reimplemented in non-allocating Embedded Swift
       | rather than the C++ (?) that it uses now:                 The
       | Swift runtime APIs will be provided as an implementation that's
       | optimized for small codesize and will be available as a static
       | library in the toolchain for common CPU architectures.
       | Interestingly, it's possible to write that implementation in
       | "non-allocating" Baremetal Swift.
        
       | ks2048 wrote:
       | I haven't seen playdate before. Looks cool and I appreciate
       | people doing things like this, but $200 seems like a lot! Compare
       | to android phones for half the price that also function as
       | phones. I realize things without mass production will be more
       | expensive, but I wonder what part(s) the device are the biggest
       | contributor to the price?
       | 
       | (Also, more to the point of the article - kudos to Swift team. A
       | nice language I hope becomes more widespread)
        
         | linsomniac wrote:
         | I was kind of interested in the Playdate but couldn't bring
         | myself to buy one. Last summer I stayed at my brother-in-laws
         | place for a week and did some DIY work around his house, and
         | while I was there played with his Playdate. Really enjoyed it,
         | but still couldn't bring myself to "pull the trigger" on buying
         | one. I'm really busy with work and life these days and don't
         | often find I have time to game.
         | 
         | 3 months later a package arrived from Playdate; as a thank you
         | for the DIY work my BIL bought me one.
         | 
         | It's a very well designed and executed device, the crank handle
         | is well used in many games, and it's nice to have a device that
         | just does one thing and does it well. It can be a little tricky
         | to play depending on ambient light.
        
           | msephton wrote:
           | Props to your BIL! You're lucky to have family like that.
        
         | msephton wrote:
         | I think the biggest contributors to cost are the Sharp Memory
         | LCD screen, custom built crank, and the fact that you get 24
         | games included with the device. Regardless, it's absolutely
         | worth it without a shadow of a doubt. There's nothing else like
         | it.
         | 
         | Plus, it's the only way to play exclusive games of which there
         | are many. My game YOYOZO was listed in Ars Technica's "Best
         | Games of 2023" alongside several games by Nintendo.
        
       | airstrike wrote:
       | Pretty cool. Swift is such a great little (little?) language, I'm
       | always thrilled to see more of it outside of Apple stuff (which
       | is not to say I don't also love it on Apple stuff)
        
       ___________________________________________________________________
       (page generated 2024-03-12 23:00 UTC)