Re-Starting Fundamental Algorithms

I have been looking into how to do the fundamental algorithms that run Re-Hoard:

  • Some way of generating a maze
  • Some way of drawing a maze
  • Some way of directing the opponent’s movements whether they be patrolling or hunting while respecting collision
  • Some way of generating fully-functioning opponents

Though I looked for several maze generating modules already written in Lua, especially accounting the tight restrictions the Pico-8 has, I ended up coding the Recursive Backtracker algorithm that Jamis Buck wrote in his presentation on algorithms. (What really confused me way how to iterate over a 2D table in Lua.) However, I still needed some way of implementing queues in Lua. I ended up with the Deque module. I only put the specific functionality the game needed, though. I ran the code, but I ended up stuck today on some odd syntax error when dealing with this line:

 if dungeon[(current_cell.1) - 1][(current_cell.2)] == nil then

current_cell holds a table (a list, actually) that simply holds the “current” coordinates ({x, y}). Out of some reason, though, Pico-8 keeps saying:

‘)’ expected near ‘.1’

…even though I already put a closed parenthesis.

Thankfully, I already made a quick code that draws the map, which is actually a table full of “true”, “false”, or “nil” values.

On the opponent AI, Scathe at the Lexaloffe forums suggested repeatedly directing the opponent to a specific point in the map. His posts use a Pac-Man-style algorithm while the Pico-8 Zine used the A* algorithm, instead. I picked A*. This requires some careful attention from me, though I realized that the pathfinding algorithm also solves the issue with collision: pathfinding algorithms are designed to find the shortest path to a goal while avoiding obstacles, that is, the same obstacles that motivate me putting in collision detection in my game!

I already have the actual collision detection algorithm fully understood and coded, by the way.

On actually generating these opponents, I found Entity-Component Systems which not only promise to be more efficient but also do away with the need of object-oriented programming (in theory), making them a good fit to Lua, which does not have native support of OOP.

I would push these changes to GitHub, but I put all these algorithms on a separate cartridge because I want to focus on understanding and testing those algorithms specifically.


Reckless Foresight

When I formed my goal of releasing Re-Hoard and Reckless Abandon on September 10, I was thinking only on coding, graphics, and music.

I realized recently that there are more steps after that.

I am not only talking about testing or even translation. I want to give these games their own mini websites, advertising (with stellar art), and, in all, a proper release. That requires not only more programming, but also skills in how to use CSS, how to draw skillfully, and so on. I would also have to make the websites fascinating yet skillfully coded and designed. I would also have to add new features, including a guestbook and privacy policy.

In all, I need to give the games the respect they deserve.

I knew that making September 10 a mere goal instead of a promise was wise.

Release goals of Re-Hoard and Reckless Abandon

Please excuse the news blackout. Since July, I needed to rest, first. Afterwards, I got a new computer that replaced my old one which had a malfunctioning keyboard. After that, I spent my time setting up my computer to my liking and getting used to a new keyboard layout based on the 2nd ANSI Keyboard variation of the DH Colemak mod.* I am still yet from fully used to this layout, but I am reasonably competent here. Besides, I should not be putting off development of my games so long.

How does September 10 sound? I am not making any promises, but I should be getting back to work.

Lua to the End?

From the beginning of my game career, I intended to make games that use Libretro, a C/C++ library that can be used in writing emulators and standalone games. The reason why I learned Lua in the first place was because, compared to using straight C or C++, writing games in Lua and relying on the Lutro core seemed to be the more comfortable option. Indeed, because Lua programs do not need to be compiled, I ended up saving myself plenty of precious time in my last two college projects back when I took my Master’s Degree. Developing my final project using LÖVE instead of trying to understand the Libretro library, especially given the one-trimester deadline, spared me from a lot of grief. That knowledge of Lua also helped me develop games for the PICO-8, an all-in-one platform that not only helped me get used to normal game development but also has several channels of delivery, my favourite one being uploading the game itself in image format. You can even play these games in your browser with little fuss!

However, I am starting to feel the limitations Lua has. While Reckless Abandon has simple code, Re-Hoard has a game plan that needs object-oriented programming when generating random anti-hoarders, each with their own patrolling and hunting styles, per stage. Lua does not have any object-oriented functionality; other people fake that functionality using metatables. Even with that fake functionality, I fear that I would be better off relying on the real thing. Besides, if Lua lacked true object-oriented functionality, then what else would Lua lack? Other consideration include less layers of abstraction that might interfere with my wanting to interact with Libretro itself, the bigger maturity of C++ tools and libraries, and practice in a language that is still in high demand in the workplace. In fact, the more advanced aspects of Lua actually use a C library!

On the other hand, the gains from the lack of a compilation time proved to be an assets when I debugged my college projects. Also, LÖVE games store their assets as-is instead of they being baked directly in the program; I can edit a sprite or switch around a song and see the effects when running the game anew.

