Thinking about programming games

I've been interested in explorable explanations for a while. I'm also intimidated by them. Creating one explorable explanation is as difficult as creating an entire website

I have noticed that D3 is often used by the authors at Distill for their explorable explanations.

I have been reluctant to use D3 in the past because of its large codebase, but D3's recent move to ES6 as well as FiveThirtyEight's pre-rendering libraries alleviate some of my concerns.

My current idea is to make a visual programming language for D3. This is a project I am pursuing for its utility in my own life.

Most visual programming languages are block-based, but I am not a fan of that concept.

I am interested in enabling enjoyable and casual programming experiences. Subjectively, I feel that block-based visual programming languages are inadequate when it comes to enjoyable, casual programming.

I feel that block-based languages do not encourage autotelic creativity - that is, creativity for its own sake. This is partially based on my experience seeing how children don't actually enjoy using Scratch.

Instead of pursuing block-based visual programming, I might attempt something more ambitious:

People who are not programmers play programming games for fun. What if programming were more like a video game?

Following this line of thought, I initially researched the programming games made by Zachtronics but I was disappointed to see that the games contain puzzles which players need to solve. I want to make something that is similar to a game but more open-ended, allowing users to write code that fulfills any purpose.

Looking at game screenshots, I've decided to take inspiration from Cities: Skylines - Playstation 4 Edition .

Cities: Skylines - Playstation 4 Edition
I imagine that specifiying a function could be like adding floors to an imaginary building.
Cities: Skylines - Playstation 4 Edition
You could browse inventory to look for ways to improve your code.

I think the hardest part of this would be specifiying the beginning and end of each program.

Cities: Skylines - Playstation 4 Edition
The program would run from left to right. Each house's "code" would run in order.

I still think this is ... quite an ambitious project, so I'm probably going to continue looking for examples of end-user programming, visual programming, and programming games on are.na.