It's awfully pretentious, but I got tired of calling it "my Lisp interpreter" and wanted to name the repo something else. Why is it that programming languages are so often given names that have nothing to do with anything?
I never intended my language to be used in production, in any sense of the word. It was made for doing coding exercises to learn Clojure, kind of what BSL (Beginning Student Language) is to Racket. But when I heard about this game jam a couple months ago, I suddenly got really excited and decided to change course. And there's still a good chance that this won't succeed... but I immediately realized that by going through the process of getting my Lisp ready to make a game with, it would put me on a very productive course in many ways.
For one thing, I would need to think about how my language would be packaged and used in another project. Because I wouldn't want to have to copy the entire contents of the project into another project... no, that would be silly. But unfortunately that's what I'm still gonna do unless I can figure out JavaScript's module systems. I managed to create an NPM package of the core language, but certain things don't seem to work. I had to disable ratio support (the project uses Fraction-js but for some reason it would not build with that included presumably because of some discrepancy in the way modules work in Vite and whatever else I tried to use), and it ended up causing other issues which I'm having trouble remembering because it was really frustrating so I just said "Fine, I'll just copy over the entire interpreter and build the game on top of it". So there we are. Maybe somebody smarter than me will help me figure it out some day. In the meantime, it's probably fine, because I'll still be able to build and deploy the game when it's done. I think.
The first thing I wanted to do was create a music engine. Too many people go to make games without giving any thought to the music, and in my mind, the music is the best part, so I'm going to do the opposite and focus on that first. If worst comes to worst, there will be no game... but at least there will be something fun to listen to!
And I'm not talking about playing an mp3. No.... that would be cheating (much like using an existing programming language, or an existing game engine)! And I'm not even talking about building a sample sequencer (which was the first thing I did), because I will not be happy unless I'm actually synthesizing the notes myself, using nothing but mathematics describing pure sound waves.
Specifically, I'm emulating the 4 channels of the NES, which lives in a little plugin called bobbi-lisp-audio. Since my Lisp runs on top of JavaScript, it has native access to the Web Audio API, which I can just pass an audio buffer to, along with the time the note is to play, and voilà! A retro music engine for the web.
The other big thing I would need to think of is graphics. I'm most familiar with SVG, so I decided to make yet another plugin library, bobbi-lisp-svg. The benefit of this is interactivity - by having the ability to add click events, etc. to SVG elements, I don't need to implement any other kind of cursor tracking. I've done this before, implementing fairly complex interactive graphs entirely in SVG with good results.
So why am I still feeling unprepared? Well, it turns out, I've never really thought of making a game before. Well, that's kind of a total lie... I've thought about it ever since I was a kid and my parents let me have a PC but not a Nintendo, and dreamed of making my own version of Super Mario Bros. that I could run on the computer. But the truth is... and to some this may seem like heresy... but I don't really like games. There, I said it. I like boring things, like making programming languages, composing music, and making pixel art, and game dev just happens to require a synthesis of these things.
But there is one game franchise that got quite a bit of my attention over the years. And it happens to be something that even my pedagogical, slow-ass interpreted programming language could handle. I'm talking about SimCity. But not even the good ones...
Ok, here's where this idea starts to get really weird. Which might end up being a mistake, because making something like SimCity 2000 would actually be really cool. But I'm not going to do that (I think). I'm going to make a game based on the game that killed the SimCity franchise, the mobile, timer-based, FarmVille inspired title, SimCity BuildIt. Just because I'm curious what a game with those disgusting freemium mechanics designed to exploit your psychology would be like if it, you know... wasn't evil. To learn more about this, you can read my introductory pitch.
The city-building aspect of the game is downplayed in this paradigm. The real "action" and challenge of the game comes down to time management. I liked that part of the game - basically, time is the actual capital, the currency used to develop your city. Unlike previous versions, where you have a certain budget from taxes that you use to purchase buildings, the buildings are actually free to produce - but to upgrade them, you have to produce materials in your factories, and use the materials to produce items for your stores. I found that aspect refreshing. The trick is having a sufficiently complex and finely tuned mathematical model, much like a slot machine, to be sustainably engaging. To this end, I have documented and studied the data model of SimCity BuildIt and may borrow from it heavily, though I do not plan on using any actual assets from the game, as pretty as they are.
So there we have it. So what are the next steps? While I've done significant work already in preparation, I've taken pains not to cheat by doing any work on the game itself, because I want the final product to be representative of the work done within the time period of the Jam. But I need to make a map. Specifically, an isometric map. This should be fun... I hope. Even if I only get as far as creating a thing where you can build things by plopping roads and buildings down on the map, I'll feel like I accomplished something.
As long as it has a kickass music score, that is.
Project repo: https://codeberg.org/bobbicodes/SimLispy