Hacker News new | past | comments | ask | show | jobs | submit login
I did Advent of Code on a Playstation (bvisness.me)
244 points by azhenley on Dec 31, 2022 | hide | past | favorite | 57 comments



What a whimsical article, I had totally forgotten about Dreams!

Also finally a good excuse to buy a PS5: Build a 100% fun time LISP interpreter in VR! No Meta creep stack required!

Let's hope the new US run Sony / PlayStation doesn't axe Media Molecule for excessive efficiency reasons like they did with Studio Japan. It's crazy outlier teams / projects that made PlayStation special / what it is today.


I want to revisit my LISP interpreter someday because I have a few ideas about how to implement it more simply. The weird thing, which I only realized after the fact, is that it's less like "building a LISP" and more like "building a LISP machine". One thing I'd like to try for that system is a shared "memory bus" that can be used to allocate and fetch data - right now each node in the system has data-fetching logic built into itself, and it's massively complicated as a result.


I believe Dreams actually runs even better on the PS5 (I’ve heard when running Dreams in a PS5 the “resource” that limits the size of worlds you can build is much larger).

I do wish that Sony would release a free “player” version of Dreams automatically installed on every PS4/5 so that everyone could access what you build. Right now Dream’s creations have a hard time going viral because you have to buy and download a copy to access them. I also wish that Sony would make the tools available on the PC.


I hadn't heard about that, what a shortsighted decision, most of the exclusives that ever made me buy Sony's consoles were either made by Media molecule or Japan studio...


Japan Studio made my favorite game of all time (in collaboration with From Software): Bloodborne.

I had no idea they shuttered Japan Studio, that makes me sad...and even more depressed that Bloodborne will likely not get a PC Port or PS5 patch it rightly deserves.


Considering how similar Bloodborne is to other From Software games I assumed it was developed 100% at From with Sony as the publisher. But I have no idea what the reality is. Did Japan Studio do development work on the game too? If so, I’d be curious to know how they split up the development work between teams.


Japan Studio is credited in the game and actually pitched the original concept to Hidetaka Miyazaki because they specifically wanted to work with From Software. I’m not sure how “collaborative” the actual development was though. I guess the way I worded my original reply made it seem that Japan Studio was the primary developer but I’m pretty sure it was primarily From Software.

https://youtu.be/oiGPTI06fn8


You could say it was not on ps1 / psx, I was expecting some good retro stuff. Before anyone starts complaining - i dont know what "dreams" is, and title just says "advent of code on playstation", which implies doing challenge on 25 year old console.


I am writing this comment on a Mac.

I am not writing this comment on the original Mac released in 1984.


Mac has a genericity that Playstation doesn't. Two mostly contemporary Macs can run mostly the same software, two Playstations can't, the naming scheme is also much more complicated for Mac than it is for Playstation. As a result when you speak of your Playstation device it's expected that you should specify the number, and Playstation reads as Playstation 1.


I don’t think this is as true as you claim. The switch to M1, the switch to intel before that, various changes in macOS…meanwhile PlayStation games often did port to newer generations, typically at least 1 generation off but I can play some ps2 games on ps5.

A bit of a stretch but I think the OP here was incredibly nitpicking regardless of the software compat


> which implies doing challenge on 25 year old console.

No, it doesn't.


it kind of does. devices of newer generations are usually mentioned as such. also, similar headlines more often than not are about implementations in older hardware (more interesting because more challenging)


Absolutely. As a retro console homebrew dev, I was very disappointed in the article when I realized it wasn’t for the PS1/PSX. Needs a 5 in the title.


> Needs a 5 in the title.

It's not even for the PS5 (or 4 as the case may be), someone interested in PS4/PS5 development or homebrew would also be disappointed.


All the more reason to specify. If you're going to disappoint someone no matter what, why not include a single extra digit in your title; to avoid the issue altogether. :)


This brings me back to EE in college as a CS student just trying to make logic work and hitting race conditions left and right (and adding workaround after workarounds), versus the environment I was used to where a program is executed sequentially.


I would love to see someone with electronics experience use Dreams for a while. My total electronics experience is Snap Circuits and Ben Eater videos, so I can't make as rich a connection to electronics as you might hope from an article like this. Maybe there are techniques from real-world circuit design that would actually transfer to Dreams, who knows?


It seems like learning to use Dreams is training you to design transistor level logic, including complicated stuff like how to build an asynchronous circuit or a circuit with multiple power and clock domains. You could put this knowledge to use in designing a real-life custom semiconductor IC.