Despite these benefits, I am seriously considering working on my new games with C++ from now on. In fact, though Reckless Abandon would stay a PICO-8 game, I might move Re-Hoard to C++.

I just need to figure out how to display and move .png sprites and implement collision detection while I use Libretro.

Reckful Spriting

I managed to do almost all of the graphics of Reckless Abandon. I was actually out of ideas by the time I stopped, but I thankfully got almost everything done there. Other than that, I still have to do the bonus exhibit and a secret or so.

I stopped temporarily because I both wanted to rest and celebrate. I wanted the ideas to come, but that needed me stepping away from the game. Even coding would not give the rest my mind needed in gathering ideas.

I think I got almost all the ideas I needed since then now.

I feel accomplished that I did so much. I hope that I can release both Reckless Abandon and Re-Hoard by the end of this month.

A Human-Sized Wall

Recently, I started working on Reckless Abandon again. Weirdly, my problem was that I had trouble figuring out how to draw humans in sprite form. I think the reason behind my hesitation was because I am going to do a big number of human-based designs in both Reckless Abandon and Re-Hoard, yet in theory, there are several ways of drawing humans. There is a lot hanging on this base concept.

I decided to take my time in loosening up my human designs.


The one I like the most is the purple design due to its reasonable compactness while still being recognizable and animatable.

72 hours…

I earlier mentioned that, because both Re-Hoard and Reckless Abandon are half-developed, I can follow eevee’s lead on developing these Pico-8 games in 72 hours.

The issue is that eevee developed her game in 72 dedicated hours (save necessities, of course).

…I can dedicate myself that much, though, to some extent, but this is a flash of perspective that I missed when I wrote my last post.

I should get to playing around with the demos today.

I was so reckless…

You are probably wondering why I had not made any updates to this blog in a shockingly long time.

The first issue was my current computer. After the keyboard appearing to work not properly, I decided to switch its operating system. Because my laptop computer was meant to use Windows 8 and 10, I spent weeks figuring out which operating system worked until Fedora seemed to be the solution.

The second issue was my knowledge of the Pico-8. Because I did not have that familiarity needed in working with the Pico-8, I spent my time studying the API and using a cheat sheet. After that, though, I need to play around with the Pico-8, then practice that knowledge in a more relaxed way before I can get to working on Re-Hoard again.

That is right; I am not working on Re-Hoard right away. Though I did get an answer to my question, the game proved to require knowledge that exceeds the knowledge I currently have or knowledge I can use directly after just playing around. I need to make an easier game before I can tackle Re-Hoard again.

This easier game is called Reckless Abandon.

On a different take from Re-Hoard, Reckless Abandon is more realistic and contemporary in one way, yet more mysterious in another way. The game has a raccoon explore an abandoned amusement park and discover what gadgets and history this place has. Instead of relying on “arcade action”, Reckless Abandon focus on the mood and setting. The gameplay is very simple where the raccoon just moves around and “uses” a few objects, therefore making a game that becomes (in theory) far easier to program.

I hope to release both Re-Hoard and Reckless Abandon before the Puerto Rico Comi-Con because that convention would make a great networking opportunity. I would also need to update the site and make some beautiful art, which means that I would have to go back to practicing art. In fact, I am worried that I would not release the games on time.

…then again, eevee made a game in the Pico-8 during a 72-hour Ludum Dare. More on that, we both have the advantage of having the games half-done already; eevee already had a fully-developed game engine while I already have fully-developed game concepts. (In fact, developing the concept of Reckless Abandon was part of the reason of my inactivity here!)

2 games in 3 days each… let me see if I could reach that goal…

Re-Hoard: main and panic themes

Even though I liked Robert Duguay’s Nine Songs in Pico-8, the fact that they were not freely-licensed always bothered me. I decided to make my own.

Actually, other than transcribing a few songs ‒ some partially, some fully ‒ I never made a full song before. I never even went through formal music training other than eevee’s post on music. Here, I just went by a sort of mindful intuition: while some of this was me going by what “sounds great”, I also asked myself questions that I felt that should be asked, the main one being, “Does this contribute to the overall feeling I want to convey?” I ended up with a song that “tells a story,” so to speak.

I made these in the music tool of WarioWare: DIY, used a male-male 3.5 mm cable from the headphone slot in my New 3DS XL to the microphone slot in a computer I use, then recorded, modified and exported them in Audacity. (I wish the in-game player did not make a sound when you start playing the song…) The MIDI files came from the WarioWare DIY Editor.


Time to Panic!!!

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

I should start over.

Not long after I posted my last post, I fully realized that, when I was making my first game, I actually did very little preparatory work before just diving into the editor. Despite how fun that would sound, I was clueless all this time at how stuff worked in the Pico-8! Most relevantly, how could I learn how the opponents were to move if I had trouble with the physics!

That was stupid of me.

I decided to take my time exploring the Pico-8 more thoroughly before I go back to the game. I would still work on the assets, but the actual coding would have to wait until I get used to things more.