Note: This cartridge's settings do not allow embedded playback. A [Play at lexaloffle] link will be included instead.

.
The Land of Miskatonia needs a hero to save it from the evil Faxon and its minions. Can you be that hero? Explore Miskatonia and its settlements, talk to its residents, build up your skills, and finally challenge Faxon in its secret lair.

This is my little homage to the old-school 8-bit Ultima games as they were found on the C128. I hope you enjoy it.

It exhausts almost every resource available to a PICO-8 app, and required minimization before it could be converted into a cartridge. The full source of Minima is available on GitHub for anyone interested in how it works. I have also provided a manual for it in a couple of formats, so you may want to grab and peruse the Minima manual as a PDF or the Minima manual as an ePub as well as the cartridge itself. Downloadable binaries are also available on the Itch.io Minima page.

If you have any comments, questions, or even just random thoughts related to it, I'll be happy to listen. I have played all the way through and do not know of any bugs in this version (1.1.1) but I could have easily missed some. I believe this to be the best version of Minima yet. (Several months after writing that previous line, I've stumbled onto two minor glitches. They have now both been fixed in 1.1.2, so again we're back to zero known bugs.)

If you enjoy Minima, you may also like the game Anteform (play online or download) that was built using the same engine. Both have similar interfaces but entirely different stories, settings, and characters.

New in version 1.1.2

Bug fix for erroneous report about finding certain magic item again after it had already been found.

Bug fix for incorrectly reporting a wall ahead in a dungeon when in fact a passage was there when using the look command.

New in version 1.1.1

Bug fix for game freeze that was impacting some folks in Zanders Guild Shop.

Bug fix for weird graphics glitch that was intermittently causing animations to get messed up after several game loads.

New in version 1.1

Dungeons are bigger and more challenging.

There is a guild shop with skeleton keys and torches.

Creature movement is much improved.

There are more townies, more dialog, and more clues.

Treasure chests are back, meaning less grinding is required.

Shrines can be entered.

Many minor bugs and glitches have been fixed.

The manual is fully updated to reflect the changes.

The cartridge picture is much improved.

Please note that loading / saving is incompatible between 1.0 and 1.1. That is, saves made with version 1.0.X cannot be loaded into version 1.1.X.

This version makes use of Tyler Neylon's JSON parser as suggested by @freds72. Minima is still hitting the wall, but now it's the compression size wall more than the token count wall.

@enargy No, the interface doesn't really support it. There are only a handful of addressable keys out-of-the-box and so I had to get creative to make the commands fit in. As with all the Ultimas some people do provide clues as to how to win, but the dialog is somewhere between what III and IV offers. Each person has a couple of things to say, but there's no prompting them beyond the base dialog command.

Even with that I don't think I can fit it without doing some major surgery. To give you an idea of where Minima is at relative to PICO-8 limitations, it's presently using 8189/8192 tokens, all the map space, all the sprites that don't overlap with the map space, 61/64 SFX slots, and (before minification) 55314 out of 65536 characters and 19331 out of 15360 compressed bytes (which is why the minification is presently required). I'd also at one point blown past the runtime memory allotment when I tried to save some tokens by making some table allocations less smart. I don't know how close I am to that runtime memory limit now, but I suspect not too far away...

If I'd known about that technique back when I first started I would have definitely tried to use it though. It would have made quite a few decisions a lot easier. Note the care with which I named spells and weapons, for example.

clone your actual actors from json structure. I use the following function to create actors with random attributes:

function clone(src,dst)
-- safety checks
if(src==dst) assert()
if(type(src)!="table") assert()
dst=dst or {}
for k,v in pairs(src) do
if(not dst[k]) dst[k]=v
end
-- randomize selected values
if src.rnd then
for k,v in pairs(src.rnd) do
-- don't overwrite existing values
if not dst[k] then
dst[k]=v[3] and rndarray(v) or rndlerp(v[1],v[2])
end
end
end
return dst
end
-- example use:
local player_template=json_parse('{"x":0,"y":0,"rnd":{"stamina":[1,8]}}')
local player=clone(player_template)
-- stamina is a random value between 1-8
print(player.stamina)