To get a custom chip made for cheap or free, I think you can try googling for something called a semiconductor shuttle service, which is where they fabricate your project along with a bunch of others, for cheap or free.


Seems that for a beginner, a visual experience while programming could be helpful to understand the problem and tie it to something that feels real and tangible, but that it also slows the process down a lot because of the need to move around in a physical space and so on. I have a feeling that many hardcore programmers would be resistant to a visual programming experience, even if it were optimised better than this game, but your project made me wonder if somewhere in between could be a sweet spot. Imagine writing code, and when you get stuck, you put a VR set on and the code is visualised in a virtual room, as objects, with parameters and connections and you could walk through the code by scrolling time backwards and forwards. It might help you get unstuck and fix the problem while actually understanding the issue, not just trial and error.


I think the Dreams logic system is good at orchestrating high-level behavior, and not actually great at building complex logic. Dreams works not because you can visualize your timers and variables and toggles, but because the underlying game systems are extremely well-designed and easy to control with such a system. In a sense, a lot of the difficult stuff has been pushed behind the scenes. This is not a criticism; I think it's a very good way to design programming environments for others to use.


Dreams is amazing, this is really awesome work!


> “Purity” in Dreams logic isn’t exactly the same as “pure functions” in programming; I don’t know if functional programmers would consider any state machine to be “pure”. But Dreams is, at its heart, a bunch of state machines talking to each other[4]. If you want something to be reusable, keep side effects out of it.

Thoughts on this?


FSMs are common in functional programs though possibly informally. The FSM itself is just a function of (st, event) -> (st, value). Or possibly a bunch of st -> (st, value) functions (where each function represents an event / transition).

It's a common informal way to integrate side-effects in a pure program, the impurity becomes an event or event-set over which the machine (usually composite) is integrated (via something like scan).


This is just great, makes me want to tinker with Dreams.


It's amazing. I love it so much, the only drawback is that it's tied to the Playstation. If it weren't, it would be a much bigger presence because the creation tools were unlike anything I've ever seen before.


It would be great if they could at least bring the runtime to PC so that people could distribute their games more widely - although at that point you might as well have the whole editor too.


I’ve been thinking about this a lot as well. I think it’s doubtful that they’ll port it since MM is owned by Sony. But I agree it would be excellent.

What I’m imagining is something like Dreams that is supported by a whole editor. There’s just something about their approach that feels so much more accessible than any game dev tool I’ve come across. It’s really amazing.

Once WebGPU becomes a reality, it might even be possible to port Dreams content to the web.


that's cool as hell, great post


On an unrelated note. I see you are using a condensor microphone af quite a distance. You have to bump the gain a lot in order to be understood, but with condensor mics that means you will pick up a lot of noise. You can clearly hear the reflections of your voice in the room which has a negative impact on your sound quality.

You can either treat the room with sound panelling, put the mic a lot closer so you can lower the gain, but ideally you’d get a dynamic microphone. Dynamic microphones are less likely to pick up reflections and other noise, but you still have to have it up close. It is also less work than treating a room such as you were in in the video I saw.

Lately I’ve been deep diving into microphones and after hours of investigations this is what I’ve learned.

Suggestions: the Fduce sl40 if you want a budget option or the deity vo-7u for a bit higher end or a shure sm7b for yet higher end. A fifine k688 is also a good option.


I actually did get sound panels for my room, but I apparently need more, because they did a pretty disappointing job. I also need a mic arm that doesn't spontaneously collapse when I move it closer to my face. (Don't buy Blue Yeti's mic arm.)

I'll definitely consider a dynamic microphone for my next big on-stream project, whenever that happens. (I have no idea when it will happen.)


For a quick one-offs OP could also try Adobe Podcast AI enhancer https://www.youtube.com/watch?v=cWdOsO92gCY


The title is a bit misleading, the author did 15 days of AoC in a game creation platform for the PS4. I at first thought the title meant the author had done AoC on a PlayStation (as in PSX). Still interesting to see the demonstrations run.


My first thought was the Linux kits for PS2 and PS3.

https://en.wikipedia.org/wiki/Linux_for_PlayStation_2

https://en.wikipedia.org/wiki/OtherOS

I wasn't disappointed, though, this is a pretty cool project!


I did some non-game programming on a PS2 Linux Kit and it wasn't particularly interesting. Just sitting at a normal Linux CLI with ancient versions of tools.


