Log In  
Follow
Werxzy
[ :: Read More :: ]

Cart #grid_wallpaper-0 | 2024-04-11 | Embed ▽ | License: CC4-BY-NC-SA
6

Made a wallpaper that can react to mouse position and movement. It uses some userdata stuff that I've shared before. There's extra settings inside _init(), which I've set to be a bit mild to make the effect less distracting.

Other line options

P#146368 2024-04-11 15:28

[ :: Read More :: ]

Cart #solitaire_suite-2 | 2024-04-04 | Embed ▽ | License: CC4-BY-NC-SA
124

load #solitaire_suite

no sound currently added

Release 0.1.0

After constently working on it since picotron 0.1.0, I'm finally releasing Picotron Solitaire Suite (0.1), which is designed to allow adding new variations of solitaire. Thanks to anyone whose been following the updates and joining the streams. Also thanks to Louie Chapman for his contributions (2 solitaire variants, a card back, and helping test that it actually works.), SoundDotZip for the aseprite to picotron image plugin, and Fletch for an animated card back.

The suite currently has 6 solitaire variations

  • Klondike Solitaire
  • Solitaire Too
  • Golf Solitaire
  • Spider Solitaire

2 of which were made by Louie Chapman

  • Huntsman Solitaire
  • Trapdoor Solitaire

I didn't include any sounds, as it's a bit difficult for me to manage the sfx editor currently. Also, with the current web player having glitchy audio in the current version, I didn't see it as necessary for the first release. I'm open to people contributing their own card backs, audio, or game variant if they are high enough in quality and are fitting for the game. Though I will recommend having a git repository for any contributions as it will be much easier to manage.

