[Game]Pine-2K - A Fantasy Console For Pokitto

The performance should be good as the program is compiled to Asm on-the-fly before executing

3 Likes

Unfortunately, compiling to asm alone does not guarantee performance. It may need some 2K stress testing for the greater glory of science :grin:

5 Likes

If only we knew someone with such experiences and expertise :smirk::wink:

More simplicity, yes please :slight_smile: <3 Made my day.

7 Likes

Really nice mini games and great artwork!

6 Likes

13 posts were merged into an existing topic: [Tool]FemtoIDE

Pine-2k v1.3.0

This update fixes a whole lot of bugs. Many thanks to @carbonacat, @filmote, @SkyBerron, @tuxinator2009 and @Vampirics!

It wasn’t just bug-fixes, though:

  • The compiler now produces smaller code, so fitting your game logic in 2kb might be a little bit easier.
  • Text and Sprites can now be scaled by 2.
  • RTC support. Snake example now shows the time in the HUD.
  • More built-in images.
  • The language now supports operator precedence. Your code doesn’t (have (to (be so) (lispy)) (anymore)).

For more information, see the included markdown files and the examples.

8 Likes

As i didn’t have much time yet (a lot of projects on twitter and youtube and with my daughter i promised), i couldn’t try Pine until today. Couldn’t start it with Kraken Loader and thought it has to be a stand alone application maybe?

Did you remember to put the necessary files on the SD card? Pine needs the sd card

1 Like

Good question, i took the zip and opened it on the sd

Pine-2K v1.4.0

There is no longer an “SDK version” and a “Non-SDK version”. To avoid mix-ups, both bins have been merged into one.
A simple code viewer has been added. Press C+A to view a project’s src.js file. This viewer is also used to display error messages.
Pressing C+B will toggle “Dev Mode”, which takes a bit longer to compile but is much more useful for finding out why a game is crashing.
On the subject of crashing, there should be much less of it.

6 Likes

So, what kind of built-in gfx you all have been able to find in Pine2k :wink: ?

3 Likes

A bug:

  • if you have a “.git” folder in your game root folder, the resource buiding in Femto fails with “Error: EISDIR: illegal operation on a directory, read”
1 Like

How does the color selection work in the integrated gfx editor in Femto? If I choose the orange color in the gfx editor, it appears as yellow in the game.

There seems to be a off-by-one-row error in the returned bitmap pointer with the io("TILE") command.

    for(var i=0; i<27;i++)
    {
        bm=io("TILE", i+1, 19);
        tile(i,19, bm);
    }

I call the above function each time after shifting the tilemap 8 pixels. That is to move tiles to the left. So it cumulates the error as seen in the anim-gif.
PINE-SDK.bin.2

The first 2 bytes of a tile image are unused and the second two are the width and height of the image. When using io("TILE", x, y) however the returned pointer points to the first pixel. I discovered this when storing some additional information in the 2 unused bytes for my custom tiles.

Simply change it to

for (var i = 0; i < 27; ++i)
{
    bm=io("TILE", i + 1, 19)-4; //either subtract 4 from io here
    tile(i, 19, bm); //or subtract 4 from bm here
}

That’s interesting … I wonder what @FManga had in mind for those two unused bytes?

Its so that the tile images and sprite images are identical. For sprite images the first byte seems unused (most likely to align everything to 4 bytes), the second byte specifies the bit depth (1, 2, 4, or 8) and the third and fourth specify the width and height. Originally the tiles only had the width and height since tiles have to be 8bpp but it was changed to make them identical to sprite images. However, @FManga confirmed that pine2k simply adds 2 to the pointer supplied to the tile() function and so the first two bytes are unused.

Right. I forgot about the colour depth being encoded in the image itself. I guess it makes perfect sense to align the format.

Oops, I’ll make it subtract the two bytes in 'io(“TILE”)`.

It’s not just for alignment, it’s used for recoloring. If an image is 1bpp or 4bpp (like the symbols in the flash games), the index of the first color is stored in that first byte.

1 Like