A PS1 or PSX would be helpful in the title. I too expected a retro game implementation. PS4 and Dreams is indeed, also very cool though.


> A PS1 or PSX would be helpful in the title.

Why? Dreams is a PlayStation 4 and 5 game.


The title is easily read as being about writing code to run in a PSX emulator or on modded hardware, rather than being about using Dreams for it's mostly-intended purpose. We use the terms PSX/PS2/etc. for a reason, and that alone would clarify the title quite a lot. Mentioning Dreams in the title would help, too.


Yes, I know. But the post has nothing to do with a PS1 or PSX, so why would they be helpful in the title?


I think they just misworded that being more specific about the exact platform would be helpful:

- the title mentions PlayStation, but all the oldies will assume that's a PS1, or possibly whichever PS gen they grew up with

- the actual PS gen isn't even relevant really, this is more about doing it in Dreams than on a given device


Indeed, are there any PSX homebrew folks around who have done this or something similar?


I have been almost single-handedly maintaining and expanding one of the largest open source PlayStation 1 SDKs [1] over the last year, adding all sorts of things from video playback to a dynamic linker. There are still plenty of bugs to fix and things to improve, but I think it can already be considered production ready for the most part.

Unfortunately, however, the tooling around PS1 development still has a long way to go; while there are e.g. several open source image or audio conversion tools, none of them are on par with old Sony tools in terms of features. In fact most people still use the official SDK complete with its 1998-era compiler, despite its bloat and heavy use of undocumented proprietary file formats.

[1]: https://github.com/Lameguy64/PSn00bSDK


Yes. Sony actually sold a consumer PS1 dev kit called the Net Yaroze. Some games made using that ended up on Playstation demo discs.


Though I believe Sony made the graphics chip largely unavailable for use on the Net Yaroze (at least directly) as a opposed to a true dev kit where developers had access to the full hardware.


Agree, this is a playstation in the sense that my mum called the NES thru the Wii a Nintendo.


No, let's be fair to the author. It's a PlayStation in the sense it's named a Sony Playstation 4. Colloquially in the US (where the author is from), every generation is referred to as a PlayStation and has been since the PS2 days.

Nintendo's naming scheme greatly differs from the way Sony does it, and I don't think it's it's good faith to the author to act like they're being dense or stupid.


> No, let's be fair to the author. It's a PlayStation in the sense it's named a Sony Playstation 4.

So in the sense that it says nothing interesting about the article. The PS3 originally supported alternative OS ("OtherOS" feature), in which sense doing advent of code on a playstation is no different than doing it on any computer from circa 2005.


Agree while I like the article the title is misleading.

Similarly PS2 Linux was official[0]. There was also an implementation of basic.

For the PSX there was the Net Yaroze[1]. Allowing game development and sharing.

The several of the Nintendo consoles have smileBASIC (petitComputer)[2].

Heck you can boot Linux and Steam on the PS4 these days...[3].

Finally, there are SDKs available for every Sony and Nintendo console of the modern era. DevkitPro is generally excellent[5].

This article should be called I did advent of code in Dreams.

But got to get dem clicks.

[0] https://en.m.wikipedia.org/wiki/Linux_for_PlayStation_2

[1] https://en.m.wikipedia.org/wiki/Net_Yaroze

[2] https://www.nintendo.co.uk/Games/Nintendo-Switch-download-so...

[4] https://gbatemp.net/threads/ps4-linux-bzimages-for-all-versi...

[5] https://devkitpro.org/


Do you consider calling a PlayStation 1 a PSX misleading since Sony released a PS2 + video recorder product actually called the PSX? [0] I don't, but the way folks in this thread are acting about naming conventions, maybe I need to, haha!

I can't believe how uptight and pedantic folks are in a fun thread where the author lays out exactly what's going on in the first sentence; it's like everybody was having a bad NYE and just wanted to take it out on this person who shared their fun, haha.

I get it that all the folks here want everything 100% right 100% of the time, but dang, I can't believe folks are so upset about it not being a PlayStation 1.

[0] https://en.wikipedia.org/wiki/PSX_(digital_video_recorder)


> I get it that all the folks here want everything 100% right 100% of the time, but dang, I can't believe folks are so upset about it not being a PlayStation 1.

It's not about everything being 100% right 100% of the time. It's about the title being complete bait.