I think appdata is currently only accessable for the standalone version of picotron (unless I'm doing this wrong), so saves and custom games on the BBS will not work right now.

Custom Stuff

To create a solitaire variant or custom card back, I would recommend looking at the README in the Solitaire Suite git repository for better details. While the suite is being released under CC BY-NC-SA 4.0, the api for handling the cards is released in a separate repository with the MIT license to allow for more freedom of its use. Feel free to send any pull requests for either for improvements you see. And while I won't include every card back or game mode made for this, I might make a list here or in the repo containing a list of them.

[ Picotron Solitaire Suite git repository ]
[ Cards API git repository ]

Picotron Solitaire Suite uses submodules so you will likely need to do git submodule init then git submodule update. Though someone may know a better way of doing this. Please only submit pull requests to the dev branch.

Any custom game variants or card backs can be added inside their respective folders inside /appdata/solitaire_suite/. There is currently no super simple way to drag and drop files without going into appdata.

After 0.1.0

After 0.1, I will be mostly switching to a previous project to finish it before working on version 0.2, though I will still add small improvements or fix bugs if any are discovered. In 0.2, I will look to improve the following:

  • add functions to handle holding cards in hand
  • add transitions for switching from and to game variants
  • improved card generation for different card sizes.
  • music and sounds??? (could have a cassette player to allow cycling through songs)
  • improve function names (kinda bad when stack is both a noun and a verb)

Changelog

Version 0.1.1

  • Fixed grammar and wording of some rules text.
  • Fixed new game in trapdoor solitaire sometimes not dealing the cards.
  • Fixed double clicking aces in spider solitaire getting stuck.
  • Fixed huntsman card positioning when shuffling for a new game after emptying the deck.
  • Fixed buttons being pressable while shuffling or any animations were playing.

= api changes =

  • Updated stack dropping to search a slightly wider area for which stack to place the cards on.
  • Added stack_collecting_anim and stack_shuffle_anim functions to simplify the reset process.
  • Updated shuffling a bit to better randomize the cards.

0.1.1b

Fixed error or bug that would occur when double clicking a card in trapdoor solitaire.

P#145162 2024-03-30 20:31 ( Edited 2024-04-04 22:52)

[ :: Read More :: ]

Cart #shmup_1k_werxzy-0 | 2024-02-23 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

After seeing LokiStriker's and Achie's shmups made in 1024 compressed bytes, I wanted to give it a go.

Here's the uncompressed source code.

--1k shmup
--werxzy

-- enemy data
ty=split("⁶:425affffe7662400,0.01,0,7,0,0.3,0,-0.0001,2,5,5`⁶:425affffe7662400,0.01,0,7,0,1.1,0,-0.01,1,3,3`⁶:22227f7f2a361c08,0,0,9,0,0.3,0,0.02,4,1,3`⁶:425affffe7662400,0,0,13,0,0.1,0,0,3,30,20`⁶:3c42bdbdbda5423c,0,0,5,0,0.25,0,-0.0005,5,20,25","`")
-- bullet data
bty=split("●,1,0,0,0.8,1,60`✽,1,-15,15,0.4,3,200`✽,0,-120,10,0.4,7,100`\feミ,0,0,180,1,2,20`✽,1,0,36,1,10,30","`")
cartdata"shm1k_werx"
function _init()
    en,bul,pb,px,py,ph,pi,pc,sc = {},{},{},64,80,3,0,0,0
end

function _update60()
    cls()
    if ph ~= 0 then
        -- spawn regular enemy
        if t() % 2 == 1 then
            e=add(en, split(ty[rnd{1,2,3}]))
            e[7]=rnd(e[2])-e[2]/2
            e.r,e[2]=rnd(20),rnd(100)+10
        end

        -- spawn boss enemy
        if t() % 20 == 1 then
            e=add(en, split(ty[rnd{4,5}]))
            e.r,e[2]=rnd(20),64
        end

        -- player movement and drawing
        p_=btn(4)and 0.5or 1.2
        px+=(tonum(btn(1))-tonum(btn(0)))*p_
        py+=(tonum(btn(3))-tonum(btn(2)))*p_
        px=mid(px,120)
        py=mid(py,120)
        ?(pi%20<=10and"⁶:081c362a7f7f3614"or""),px,py,11
        -- player fires
        if pc<=0 and btn(4)then
            pc+=10
            add(pb,{"⁶:1c3e3e1c1c080800",px,py,3,0,-3.5,0,0})
            ?"\as3i7gc",0,0
        end

        -- update bullets, and enemy ships
        for t in all{pb,en,bul} do
            for o in all(t) do
                o[2]+=o[5]
                o[3]+=o[6]
                o[5]+=o[7]
                o[6]+=o[8]
                if(not col(o,0,0,128,128))del(t,o)
                if o.r then
                    o.r-=1
                    if o.r<0then
                        b=split(bty[o[9]])
                        o.r=b[7]
                        nb(o[2],o[3],unpack(b))
                    end
                end
                ?unpack(o) -- draws ship or bullet
                 -- check player collision with enemy ships or bullets
                if pget(px+3,py+2) ~= 0 and pi==0 and t ~= pb then
                    ph-=1
                    pi=90
                    if(t==bul)del(t,o)
                    ?ph==0 and "\a<i6g1g2g1g2g1g2g1" or "\a<i6g1",0,0
                end

                if t==en then
                    -- check collision with each bullet
                    for b in all(pb) do
                        if col(o,b[2],b[3],5,5)then
                            del(pb,b)
                            o[10]-=1
                            ?o[10]==0 and "\a<i6g1g2g1g2g1g2g1" or "\a<i6g1",0,0
                            if o[10]==0 then
                                del(t,o)
                                sc += (o[11]>>16)*50
                            end
                        end
                    end
                end
            end
            if t == pb then
                pset(px+3,py+2,0)
            end
        end

        for i = 1,ph do
            ?"♥",i*6,118,8
        end

        -- high scores
        ?tostr(sc,2),6,1
        ?tostr($0x5e00,2)
        poke4(0x5e00, max($0x5e00, sc))
        -- cooldowns
        pi = max(pi-1)
        pc = max(pc-1)
    else
        ?"game over\n"..tostr(sc,2),50,50
        if(btnp(5))_init()
    end

end

function col(o,x,y,w,h)
    x-=o[2]y-=o[3]
    return x<8and x+w>0and y<5and y+h>0
end

-- bullet generation function
function nb(x,y,ch,pt,as,ad,sp,c)
    a=atan2(px-x,py-y)*pt+as/360
    for _=1,c do
        add(bul,{ch,x,y,8,cos(a)*sp,sin(a)*sp,0,0})
        a+=ad/360
    end
end
P#141804 2024-02-23 02:23

[ :: Read More :: ]

I've been working on a table to binary converter that can help compress data and store it in cart rom. I know there have been different attempts in the past, but this version aims to fit only the necessary data and leaves the types to a format string. Though it's only really useful if you have some of the following.

  • A lot of data in tables
  • A consistent and known table format
  • A variety of table formats
  • Multiple carts

It works by taking in a table, a writing address, and a format, that generally look like this

tab = {1,2}
form = "[#8,#8]" -- an indexed array of 2 unsigned 8-bit integers
-- form = "[#4,#3]" -- also works with a different number of bits (up to 16)
tab2bin(tab, 0x8000, form) -- compress table to binary at 0x8000
tab2 = bin2tab(0x8000, form) -- decompress table

Though if a table can a varying number of entries, so it instead it would be better to loop through entries.

tab = {1,2,4,8,16,32,64,128}
form = "[#8(#8)]" -- can have up to 255 entries due to looping through (#8) a number of times read from the previous #8

There are also ways to store values that are expected to have decimals or be in a different range

tab = {-10, 1.25, 0x1234.5678}
form = "[#8-128,#8>4,#16>16@dec#16+dec]"
-- "-" subtracts from the read value 
-- ">" shifts the read value right
-- #16>16@dec#16+dec reads the first 16 bits and last 16 bits of a full fixed-point number and stores them in 32 bits

There's also support for strings, booleans, tables with keys(though not mixing them with indexed tables), and custom compression/decompression functions.

The table to binary (tab2bin) compression function is about 913 tokens. While the binary to table (bin2tab) decompression function is about 536 tokens. However, some of the lines of code can be removed to reduce the token count. I would recommend storing your data in a string format initially, only using tab2bin when packing the data for the final carts, and only using bin2tab in the final carts.

https://github.com/Werxzy/tab2bin

The full source and more details are on the github page, since there may be changes in the future. Feel free to send any issues or pull requests to help improve it.

P#139161 2023-12-25 15:54

[ :: Read More :: ]

Cart #sb_1800_v1-2 | 2023-10-18 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5

I recently finished a game for the Cre8 Jam. You control a robot through commands to move through and scan a 3d environment. I would have added a bit more or fixed it up better, but I'm about out of time for the jam and really low on tokens. Even after using special functions to lower the token count.

You can get more information through the HELP command, but the main commands are:

MOVE (direction) (amount)
TURN (left/right) (amount)
WAVE
SWITCH [name]
SCAN (dot size)

And another important one is RSCAN, which is just SCAN, but repeatedly scans.

I would highly recommend checking out the itch.io page, as its design is special for this game.
https://werxzy.itch.io/sb-1800 The source code for the game and the map editor are also available on the itch.io page.

After an update you can now use controller inputs

MOVE - up/down
TURN - left/right
WAVE - X
SWITCH - O

SCAN is automatic

Saved data is shared between the Command and Controller modes.

P#135093 2023-09-29 08:48 ( Edited 2023-10-18 22:23)

[ :: Read More :: ]

Cart #slime_light-3 | 2023-08-29 | Code ▽ | Embed ▽ | No License
17

I just finished a game for a 1-bit game jam, requiring the use of only 2 colors . Slime's light is a small puzzle game that uses light and shadow to activate and deactivate doors and lamps. Unfortunately, I had to minify the code to make it fit into a single cart. You can access the unminified code on the itch page.

Controls:
Arrow keys - move
X - pickup / drop
Z - slow movement

P#133251 2023-08-19 03:42 ( Edited 2023-08-29 19:48)