Playdate Releases Pulp

Playdate just release their Pulp environment for making simple games. I think something like this to make Arduboy games would be pretty cool.

1 Like

We could write a tool that takes the saved JSON files and converts them into Arduboy code.

Just looking at it, it wouldn’t be impossible.

I’ve always been hoping for something like this, there have been a couple attempts. Actually, a year after the kickstarter I paid someone for one year to develop something just like it. Online sprite editor and everything, but they took all the money and never produced any work. It’s actually a setback I’ve never really been able to recover from since I’ve never had that amount of free capital or time to invest back into a project like that.

I’d be open to supporting it, if someone takes it on though.

The closest thing we’ve got at the moment are the Dark & Under level editor and the Lode Runner level editor.

Making tools for building levels is relatively easy.
Making tools for actual programming is a bit more complicated.

Now that we have the FX it wouldn’t be quite so painful as before because there would be more room to store the generated data, so you wouldn’t have to worry as much about it being as small as possible. It wouldn’t be as easy for code or sound as it would be for graphics and levels, but it would be doable for slower games at least if a VM was used.

Actually developing these kinds of tools takes a time and effort though. The problem isn’t just with making the interface, it’s also working out a flexible format and making sure it generates small, efficient data.

Also, different data formats work better for different games. I notice the Pulp editor seems to be geared towards tile-based games. (In fact, it looks somewhat like a Pokemon ROM hacking tool.) While that sort of game is possible for Arduboy, it wouldn’t suit every kind of game. Usually Arduboy games end up using a game-specific level format to make optimal use of space, rather than using a flexible generic format as more modern games do.

And if you want scriptable behaviour, you need a VM (unless you’re prepared to keep reflashing game files), which will by definition run slower than native machine code would. (I started making a VM for visual novels once and planned to adapt it to work with the FX chip, but never got around to it - I haven’t been doing as much programming in the last year or so.)

The Playdate itself uses Lua for game scripting, and the standard form of Lua uses a VM.

there is a bitsy converter for Arduboy that could be improved.

bitsy is a great game engine with thousands of excellent games. and I have a plan to make a bitsy interpreter for ESPboy this year.

1 Like

Did they put a specification anywhere?
I’ve looked for one in the past but I don’t think I ever found a formal (or informal) specification, just some brief instructions giving an overview.

there is no exact specification.
but the principles are simple and the source code of the bitsy script is quite clear.
It is very convenient to check the functionality of a particular function directly in the online ide bitsy.

1 Like

That’s a really scummy thing for them to do, that’s why weekly or at least monthly progress updates, maintaining gantt charts and having them work from a cloud account/git that you hold are important especially for subcontract work. It would’ve at least have caught the thief earlier and cut them off.

It reminds me of Pico-8 a little bit. But perhaps a bit more advanced?

I was busy in China and extended my trust further than I should have, hard lesson to be learned. I don’t really want to go into too much details but this was also someone I thought was my friend of more than a dozen years.

Anyways, if y’all can put together something that works like this with the emulator would be amazing. One of my investors has pushed me for a block like scratch.

there are:

and

I think the mblock might even have a target for the leonardo? But no oled driver I think?

But adding sprite and music editor to something like this and be available in an online and app based emulator/simulator would be the ultimate form of Arduboy. I just lack the technical knowledge to put that together. I wouldn’t even know enough to hire people for it, that’s why I felt like I was in a good position before since I had someone who knew what it needed more than I did at the time. But money and jealousy can change people, it’s really scary to watch sometimes.

3 Likes

Sorry to hear that, getting betrayed by someone you know and trust is worse than a stranger.

2 Likes

in this ArduBlock 2.0 we have English version, Leonardo, OLED 128x64, buttons, buzzer and much more.
it generates Arduino code from blocks ArduBlock | Block coding platform for teaching and learning coding
adding sprites tools will make it suitable for creating simple games

Oh interesting! If this can have like an Arduboy plugin mode or something would make it even easier!

1 Like

To be perfectly blunt, ArduBlock’s source code (assuming I’ve found the right one?) does not look promising…

  • It looks like they’re implementing function blocks as one class per function instead of having a generic function block.
  • They don’t appear to be using the visitor pattern to process the tree, they’re just using a single abstract toCode method.
  • The string blocks appear to be generating fixed-size 64-char arrays.
  • The ‘vector variables’ appear to be faking 1-indexing instead of using 0-indexing.

I mean, I don’t doubt it works, but I get the impression it’s going to waste memory and possibly produce some janky behaviour.