I'd be happy for you to take a stab at it, as there were features I had to drop in order to shoehorn in what I got in.

I think you need to look at the source prior to minification, though, via the link above. It's making pretty heavy use of metatables in order to spare repeated initialization, and it is using multi-variable initialization, no-parentheses calls, etc. everywhere in the original version. Apparently some of that is getting undone as part of the minification process. If you modify the minimized one we'll end up with something that'll be really gnarly to work on going down the road, but if you can reduce the token count of the clean version we ought to be able to do quite a bit with it. It's largely data-driven so it won't be a huge task to replace the maps and town data with a new set and thus create a new game if we preserve its data structure.

As soon as I opened it up I'm like, "the music is nostalgic but the arrangement is grating," so rather than complain about it I just went in and reworked the whole thing. I didn't put in the triplet parts from the original(they're possible, just tedious since you have to run those patterns at higher speed) but everything's been given some more ornaments now.

Having finished my quest, I played the game start to finish. Lots of fun.

It feels like Ultimas I and II in terms of fleshing out the content - some grinding, a handful of puzzles, a lot of filler parts. Which is understandable since RPG content is pretty tough to fill in, especially so when you have PICO-8 limits to work against. In those games the dungeons were tacked on and just served to grind experience - and here it's the same apart from the final dungeon...bug report: when I won I tried to ascend to the dungeon again and it sent me to an empty void.

Yeah, story-wise it's pretty similar in complexity to Ultima II, scale-wise it's closer to Ultima I, but it's got a few Ultima III & Ultima IV sorts of features thrown in, too. Space constraints were what limited me the most with regard to RPG content. I'd planned out more people with more custom dialog and one more puzzle thread that I just couldn't work in (along with a list of specific features that I'd had to drop at various points along the way -- if you're interested in the full list I included them on the GitHub page). One of the final things I had to give up was treasure chests in dungeons. These would have reduced grind and made the mimics a little more meaningful.

Even without chests there actually is something to find in each of the three non-final dungeons in Minima. Obviously none of them are essential. They can make winning easier though. There are a few clues in there about them, but they're terser than I'd like.

@triplefox: Your take on the music is great, better than mine. Are you sure it's even possible to do the triplet parts from the original within the limits we've got? I'm not questioning whether or not the timing can be done, as obviously the answer there is "yes", but more whether or not it'd fit within the available count. When I'd considered it earlier I didn't think it could.

@freds72: Yeah, I was already using the standard optimizations plus a bunch of other things that I'm sure are very much non-standard. If you've got an efficient JSON parser for PICO-8 that could definitely save 1000 tokens easily while still keeping Minima data-driven (and thus easily usable as a framework for other similar types of games).

I’ve already edited my initial post with details and examples. The json version is actually even more data driven than the original!
The full json version should be around 6400 tokens (exercise left to the reader - the version I posted is working but not fully converted, some code & data must be modified to be fully json-compatible ;)

@Feneric: I haven't measured the pattern counts, but my suspicion is that it wouldn't impact as much as we think. The way PICO-8 music deals with short patterns is to loop them until the longest one ends, hence you have some room to modulate speed/size over the course of the song to only include the fast stuff where it's needed. For most triplet patterns this means going from 64 to 96 effective rows - or by multiplying the rows by three and running it three times as fast. Better hope your speed is divisible by three! As a last resort you could turn to the SFX instruments feature, and define SFX to play notes with triplet offsetting.

Given all those considerations it could easily turn into a juggling act where it could be done, or mostly done, but it's logistically difficult and the whole song has to run a little bit faster or slower, which is why I didn't look into it closely.

The other way that this could be done, which would take a lot of tokens to pull off, is to rewrite it in MML form. And then generate the pattern data on demand by compiling it. AFAIK we don't have any such compiler right now. It would be an interesting tech project.

Truly brilliant...except that I always end up being killed by the first or second monster!?!

I got some piece of cloth in town, get to the first dungeon and well, it doesn't end up well :/
First encounter: ok, level up
Second encounter: nope.nada (don't have MP anymore, not enough HP, can't exit, can't Medic...)

@dw817 I've been loading and saving all day and didn't run into that; you didn't save on version 1.0 and load on version 1.1, did you? The two save files aren't compatible and mixing them will definitely cause that. There had been an earlier problem where the minimization was sometimes causing the load & save to break. Hopefully that's not back, but if it is I'll try and get it resolved.

@freds72 Thanks, I'm glad you like it. I'm making pretty good use of the JSON parser; now the big limitation is compression size. It's especially hard at the beginning. My advice for you is as follows: ensure you get both armor and a weapon ASAP and upgrade both aggressively. Get familiar with your spells as magic matters a lot in Minima. Don't bother trying dungeons until you're a little more experienced and better equipped. With regard to fighting monsters when unarmed -- it's sometimes better to run away.

Good, you had me worried for a bit because I couldn't reproduce it and thought there may be something weird lurking there. Please let me know what you think of it once you've had a chance to dig in a little.

@hwd2002 No worries. I tried to cover all that in the manual (but please let me know if I missed anything) and also included an abbreviated list of commands in the in-game help accessible via the pause menu.

I really want to give this game enough shots to do it justice, I can see a lot of work went into it. However, I really don't know how to progress. I can get the cloth---but I can't find a dagger. Clues I've found:

"the secret room is key." - I got REALLY excited when I found the mismatched block in Saugus at the top. I was like THIS IS THE SECRET ROOM AND A DAGGER IS IN IT. But, nope, all it does is exit the town. That was unexpected :D

I also keep trying to go in that dungeon to the southwest to see if I can find anything in there. I can use a torch, I walk around but I ALWAYS DIE.

I keep hoping to find somebody who is kind enough to heal me for free, but all I can find is buying "medic" for 8$ then I'm out of money and it only gives me 1 hit point. Then I meet a monster and die. Running away doesn't seem like a good strategy if I want to level up?

Any hints? I really like the game and I'm gonna keep trying for a while.

Hi! I'm having a lot of fun playing Minima now that I understand the food mechanic. I encountered what appears to be a bug. I returned to the village and some of the people get chests in their animations. hope this helps.

BTW, Here is the saved game file minima0.p8d.txt which causes the bug. I find that if I load this game, then enter the town, the two guard guys MIGHT have the wrong animation. The animations change after multiple loads. I've seen treasure chests, krakens and other things. Resetting the cart completely then loading seems to clear the guys to their original animations.

Another bug. I got to this "Zander" shop, did dialog---now I cannot dismiss the choices. I can't pick the choices either---I'm just stuck. Animations still are playing, but gameplay is effectively halted.

edit upon re-loading a game, the game was still frozen input wise. When I reset the cart, the input was no longer frozen and I could continue playing.

@gradualgames I'll try to answer all your questions and comments. First off, you're welcome, I hope you enjoy it. The engine it uses can be pretty easily repurposed for another game if you so choose.

I've seen that animation corruption a couple times myself, but so far as I can tell there's nothing in the code to cause it, and it's always gone upon restarting PICO-8. It's acting almost like an out-of-bounds pointer has caused internal corruption, but there are no pointers in Minima. In fact there's nothing in Minima that can cause the selected animation frames to change during a game anyway; they're only set during loading and I can point out where if anyone would like to serve as a second set of eyes.

I've never seen it freeze, and I've definitely gotten stuff at Zanders more often than I can recall. This could also be explained by internal corruption, but off the top of my head I can't think of anything in Minima that should cause such corruption.

Which platform are you playing on?

For a quick hint on your described predicament, don't restrict yourself to Saugus. Of course if you've not done so yet I'd recommend perusing the manual, too, as there are some tips in there.

@Feneric Could it be a global variable somewhere perhaps that is introduced during gameplay or a global that was meant to be a local? It is interesting the bug persisted until full cart reset, changing the animation frames each time. I.e. "load game" is not the same as reset, right? Only reset would clear globals i think?

I play on PC, Mac and raspberry pi but i found these bugs on a win7 laptop, lastest pico 8 build. I'll try to reproduce elsewhere as I'll be playing this more :)

I'll see if I can reproduce the Zanders bug. Note though that all shops share a lot of code between them (they have to in order to fit) so there's not a big surface there that's unique to just guild shops.

I don't think it could be a global / local issue on the animation frames as all of that comes from an enormous data structure that gets loaded at start-up and not changed. Any overwriting ought to just break the structure, not just set one value within it to something else. Plus, it hardly ever seems to happen. For all the times I've played it through beginning to end, I only saw it twice and have no idea what triggered it.

I'm still a little worried that it's an obscure artifact of the minification. I had to make quite a few changes to the minimizer to get it not to break Minima, but there may still be something lurking in there.

@Feneric: I can reproduce the sprite tiles bug instantly with the saved game posted above---just tried it out on my mac all I have to do is load the saved game, enter Saugus, then re-load the saved game and enter Saugus a second time. It appears to happen nearly every time? (tried again just now, took me about 4 load game/enter Saugus'es to see the bug)

@Feneric This evening I'm spending a couple hours playing Minima on my raspberry pi. I'm getting a lot further now and having a fantastic time playing it! I ran into the same behaviors on this system, as well if that helps; these are not interfering with my enioyment of the game in the slightest however. I'd never played this style of rpg in the past---only jrpg. I am finding I really enjoy this style of game, especially not having random battles as in most jrpgs. It seems to foster a sense of flow/engagement much better. I finally ventured far enough to find the arms dealer!!

I'm glad you're liking it. Minima is strongly influenced by the old-school Ultima games, so you'd probably like those, too. Ultima IV is available for free from GOG, and the XU4 program provides an open source interface to play it on a range of systems beyond what's directly supported by GOG (including the PocketCHIP if you've got one; I did the easy install scripts for it in PocketInstaller). Ultima IV has a much more complex story than Minima (which is more comparable story-wise to Ultima I) but I think you'll recognize the feel. One of the key things in this style of game is that the dialog from the townies (including what you can hear in pubs) really helps to shape the playing experience.

Also, believe it or not, I'd intended the arms shop to be easier to find than the guild shop (and in fact there are multiple arms shops) but with an open world things can really be done in any order.

OK, I believe I found the root cause for the Zanders bug and have fixed it. I also believe I have a fix for the animation bug, but I'm still puzzled at the cause as essentially some table attributes that get read once at start-up are getting changed. The fix is to force the rereading of this data every time a saved game is loaded.

So upon reflecting further on it I think I know generally where that animation problem was coming from, and my rereading of the data at game load time is the proper fix, so all should be well.

@dw817 & @WarrenM I'm just really thrilled that people are playing Minima and enjoying it. I'm still pretty amazed that folks have played all the way through and won it. There were a lot of features that I wanted working before I'd consider it a viable game, and there were a few times along the way I wasn't certain I was going to be able to squeeze them all in. Although I did give up on some of my "nice-to-haves" all the ones I thought were essential are in there. Even after getting it working though it's so different from most other PICO-8 games I wasn't sure anyone would care to play it.

If there's anything in there that'd help with other projects, please be my guest. The Minima engine can be reworked into another game without too much effort; dropping in new graphics, audio, and data will make it a completely different game with the same mechanics. The only code that'd need to be touched are a couple of endgame bits. Restricting it to the (O) and (X) buttons would be a bit more work, but not too bad. The gotcha with restricting the interface is that it's ironically easy to make it less friendly as both the overlaps can get complex and the failure messages can become misleading.

Beat it!! Does Faxon only show up when you reach a given level? I'd been thru the same part of his lair one or two times at lower levels before I ran into him. Fantastic job sir. I want more haha guess its time to play Ultima IV! ;)

Also re: soundtrack. I actually love the simple unadorned style. We're in some kind of chiptune baroque era because it looks to me like many chiptune musicians such as the one above who redid your soundtrack are all but allergic to simplicity. For me, the simplicity makes it feel even more nostalgic and old like you were going for. Love it.

Note* I do like triplefox's arrangement as well though.

Also @Feneric, who wrote the song for Minima? Is it from an Ultima game or did you or a friend write it? It's very good.

That's excellent! Maybe someday I'll do a Minima II (I have some ideas) but not right away. I'll give folks time to discover / play / win Minima first, and if enough people seem to like this kind of game I'll definitely revisit it. Besides the Ultima games I was always a fan of strategy games, 4X types both on land and in space. I'll probably take a look in that direction before coming back this way.

RE Faxon, that'd be telling, but of course the source is all up on the GitHub page, and the bit concerning Faxon hasn't changed from the easier-to-read early versions.

A deeper bit of Minima trivia is that some of the locations are real places in "Lovecraft Country" (or at least the area where many of his stories was set, Northern Massachusetts) and some of the design details reflect the real places in varying ways.

My very limited musical skills were already stretched to their limit just in trying to convert / arrange those two pieces for PICO-8. The original composer (and he's given credit on the GitHub page etc. as well) is Kenneth W. Arnold, and his original versions are much better than my attempts to mimic them. The two pieces in Minima were both from Ultima III. I also really liked and wanted to use the Ultima III Dungeon Theme, but there was only room for two pieces within the confines of a single cartridge, and that one also has a lot of extra complexities related to timing.

Congratulations on Minima. Simply outstanding. Ultima IV is my all time favorite game. Two questions:

Your tile set it terrific but the bridge kind of stands out for its simplicity. I have little graphic ability and have been able to do a more ultima humped type bridge. Yours is reminiscent of the bridge from the 2600 Adventure :)

Heh, you're right @z80jim. When I said I created the graphics based on my memory of the 8-bit Ultimas on the C128 I wasn't kidding. It probably really was the 2600 Adventure bridge stuck in my head when I made that. I'll upgrade it if/when I do a 1.1.3 release.

Sure, please feel free. In fact I separated them out in the GitHub repository to make it easier to reuse them. Mentioning that they came from Minima would be appreciated.

I'm in the process of reusing the "Minima Engine" and a lot of its graphics and sound effects in another game now: Anteform. I occasionally post updates regarding it on Twitter.

@Feneric That's great thanks. I'll check out the GitHub. Does it include your un-compressed code?

Here is a shot of my version that shows a bridge. I also am using regular Pico-8 print for store signs, saving 28 sprites for other things. Doesn't look as good as yours but .... 28 sprites! I also have phasing moons and water scrolling in 4 directions with just one tile for shallow and deep saving two of your tiles at the cost of code to make them scroll. Problem is I will have token problems for the first time so will have to learn how to minimize that.

Do you have anything that describes your game mechanics in terms of combat, damage, armor, leveling etc?

Thanks for the Ultima in Pico-8 inspiration ... and tiles and music :)

@z80jim You're welcome, what you've got looks great so far! I like your use of icons for stats (although be aware, at least in Minima, people often get some of those numbers up into three or more digits, and in fact it's necessary to get more than 99 gold in order to purchase a few useful items).

Yes, the uncompressed, commented code is there but there are certain things that don't compress well and which I had to minimize manually later in the project creation. Consequently there's a lot of code that's much harder to understand than it ought to be. I recommend looking at the old versions of the Minima code first to get an idea of how it flows before looking at the newest versions with their shortened variable names.

The basic idea of its structure is to set up a big input coroutine that normalizes all button presses. Minima doesn't use actual PICO-8 keyboard input, just leverages key / button equivalences and tries to be clever about verbs in order to make it feel like real keyboard input while using less code. It also heavily uses metatables to make slight variations of things that have lots of attributes, and JSON strings in which to store those things. Making a new game based on the Minima Engine doesn't really require much change to the actual code at all (you'll need to change the victory condition and a couple of tiny exceptions I made for particular travel between places). Mostly all one needs to do is change the graphics, music, and data, and maybe take out bits of code that aren't needed in order to make space for stuff that is.

Using the PICO-8 print for signs is a good idea. The water sprites / code tradeoff may or may not be depending on circumstance; I found in both Minima and Anteform that code space is at a premium, too. Using the two tiles for water meant that I could use the same code treatment for water, volcanos, and any other animated terrain I wanted. If you find that you've got code space to spare making that exception to save sprites will work well, but if you're trying to squeeze it into a single cart (like Minima or Anteform) you'll find it's pretty tight and may cause you grief later. It's the compression step to make the final cart that gets you.