Home Artists Posts Import Register

Downloads

Content

Hi everyone!

I have spent most of the month working on Sugar! It is coming along and I'll be preparing a build to send to someone soon!!


The last thing I had worked on in Sugar was the refactor of all the graphics subsystems, and then I made DISCTOP with it, and later I made the desktop pet for Explorers Deluxe.

The next thing I had to work on, was the input subsystem.

My issue with it was two-fold:

  • it wasn't finished from back when I made most of Sugar.
  • and I wanted to rewrite most of what was there anyway.

Sugar needs to have support for game controllers, it needs to make it possible to rebind controls in as flexible a way as possible, and it also needs to be easy and fast to use.

The old input system had support for controllers, but it was very messy and flawed, due to my lack of experience with them. And overall, there were too many functions to call to get everything working.

So I cleared out my input.cpp and input.h files and set to work, and about two weeks later it was done!

Now you define your game's controls like this:

controls([[
left > k:a, k:q, k:left, c:dpad:left, c:lstick:left
right > k:d, k:right, c:dpad:right, c:lstick:right
up > k:w, k:z, k:up, c:dpad:up, c:lstick:up
down > k:s, k:down, c:dpad:down, c:lstick:down, c:rtrigger
888 > m:lb, c:a
pause > k:space, c:start
]])

And then you can get your input's like this:

x += btnv("right") - btnv("left")
y += btnv("down") - btnv("up")

if btnp("pause") then
-- ...
end

if btn(888) then
-- ...
end

And on top of this, you can set a function to receive text input, another to receive any inputs for rebinding, you can export the current bindings to save them, and you can set (and get) a bunch of parameters with the two functions mouse(...) and ctrlr(...) which can do a variety of things based on their first argument.

This was quite some work, but I'm very happy with this result!

And with that done, it seemed like a good time to work on the console! I had already built a very basic console for Sugar a while ago, but much like the input system, it was a first try and it was too far from perfect. So I rebuilt it from the ground up.

The console is a separate window that is still part of Sugar and that can control and affect your Sugar program while it runs. (and also while it doesn't) It also serves to load up the project, run it, stop it, resume it, and shutdown Sugar.

Since it's part of Sugar, it makes sense that I would use the Sugar library to make it work. However, there are a lot of state sensitive elements in Sugar. What I mean is that, for example, if you set the drawing color to 7, then you can expect your next draw operation to use the color 7 if you don't explicitly ask for another one. This is the case for the 'camera' coordinates, the 'clip' boundaries, but also which window you're drawing on, what font you're using, what spritesheet, and a bunch of other things.

Because of this, using the engine for both the engine tool(s) and the user's program, with both running simultaneously, is a problem. Or was, until I added interchangeable states!

I put all of those persistent variables into a big data structure, and made a tiny system that lets you get new instances of that structure and switch between them without affecting performances. Of course that also meant putting up some safeguards for when we might be deleting an element which is in use by one of the instances, so I covered the issues that came to mind, and prepared myself mentally to solve more issues related to this later, as they come up.

After that, it wasn't too long before I made the console functional!

And so we move on to another very important user-experience element: the documentation!

After thinking about it, I decided that the documentation would be loaded up dynamically into SUGAR and made available from inside the engine. So in the console, you can call 'man [function]' and get the documentation for that function. And you can still also use the 'mantxt' command to save the entire manual to a text file. The advantage is that I can easily change the rendered format for one method or the other with the engine's code.

And the way I'm defining the manual in the first place is by writing it in a custom format where special characters at the start of each line tell the SUGAR engine whether this line is a function, a category, a description etc.

The parser for this is done and working, but I'm still in the process of writing the documentation. It's not exactly difficult, but it is a tedious process. It's a good thing I'm trying to keep the quantity of different functions to a minimum.

Up until now, the default font in Sugar was Torch by Eeve Somepx! It's legible enough and has a really nice style. But when used in a console or for text editing, it looks pretty busy, and also some of the characters are way taller than all the rest. And I did want to have an original font for SUGAR, so I made my own font which you see above!

I may change a few characters in the future but overall I'm quite happy with it! My focus was legibility, so I tried not to go too crazy, but still allowed some stylishness here and there.

And you can download it! It's attached to this newsletter! Do feel free to use it in your projects! It's a monospace font, and here are all the supported characters:

ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
0123456789
.,!?<>(){}[]/\|'"_-+=*&^%$#@~`:;


And that is it for Sugar this month! As you can see, things are moving forward! I'm hoping to send a first build to Benjamin Soule in February, and hopefully we can try and make something together in the following weeks. (he told me he had been testing Pico-8 before it came out too! 👀)

The priorities right now are:

  • finishing the documentation
  • implementing the run / stop / resume / reload logic
  • implementing some basic folder browsing (cd and ls commands)
  • adding some lua utility functions
  • modifying the lua source files to add mathematical shorthands and bitwise operators
  • reworking the audio subsystem to make it more interesting

Needless to say, you will be reading more about all this in the next newsletter!


This month I, sadly, finished the mobile game Bird Alone by George Batchelor.

Bird Alone gives you a friend. A colorful parrot which will talk with you on a daily basis, asking you about your life and your ideas. There's some more to it, but I would rather you discover it for yourself if you are interested, because... it's delightful. It honestly made my month of December much better. It's a daily dose of cheerfulness and compassion, and in these lockdown times, I think that's something anyone can benefit from.

It's warm, witty, colorful, beautiful-sounding, and helpful. My only regret is that it does indeed end. But then again, it certainly makes the experience much more powerful like this than if I had stopped playing out of boredom. Afterward, the game asks you if you want to start over, but I chose not too. I grew so attached to my bird firend that I prefer missing them.

You should play it.

Something else I've played this month is Townscaper by Oskar Stålberg. It's a small city builder which uses procedural generation to turn the building blocks you put down into actual buildings. That's it.

It's a very simple experience, but super satisfying, and the soft art-style makes it just so good. There's also some neat sound-design, and a very user-friendly interface for some technical things and for capturing what you've made.

And the simplicity of it is a little deceiving. The editor supports all combinations of blocks, and will do things differently in some specific cases, and the rules for these are very fun to find and explore. It almost makes it a creative puzzle box.

It's relaxing and good. I recommend!


And your music recommendation of the month is...

The Proteus Suites, which I had no idea existed until recently. It's 15 tracks made out of the Proteus sounds. Proteus is a beautiful game where you walk around on an island and, uh, some things happen, it's very good and you should play it (/again), it's very pretty and it has beautiful audio, and this album was built out of that audio. So, yeah it's good, very relaxing!


And that is it for this month! I will be continuing making Sugar for now. I would like to make a new thing with it soon-ish, but I want to make it ready to send to Benjamin first, so we'll see what I can make happen!

Thank you very much for your continued support! Your belief in me genuinely means a lot to me!

Here are the names of the 3$+ supporters! (I figured I'd bring this back here since I stopped doing the weekly recaps)

★Blas, Joseph White, rotatetranslate, Anne Le Clech, bbsamurai, Paul Nguyen, Dan Rees-Jones, Joel Jorgensen, Marty Kovach, Flo Devaux, berkfrei, Jearl, David Cole, Elias Alonso, Raphael Gaschignard, Eiyeron, Eliott, Sam Loeschen, amy, Cole Smith, Simon Stålhandske, slono, Gruber, Pierre B., Sean S. LeBlanc, vaporstack, Jakub Wasilewski

Have a very nice month of February!

Take care!

Rémy🍬

Files

Comments

No comments found for this post.