Log In  
Follow
b3agz

Unity tutorial YouTuber. Dipped toes into the Pico water and fell in.

I'm posting this here because I'm not sure if it will get any more development, but this is a game I made for a 1-Bit weekend game jam (this one: https://itch.io/jam/1-bit-weekend). The game itself is "complete" in that there are no half-finished levels or artwork, it's just a little short due to the time constraints (it was a 3 day jam but work meant I only really had 2 days). Anyway, here it is. More info below if you're interested.

Cart #radtown0-0 | 2020-06-22 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5

The game and art was done entirely by me, and my partner in music projects put together some nice tunes (all the music was by him). You can find the Itch page here; https://b3agz.itch.io/escape-from-radtown. But to save you a click, here's the text from the page:

Radtown is a radioactive mess. I mean, really; it's in the name. You want out, but the city's high walls and inexplicable moat of radioactive waste makes escaping a little tricky.

But you have a special power.

Using a mysterious mirror you can shift into the, uhm, Mirror World...ok I'mma level with you. This game was created for a 3 day game jam and the story does't make a whole lot of sense. Just go with it.

The jam in question was Aspect Manufacture's 1 Bit Weekend, where the restriction was to create a game using only two colours (at one time) using at least one of the following themes;

Radioactive
Reflections
Dragons
So that's that. The controls are standard Pico controls (arrow keys and Z / X for actions), but there's a tutorial bit in the game. This was a lot of fun to make. It's not very long for obvious reasons, but I hope you enjoy it.

And, for those what might be interested, I also streamed the first couple hours of the jam,

P#78393 2020-06-22 14:39

What up fishes!

So, I'm new to Pico (mostly a Unity/C# person) and I've been getting my bearings this last week. I was looking into ways to get more game content out of fewer sprites. The most obvious way seemed to be using the same sprites but changing the colour palette. I did some searching and found a few posts where this came up but the only answer I found was to use pal() which unless I'm missing something, changes the screen palette, which affects every instance of that colour onscreen.

So, below is the solution I landed on. Is there a better way to do this? If so, pls halp.

(I've changed some variable names for clarity, I don't normally label things like this)

--Define a 2D array of colour indexes. C1 is the colour we're swapping, C2 is what we're
--swapping it to.
SecondarySpritePalette={
    {c1=14,c2=11},
    {c1=2,c2=3},
    {c1=10,c2=1},
    {c1=4,c2=5},
    {c1=15,c2=4}
}

--Draw sprite on screen using custom sprite drawing function that takes in the above array.
DrawSprite(SpriteID, XPos, YPos, PaletteArray)

function DrawSprite(n, x, y, c)

    --Get position of sprite within the spritesheet.
    local ycell=(flr(n/16))
    local xcell=(n-(16*ycell))

    --Loop through each pixel in the sprite.
    for lx=0,7 do
        for ly=0,7 do

            --Get the current pixel colour.
            col=sget((xcell*8)+lx,(ycell*8)+ly)

            --Loop through each colour in the palette array
            for i in pairs(c) do

                --If the current pixel matches C1, swap it for C2 and break
                --out of this loop.
                if col==c[i].c1 then
                    col=c[i].c2
                    break
                end
            end

            --Only draw the pixel to screen if it is not 0 (or whatever colour we
            --want to be transparent.
            if not(col==0)then      
                pset(x+lx,y+ly,col)
            end
        end
    end
end

The above code works (see below) but feels a bit... messy.

P#77125 2020-05-24 13:34

Follow Lexaloffle:        
Generated 2021-05-16 11:57:19 | 0.071s | Q:10