Log In  
BBS > Lexaloffle Community Superblog
This is a combined feed of all Lexaloffle user blogs. For Lexaloffle-related news, see @zep's blog.

All | Following | PICO-8 | Voxatron | General | Off-site
[ :: Read More :: ]

Playable level demo

Cart #basic_walk-0 | 2020-11-29 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3


Just music
Cart #teygozoru-0 | 2020-10-13 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3


Super Mario World Athletic Theme (based on a song by ipi on forums.famitracker.com and the original song by Nintendo's Super Mario World).

P#82898 2020-10-13 20:59 ( Edited 2020-11-29 04:40)
[ :: Read More :: ]

no, I'm not referring to giving the do in for loops and while loops a free pass. rather, I'm referring to the rarely-used naked do block. the primary function of the do block by itself is to arbitrarily introduce a new scope. for example, a code snippet I just wrote:

do
 local yclp=127-17*pizzapower
 clip(104,yclp,127,127)
end

this makes it clear to the reader that I do not intend to use yclp at any other point in the program. In this case, it becomes fairly obvious that I lifted an inline expression to its own line for clarity's sake. however, the do construct here eats up a token, making using it disadvantageous. considering that the do block's only real use has to do with usage of local variables, and the local keyword already has its cost annulled to encourage its use, I think it would make sense if there was a similar exception for the by-itself do block. what do all of you think?

P#82897 2020-10-13 20:54 ( Edited 2020-10-13 20:56)
[ :: Read More :: ]

Cart #sneeze-0 | 2020-10-13 | Code ▽ | Embed ▽ | No License
6

P#82882 2020-10-13 16:29
[ :: Read More :: ]

Cart #snail-9 | 2021-08-13 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
191

A Snail!? Who woulda thought!

You play as Snail-Chan, and are tasked with defending the Dream castle! You can run, jump, thwack enemies, and use stars you collect for special powers!

inspired by the musician Snail's House

Finally Finished! Thanks everyone for playing the game.

Oh, and feel free to modify and remix this.
You can change the map to whatever you want. There's a big table at the start of the cart that stores all the level data like enemies and doors, where on the map the level is, and the background and effects the level has.

Make some cool levels!

https://floofinator.itch.io/pico-snail

Changes

  • Now only lose one star when hit
  • removed some annoying enemies from levels
  • changed sprite for salt to look more dangerous
  • Added a new speed run timer that activates if x is pressed on start screen
  • removed aiming and instead made all attacks centered
  • made level changes to accommodate new attacks
P#82864 2020-10-13 04:17 ( Edited 2021-11-18 21:50)
[ :: Read More :: ]

What I'm thinking is a true crossover of the greatest DIY gaming projects. Have you ever heard of the Pinbox 3000? It's a kit that you customize to create your own compact pinball machine. It's made from cardboard and is completely analog. Last time I checked, the creators did have some videos about possible projects for rigging up an electronic score system.

What I was thinking of is maybe using a Pi to run PICO-8 underneath the playfield. You could map the traditional player 1 and player 2 controller inputs to various targets and bumpers, as well as to the bottom of the table for triggering a ball loss event.

You could hook up your Pi to a TFT to run animations triggered by combos, plus to track scores and balls remaining.

Does this sound like a cool project idea? Has anyone done something similar before?

P#82852 2020-10-12 21:01
[ :: Read More :: ]

Cart #colourful_life-0 | 2020-10-12 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

I made this Conway's Game of Life clone last night as I was procrastinating other work and I think it turned out quite well. The 'innovation' here is that any cell that's on the board more than one 'frame' cycles its colour, making the board a bit more interesting.

Shoutout to this tutorial that helped me with camera and summing issues.

How will I turn this into a real game? I still don't know. But I will try and update you guys when I do :D

P#82829 2020-10-12 07:25 ( Edited 2020-10-12 07:26)
[ :: Read More :: ]

Hi! I am looking for a pixel art tutorial specific to PICO-8’s restrictions.

My students start to create sprites and tile sets. I would like to help them make something great. Of course there are lots of pixel art tutorials online, but they are nearly always about larger sprites, 16x16 or greater. Good stuff, but mostly frustrating if you try to apply that to 8x8 sprites.

I guess there is a lot to be said about …

  • dealing with only 8x8 pixels
  • how to use the 16 color palette
  • how to create depth
  • how to design a tile set for creating interesting maps
  • how to avoid repetition

Has anybody ever tried to write that down? Or made a video? I‘ve looked through all PICO-8 resources, tutorials and magazines I could get a hold of – and that’s a lot! – but I could not find anything suitable.

Any ideas?

P#82826 2020-10-12 07:05
[ :: Read More :: ]

Cart #hdarohene-0 | 2020-10-11 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

My implementation of the "Lander" game from the "Game Development with Pico-8" zine by Dylan Bennett.

zine: https://mboffin.itch.io/gamedev-with-pico-8-issue1

P#82810 2020-10-11 22:04 ( Edited 2020-10-11 22:28)
[ :: Read More :: ]

Cart #starship-2 | 2021-05-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
14

About

Starship is my third Pico-8 game, and is influenced by old single screen ZX Spectrum games like Manic Miner, Jet Set Willy, and Jetpac. Gather all the ship parts scattered about each of the 20 stages. Take them back to your starship for repairs to transcend into outer space!

Tips

  • Skillful play will spawn a cosmic flower. Kneel before the cosmic flower to attain the gift of the cosmos.
  • Chasing score will make the game more difficult.
  • Don't tread on the worms!

Downloads

Downloads for Windows, Linux, OSX, and Raspberry Pi can be found on my itch.io page:

https://exq-bytes.itch.io/

Updates

v1.0 - Initial release
v1.1 - Added stage select
v1.2 - Fixed a couple of bugs and added a new cart label

Request

If anyone is able to complete the game, please reply in this thread. I'm interested to see if I maybe went too far with the difficulty on some of the later stages. During testing, I was able to complete each individual stage without losing a life, but doing all 20 in one session will be quite the challenge!

P#82807 2020-10-11 21:32 ( Edited 2021-05-09 14:52)
[ :: Read More :: ]

Cart #wezemogowo-0 | 2020-10-11 | Code ▽ | Embed ▽ | No License
2


This is my second published Pico-8 cartridge. It shows a near-perfect (in collision detection, not in the way it works) tiny collision detection function for a square. It can be expanded to any arbitrarily-sized rectangle. A square was chosen for simplicity.

There is no doubt in my mind that this can be improved upon. You know what, there's probably a way better, super obvious way that I glanced over.

I don't recommend using this for any of your games, as it has a blazingly obvious issue: You can't go into anything that isn't a black pixel. Also, due to the way it detects the pixels, it cannot detect sprites/map tiles that are smaller then a square.

The only reason I made this was to see if I could make a collision detection system that didn't use:

  • Rocket science
  • Quantum physics
  • Carts that use coding like this video
  • just kidding about most of those
    I included the code so you can see how short it is (yes this is the entire cartridge's code)
    px=64 py=64
    function collision()
    collr1=pget(px+8,py)
    collr2=pget(px+8,py+7)
    colll1=pget(px-1,py)
    colll2=pget(px-1,py+7)
    collu1=pget(px,py-1)
    collu2=pget(px+7,py-1)
    colld1=pget(px,py+8)
    colld2=pget(px+7,py+8)  
    end
    function _update()
    cls()
    map(0,0,0,0,16,16)
    collision()
    spr(1,px,py)
    if btn(0) and colll1==0 and colll2==0 then px-=1 end
    if btn(1) and collr1==0 and collr2==0 then px+=1 end
    if btn(2) and collu1==0 and collu2==0 then py-=1 end
    if btn(3) and colld1==0 and colld2==0 then py+=1 end    
    end
P#82804 2020-10-11 20:17 ( Edited 2020-10-12 22:36)
[ :: Read More :: ]

Cart #tepigiyaga-1 | 2020-10-24 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3


new version adds enemies, 10 levels to complete.



Cart #sehofebari-0 | 2020-10-11 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3


Cart #tepigiyaga-0 | 2020-10-13 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3



previous version

This is a unfinished version to see the finished version see: https://www.lexaloffle.com/bbs/?tid=40244

Hi this is my first attempt at making a game. I'm feeling mixed opinions. I was hoping to do a clone of a snakes game called Crazy Snakes from the Amstrad CPC (by Fraggle and Duck). However I feel like the 128x128 grouping is just too small for this type of game, especially if I use 8x8 sprites.

What would you do to improve the gameplay. I've only done three levels so far. I wanted to add in enemy snakes and one other type of enemy like the game I'm emulating. I've also not added in any of the bonus items such as extra lives, or a snake shortener.

So first impressions of pico8. Love the music editor, its not your fault I'm crap with that. Love the map editor, and the sprite editor. Little disappointed in the fixed palette but It isn't too bad and makes me more creative.

But I am disappointed in the 128x128 resolution. It just seems too much of a restriction. When using 8 bit computers in the past the resolution I had available was 320x200 which is a huge amount more.

What do you think? Is this just me not using screen estate effectively?


Okay it was me not using the screen estate well.

Okay I tried a version with 5x5 sprites and I'm a lot happier with it.

This leaves that I can have more speed and more complicated setups, and more length. Though for the early levels the big version was better.

P#82800 2020-10-11 14:47 ( Edited 2020-11-07 22:30)
[ :: Read More :: ]

I was setting up PICO-8 on a raspberry pi on my TV, and I thought to myself, "Wouldn't it be nice if I could use my phone as a controller?". Obviously not ideal for games where tight controls are necessary, but a perfectly valid use case for slower or turned-based games.

Enter in Unified Remote!

At it's core, Unified Remote allows you to turn your phone into a remote, and it comes bundled with a bunch of remotes for various applications. However, I couldn't find anything that worked with PICO-8 out of the box. So I took it upon myself to create a custom remote.

This tutorial will assume you are running PICO-8 on a raspberry pi, and does not go into the setup of that piece.

First, you'll need to install the Unified Remote Server on your raspberry pi:

wget -O urserver.deb http://www.unifiedremote.com/d/rpi-deb
sudo dpkg -i urserver.deb 
rm urserver.deb 

Next, you'll need to setup Unified Remote Server to run as root whenever your pi starts up:

sudo modprobe uinput # just in case this hasn't been loaded yet

Modify /etc/rc.local (as root) and add the following somewhere before the "exit 0":

/opt/urserver/urserver-start &

Now, when you reboot your pi, Unified Remote Server should start up automatically.

Next, you'll want to add the custom PICO-8 controller that I've put together (feel free to tweak it to your needs using the Docs). To do this, you'll need to create a directory for custom remotes. For me, this was /opt/urserver/custom (even though the documentation says otherwise). You may want to go to the Unified Remote Server Manager interface at http://yourpihostnameorip:9510/web/#/log and see where the logs say it's looking for custom remotes to be sure. So in my case:

sudo mkdir /opt/urserver/custom
sudo mkdir /opt/urserver/custom/pico8

# Set permissions to a user other than root, so it's easier to work with
# Substitute your user here (or don't do it at all and just use root)
sudo chown pi /opt/urserver/custom/pico8
sudo chgrp pi /opt/urserver/custom/pico8

Then, you'll want to put the following files in the new pico8 directory:

meta.prop

meta.name: PICO-8
meta.author: John Langewisch
meta.description: Gamepad for PICO-8
meta.tags.category: gaming

layout.xml

<?xml version="1.0" encoding="utf-8"?>
<layout orientation="landscape" scroll="none">
  <row weight="1">
  </row>

  <row weight="6">
    <space weight="1"/>

    <grid color="#84769C" weight="4">
      <row>
        <space/>
        <button icon="up" ondown="core.keyboard.down,up" onup="core.keyboard.up,up"/>
        <space/>
      </row>

      <row>
        <button icon="left" ondown="core.keyboard.down,left" onup="core.keyboard.up,left"/>
        <space/>
        <button icon="right" ondown="core.keyboard.down,right" onup="core.keyboard.up,right"/>
      </row>

      <row>
        <space/>
        <button icon="down" ondown="core.keyboard.down,down" onup="core.keyboard.up,down"/>
        <space/>
      </row>
    </grid>

    <space weight="1"/>

    <grid weight="4">
      <row weight="2">
        <button image="logo.png" scale="fit" color="transparent"/>
      </row>

      <row weight="1">
      </row>

      <row>
        <space weight="1"/>
        <button text="SELECT" weight="6" ondown="core.keyboard.down,escape" onup="core.keyboard.up,escape"/>
        <space weight="1"/>
        <button text="START" weight="6" ondown="core.keyboard.down,enter" onup="core.keyboard.up,enter"/>
        <space weight="1"/>
      </row>
    </grid>

    <space weight="1"/>

    <grid weight="4">
      <row weight="3">
      </row>

      <row weight="4">
        <button icon="select" color="#FF6699" weight="2" ondown="core.keyboard.down,z" onup="core.keyboard.up,z"/>
        <space weight="1"/>
        <button icon="docclose" color="#FFCCAA" weight="2" ondown="core.keyboard.down,x" onup="core.keyboard.up,x"/>
      </row>

      <row weight="3">
      </row>
    </grid>

    <space weight="1"/>
  </row>

  <row weight="4">
  </row>
</layout>

icon.png (I just took the PICO-8 icon)
logo.png (I just took the PICO-8 logo)

Once you've added those files under /opt/urserver/custom/pico8 you should be able to restart the server to load the new remote either through the web UI, or by running:

/opt/urserver/urserver-stop
/opt/urserver/urserver-start

If things don't seem to be working, you can go to the web UI and check the logs for issues.

Now, you'll need to download the Unified Remote app to your phone (I paid for the full version, but it shouldn't be required). When you start the app, it should automatically find your server. Hopefully, when you add a new remote, and open the Gaming category, you should see your new PICO-8 remote. Add it, select it, and you should be able to control PICO-8 while it's running on your pi!

A few caveats:

  • The files assume american style keyboard, feel free to tweak the buttons in the layout if that's an issue.
  • I have the layout set to landscape orientation, but apparently Unified Remote doesn't respect that. I have to turn on screen rotation and make sure I'm in the correct orientation for it to look decent.
  • I had some issues with the Unified Remote app picking up changes made to the meta.prop file. Clearing the app data, and starting from scratch solved it.
  • I am using the wifi data connection for Unified Remote. This obviously relies on semi-decent network speeds to be responsive. Apparently there's also bluetooth connection, but I have not attempted that.
  • "Select" is Escape, "Start" is Enter. Again, tweak to your heart's content.

Hopefully this is useful to folks!

P#82795 2020-10-11 06:09 ( Edited 2020-10-11 06:23)
[ :: Read More :: ]

Hey all! I'm trying to find a code editor, or code editor extension, that can highlight matching pairs such as function/end, for/end, if/end, etc. - similar to how most code editors will highlight matching parentheses or brackets.

I haven't really gotten the hang of proper indentation yet, and I'm having trouble troubleshooting nested bits of code where I end up with the wrong number of "end"s at the end!

Except for this issue, Brackets and Visual Studio Code have both worked nicely for me so far. Simple/lightweight programs are preferred if possible.

Any suggestions, even of what terms to search for, are greatly appreciated! Thanks for helping me with this total amateur question!

P#82781 2020-10-10 20:05 ( Edited 2020-10-10 20:06)
[ :: Read More :: ]

Cart #spajukuro-0 | 2020-10-10 | Code ▽ | Embed ▽ | No License
1

made this little test and while you can only set one
cartdata address you can use run() to do it again with breadcrumbs
and such. this is both a stupid way to store data and the biggest
brain way possible. does anyone think this is a bug?

P#82773 2020-10-10 13:15
[ :: Read More :: ]

I love the Pico8, but I have to admit I find the user interface for actually making stuff really hard to use, and the font went too far in trying to be small instead of easy on the eyes and readable.
And I was just wondering, in general, if there were any plans for a "Super" version of the Pico8, with a larger font, larger resolution, expanded colour palette, etc, and maybe some OOP stuff instead of being purely functional.

P#82772 2020-10-10 12:43
[ :: Read More :: ]

Cart #hayodasuy-0 | 2020-10-10 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4


Hi everybody.

This is my first offering. I thought I'd share some of my hacking around making a 3d rotating object. Currently can make a cuboid with length, width, height and rotate around x,y,z axis using the arrow and 'z' 'x' keys.

I've been working at making classes so that I can easily extend the shapes I can create.

Let me know what you think.

P#82768 2020-10-10 10:08
[ :: Read More :: ]

Is there any difference in performance between doing this

player = {
 update = function(self)
  -- do things
 end
}

and

player = {}

function player:update()
 -- do things
end

Thank you!

P#82765 2020-10-10 07:55
[ :: Read More :: ]

Hey, all. I picked up PICO-8 in the Itch bundle a couple months ago. Finally got around to poking at the PICO-8 and I love what I'm seeing. The idea of the picture being the cartridge is just something that brings back the feels.

Reminds me of the old days, manually typing in games from a book. A whole weekend spent programming Star Trek only to find out that I had the wrong version of BASIC.

Anyway, I hope to get going with game design soon. My history in that field is in the tabletop space, so going digital is a whole new thing for me.

Quick question, but is there a way to make map screens connect to one another to simulate a cube? I am thinking about doing a pseudo-3D space shooter.

P#82756 2020-10-10 02:56
[ :: Read More :: ]

Cart #picuno-1 | 2021-07-24 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
10

A simple UNO clone with some AI.

Z/Circle: Play card
X/Cross: Call UNO (on yourself defensively or on others offensively)

Arrows to move the cursor.
Press Up to move the cursor to the deck (so you can draw a card).

Revision 1 Bugfixes:

  • Fixed a bug where debug controls to draw cards without spending your turn were left in.
  • Fixed a bug where the game would crash if more than one AI player attempted to call UNO at the same time.
P#82754 2020-10-10 00:14 ( Edited 2021-07-24 15:21)
[ :: Read More :: ]

*edit 2: 0.2.3 has a built-in way to do this with tostr

edit: see downthread for a better function

I was thinking about high scores in PICO-8 a while ago and it occurred to me that they'd make more sense as unsigned 32 bit integers than 16b.16b fixed point decimals. The easy part in that case is adding points - simply increment in units of 0x0.0001 instead of units of 1 - but if it's a high score, I'd also like to be able to display it.

Thus:

function tostr_u32(n)
    -- return n as a 32-bit uint
    -- 92 tokens, ~1/780 of a 30 FPS CPU per call
    -- " " as thousands divider

    -- calculate ones
    -- (0x.03e8 = 1000 * 0x0.0001)
    local s=tostr(shl(n%0x.03e8,16))
    if n>0 then
        n/=1000
    else
        -- if not-actually-a-sign-bit is set
        -- have to be a little tricksy

        -- splitting in half
        --  n&0x0.ffff lower
        --  lshr(n,16) upper
        -- upper half unit = 65 536
        -- so within thousands:
        local m=536*lshr(n,16)
        m+=n&0x0.ffff
        -- originally used
--      local m=536*lshr(n,16)+n&0x0.ffff
        -- but that returned wrong results
        s=tostr(shl(m%0x.03e8,16))
        -- and doing the division by
        -- 1000 in two steps:
        n=lshr(n,1)
        n/=500
    end

    while n~=0 do
        while #s%4~=3 do
            -- pad with zeros
            s="0"..s
        end
        s=tostr(shl(n%0x.03e8,16))
            .." "..s
        n/=1000
    end

    return s
end

I'm sure this could be minimized further and/or optimized further and/or made more general, but I'd be willing to use it as is so I figured I'd share.

P#82745 2020-10-09 19:53 ( Edited 2021-09-10 12:40)
View Older Posts