The bad news is that it seems implementing Arduboy2 would require one class per function (or creating some kind of generic function class, maybe), plus a bit of set up code to inject the #include<Arduboy2.h> and Arduboy2 arduboy;, but the good news is that theoretically it should be possible to autogenerate most of those functions with a few scripts/throwaway programs, and Doxygen might be able to provide the function lists needed.

Essentially you’d be looking at a metric ton of classes like this:

public class Arduboy2DisplayFunctionBlock extends TranslatorBlock
{
	public VariableStringBlock(Long blockId, Translator translator, String codePrefix, String codeSuffix, String label)
	{
		super(blockId, translator, codePrefix, codeSuffix, label);
	}

	@Override
	public String toCode() throws SocketNullException, SubroutineNotDeclaredException
	{
		return "arduboy.display();";
	}
}

(Or possibly something more generic. It’s late so I don’t have time to dig through all of it to see if it’s really necessary to have one function per class. It probably isn’t thinking about it.)

It pretty much only does that. But it would be a good start and allow people to make a lot of (similar) games.

The ‘scripts’ could be reduced to a number of common script templates which in turn could be pre-programmed on the Arduboy. But then you are starting to move away from what the Pulp editor offers.

Perhaps. It depends on how you interact with it and how the tiles could be manipulated.

You’re probably not going to be able to match it though.

Lua’s environment is too large to run on Arduboy (mainly because of dynamic typing, dynamic allocation and the use of hashtables), and if you write in C++ then you might as well use a proper IDE as use an embedded syntax-highlighted text window.

You could create a simplified version of C++ and then compile to C++, but that could get ugly, and really I’m not sure how much you could simplify it. The best I can imagine is using a Pascal dialect, and maybe adding some extra datatype inference or things like ensuring a variable is assigned before it’s first used.

A VM-based scripting language for the Arduboy would be possible, but I think it’s likely to be relatively slow. To make it faster you’d have to specialise it by making opcodes handle particular functionality, at which point you’re probably limiting the pool of games to an extent.

For comparison, the one I made for ShouHon has a mixture of stack manipulation instructions and special-function instructions (e.g. show text box, hide text box, print text; see the opcode list).

I think we are on different paths.

I was suggesting just using the JSON file that is saved from the Pulp editor to generate a game.

The game would be generated using the data withinthe JSON file to createthe bitmaps (in native Sprites format) - possibly including the frames it supports - and the map definitions into a predefined, compressed format. After all the levels are simply 20x15 matrices that point back to the sprites you have defined.

As all games look the same (maps with multiple rooms), the engine would already be written in C++ and would only have to read the data already extracted from the JSON file.

The inventory items is all standard stuff too. Pick things up, place into inventory, use them.

The biggest issue would be to work out how the enemies, inventory and player interact with each other. You could have different inventory ‘classes’, weapons, keys, etc and have their code already created in C++ …

Alternatively, the code could leave exit points where the user has entered some script allowing them to transpose the script into C++. If the application framework allowed you to easily access the map, the player, the inventory and the enemies it would not be too hard to allow them to ‘recut’ the code into C++.

/taweili/ardublock is a source code of ardublock.com I suppose.
ardublock.ru is based on the Google Blockly https://blockly.games , Blockly - Wikipedia

and as I see it is not difficult to add graph functions like here Microsoft https://arcade.makecode.com to provide fast games development IDE.

So is its source code available anywhere?


Yes, you could do that for the output of the tile editor if you had a suitable engine that could make use of the output, and possibly the music editor depending on the format, but doing it for the scripts would be much harder, if not impossible, hence why I was focusing more on the scripting issue.

You could, but the possibilities would be limited.

Without the flexibility of proper scripting, you’d more or less end up reskinning the same game, or having all the same mechanics with only variations in maps, dialogue and sprites.

I think I see what you mean. It could work, but the user would have to be wary about the size and efficiency of their ‘scripts’, and there would be a lot of potential for bugs and syntax errors.

The only major advantage I can see of that compared to editing the code in a normal code editor is that you’d be hiding the engine’s code from the person doing the editing. Though depending on how the engine actually works, there might be other advantages. E.g. if it’s also generating files as opposed to just editing them.

I was mainly trying to think of ways to do it by having the data end up on the FX chip rather than needing to recompile the game’s source code because it would be a lot easier and would lessen the restrictions because the FX chip can hold more data than progmem.

here is the code for the original blockly GitHub - google/blockly: The web-based visual programming editor.
arduclock.ru you can download here ArduBlock | Block coding platform for teaching and learning coding
there is a youtube video, on how to add blocks

and as i know Vitaly - the author of arduclock.ru is open for communication