Today I worked on splitting the huge “handle_keypress” function into two separate functions: one to add/delete characters and another to format the lines. Now the “handle_keypress” function only handles adding/deleting characters and the “format_text” function will clean up after it. The editor feels a lot less like a pile of if-statements now! xDIt also finally…
Category: Programming
PICO-8 Text Editor with Effects, #5
Today I rewrote almost the entire text editor to use tables for lines.I also switched to drawing the cursor as a rectangle instead of as a letter background color and it made the logic a lot easier. I haven’t added the character juggling or re-added mouse support yet, but I don’t think they’re going to…
PICO-8 Text Editor with Effects, #4
Today I worked more on the text editor and I’ve concluded that I need to change its text system again. The problem is the current system doesn’t have any concept of lines until the text is drawn. Let’s look at how this plays out in a common situation: the user presses the up arrow key…
PICO-8 Text Editor with Effects, #3
Today I made a bunch of changes to the text editor. I added a movable cursor, re-added particle effects, and changed the method of drawing text. Particle effects: I used the idea of saving each letter’s screen position at draw time and creating the particles afterward. Cursor: This was pretty straight forward; I just changed…
PICO-8 Text Editor with Effects, #2
I’m working on the text editor and I need to change my system of storing text to enable per-letter effects and a cursor. Right now, I’m storing the text as a table of strings, with each string storing one line of text. The problem is this system can’t do anything different per-letter because it stores…
PICO-8 Text Editor with Effects (Prototype)
Today I started making a text editor with effects! Inspired by Textreme 2 with ideas from Nerdy Teacher’s particles tutorial.It’s still missing a bunch of features, but the core idea is done.
Fish Demo in PICO-8
So what was going to be matrix rain turned into fish ¯\_(ツ)_/¯ Edit 4/30/2023 (almost 2 years later): Just repaired the ascii face. It was missing the “\”.
PICO-8 Clock, Dev log #2
Today I finished drawing the numbers! I also made them bounce around the screen, which in total took about an hour and 20 minutes.
Bubbles Tweetcart (PICO-8)
Today I made my first PICO-8 tweetcart! It’s the bubbles screensaver, but under 280 characters. Here’s the source code: And here’s the unminified source code:
PICO-8 Clock, Dev Log #1
Today I started replicating my desk clock in PICO-8! It took me about 45 minutes to draw the first six numbers and get the hands moving. The fun part is going to be making it do crazy stuff once it’s working normally. This should be a very short project, but I guess I’ll see.
Development Notes from Reverse Bird
Some notes from the development of Reverse Bird:
Reverse Bird, Prototyping 2
Today I sprinted to finish the Reverse Bird prototype. I have a new project planned for June, so I’m trying to finish the prototype before then. It should be done tomorrow!
Comic Sans for Coding
I write the first draft of all these posts in Comic Sans. It’s a controversial font, but I like it for writing. Comic Sans is warm. It doesn’t judge. I feel more free writing with it than other fonts. So I thought, “If I like writing with it, why not use it in my code…
A Better 2D Camera (Reverse Bird)
Today I worked on an improved camera for Reverse Bird. It’s still kind of a hack, but it’s less of a hack than the first camera. Now I’m rewriting Reverse Bird to use the new camera. I also started using Git to track the project version history.
Game Development and Stacking Pancakes
I just watched this video by Lazy Devs about game development and I wanted to write about it. So I did write about it. You might even read what I wrote. I know I did. Although, you should watch the video before reading because it’ll make more sense. I understand if you can’t; it is…
Reverse Bird, Prototyping 1
Today I’ve been playing some of the original Flappy Bird. If I’m making a Flappy Bird clone, I may as well do it right and reference the original. While playing, I noticed that the bird’s rotation and jump are much more relaxed than I remembered. On the coding side, I fixed a bug where the…
Sprite Rotation in PICO-8, 2
Today I worked more on sprite rotation, but it seemed best if I used filled triangles instead of sprites. I ported the triangle fill function from my 3D render and with that working, here’s a prototype of Reverse Bird: It’s still missing collisions and everything else that would make it a finished game, but the…
Sprite Rotation in PICO-8
I have a game idea which needs rotated sprites or at least rotated rectangles, but PICO-8 doesn’t have a built-in way to draw either. I found some sprite rotation libraries and, while I may end up using them, I wanted to at least try writing my own code. I started by porting the textured triangle…