It's not about doing AoC on a PlayStation, let alone on a PS1, which is the most reasonable assumption from reading the title. It's about doing AoC in Dreams.


You're right, it should have specified it was done in Dreams. My initial reply was mostly meant that it didn't feel fair or in the spirit of HN to dress the author down as if he was just some 90s stereotypical sitcom mother calling everything a Nintendo.

I'm honestly surprised I was the only one that found that insulting not only to the intelligence of the author but also mothers and the larger group of women. I normally just lurk on HN, but that felt meaner than normal to me, haha.


People feel mislead and they are allowed to feel that.

Clickbait is very frustrating.

The thing about being mislead is either it happened or didn't. And a significant number of people felt mislead. No matter how obvious it was to you it doesn't change those individual experiences!


I've never seen Ben's site on HN before, does he happen to post a lot of clickbait articles? If his site happens to be submitted a lot with of misleading titles, I'll gladly apologize and say I was completely wrong in giving him the benefit of the doubt of not trying to clickbait 90s gamers, haha.


I don't see why a pattern of behaviour is required here?


I want to preface that I may get long winded, because I didn't expect my little comment to get so much attention!

I believe it's important to discern the author's intent before labeling it as clickbait and deeming them a misleading person. And maybe that's the part where the two of us differ on why this post is or isn't clickbait.

In my eyes, I treat clickbait as articles whose content is vastly different from any meaningful interpretation of the title[0] or containing purposefully shallow content[1]. Heck, I may even leave satisfied by the latter post, but deep down I know I was clickbaited, haha!

I say all that because I take a step back when I read personal blogs on HN to determine if they were written explicitly to get posted here or written for another purpose and subsequently ended up here (and that doesn't have to be and probably can't be a completely black and white scale). It seems disingenuous to expect authors to write a title covering every possible way to misinterpret something when their intention probably wasn't to get it posted on HackerNews. I've read through a few of Ben's articles since this comment chain started, and he comes across as talking to a specific audience of folks in and around the game dev, VR dev, and the Handmade game communities. Lots of overlap between there and here, but still a different group with different expectations and understandings.

In essence, it boils down to this author just wrote an article for a personal blog where the title is not close to a lie at all, especially when you consider the context of his audience, he follows it up with detailed and relevant content, and his other blog posts also seem to be made up of content he put effort into[2]. I understand it can be argued that the title should have been editorialized, and I wouldn't be angry if a [4 running Dreams] had been added to the title during submission; however, I wouldn't call it clickbait just because he said PlayStation instead of PS4, especially because I wouldn't want to be faulted by anyone for saying "Jak and Daxter was the first game I ever beat on my PlayStation" even though it was on a PS2 and the game was technically called Jak and Daxter: The Precursor Legacy. It doesn't change that much for the group I would be talking to, just like how his title doesn't change much for his main audience.

With all of that said, it's hard for me to agree that Ben or the submitter azhenley were trying to clickbait or mislead anyone at all, and I hope I've made it more clear why I feel that way, because in the end feel it comes across as mean-spirited to insinuate the author doesn't understand that a PlayStation 1 existed almost 30 years ago and is therefore trying to clickbait and mislead everybody for some gain.

Ben & Austin - if you happen across this sometimes, apologies for having your post semi-derailed!

[0] - For example, "should you use an electric or gas powered mower in 2023?" and it's just a full page ad for a lawn care company with no pros/cons and no meaningful content related to the topic/question being discussed

[1] - All of those "how to do X in Y language" where the inner content consists of a link to an npm package and the rest of the content is just copy + pasted code from the project's readme.

[2] - And to cover my bases here, I didn't read every article, so who knows maybe there's one lurking that's just 200% clickbait, but I will say I thoroughly enjoyed the WASM article!


I’d like to add a word of support here. The author did, in the most literal sense, do Advent of Code challenges on a PlayStation (mind: not ‘the’ PlayStation, but ‘a’ PlayStation). Therefore, the title is factually accurate.

The fact that there are some graybeards conflating ‘PlayStation’ (the family of consoles) with ‘PlayStation’ (the first and namesake console of that family) is perhaps understandable, but no reason to accuse the author of intentional clickbait.

Consider also that the English Wikipedia page on PlayStation is about the brand, with the namesake console being relegated to ‘PlayStation (console)’.

To the author: thanks for the impressive and enjoyable article and videos.

Aside: does anyone know of any environment like this for other platforms?


The title doesn't reflect how impressive that is.




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

Search: