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

Cart #another_3d_snake-0 | 2021-11-21 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
8

it's the game snake, but 3D, in 552 bytes! this lil thing was made for TweetTweetJam 7.

moving: steer with left/right - steering is also how you move forward, because you are a snake

growing: eating olives is how you grow longer, because you are a snake

losing: touching your tail with your face is how you start over, because you are a snake in a video game

if you grow your tail so long that your framerate suddenly reduces to garbage: you win!


the code is nonsense, since it's a tweetjam, but here it is!

p={0,0,0,0}b=0a=0g=0h=0::_::cls(15)w=btn()w=w%2-w\2%2m=w*w*2a+=w*.015p[3]+=m*cos(a)p[4]+=m*sin(a)q=p[3]r=p[4]g+=(q-g)/9h+=(r-h)/9b+=(a-b)/40s=sin(-b)c=cos(-b)for j=0,1do
for i=1,#p,2do
_=min(i,2)u=p[i]v=p[i+1]f=_+2if(1-j)*i>=5then
x=p[i-2]y=p[i-1]u-=x
v-=y
l=2/(u*u+v*v)^.5u=x+u*l
v=y+v*l
p[i]=u
p[i+1]=v
end
if abs(q-u)+abs(r-v)<30-_*10then
if i<2then
for j=1,36do
add(p,p[#p-1])end
p[1]=rnd(198)-99p[2]=rnd(198)-99
elseif i>40then
run()
end
end
u-=g
v-=h
u,v=s*u+c*v,c*u-s*v
k=99/max(150+v,1)circfill(64+u*k,34+60*k-j,5*k-j,f+j*5)end
end
flip()goto _
P#100576 2021-11-21 21:03

Cart #binominufe-0 | 2021-11-22 | Code ▽ | Embed ▽ | No License
1

Older Version:

Cart #fohezebaye-0 | 2021-11-21 | Code ▽ | Embed ▽ | No License
1

Made for #Seajam

P#100566 2021-11-21 18:23 ( Edited 2021-11-22 19:04)

O's Glory

Introduction

Hi, I am a student from Taiwan. I use my spare time to write programs, but my technique is not very proficient, and I am less creative, so feel free to be dissatisfied with my project. Just kidding...ha...

Credits

The Slime's sprite is from 'Slimey, Jump!' by Carlos Pedroso.
Main story planning is from 'Mea's Castle' by Astorek86
The idea of glass is from Celeste.
Glass' texture is from Minecraft.

Versions

0.14

Cart #osglory__-14 | 2021-12-06 | Code ▽ | Embed ▽ | No License
6

0.13

Cart #osglory__-13 | 2021-12-05 | Code ▽ | Embed ▽ | No License
6

0.12

Cart #osglory__-12 | 2021-12-05 | Code ▽ | Embed ▽ | No License
6

0.11

Cart #osglory__-11 | 2021-12-02 | Code ▽ | Embed ▽ | No License
6

0.10

Cart #osglory__-10 | 2021-12-01 | Code ▽ | Embed ▽ | No License
6

0.9

Cart #osglory__-9 | 2021-11-28 | Code ▽ | Embed ▽ | No License
6

0.8

Cart #osglory__-8 | 2021-11-27 | Code ▽ | Embed ▽ | No License
6

0.7

Cart #osglory__-7 | 2021-11-27 | Code ▽ | Embed ▽ | No License
6

0.6

Cart #osglory__-6 | 2021-11-23 | Code ▽ | Embed ▽ | No License
6

0.5

Cart #osglory__-4 | 2021-11-23 | Code ▽ | Embed ▽ | No License
6

0.4

Cart #osglory__-3 | 2021-11-23 | Code ▽ | Embed ▽ | No License
6

0.3

Cart #osglory__-2 | 2021-11-23 | Code ▽ | Embed ▽ | No License
6

0.2

Cart #osglory__-1 | 2021-11-23 | Code ▽ | Embed ▽ | No License
6

0.1

Cart #osglory__-0 | 2021-11-23 | Code ▽ | Embed ▽ | No License
6

The end.

P#100547 2021-11-21 13:17 ( Edited 2021-12-06 13:25)

Cart #fayubimeye-1 | 2021-11-21 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

A game to polish time

P#100536 2021-11-21 07:36 ( Edited 2021-11-21 07:39)

Usage (requires keyboard): Type text including control codes (\n, \f, \^, #, and more) live in your terminal and see the result displayed on screen...

You could also just edit a print() statement in a dummy cart and reload... but there's something about being able to edit color/spacing/etc 'live', especially for codes like + and \^v that can take a lot of trial-and-error tweaking.

In the comments below I have a larger utility cart version of this that includes help, save/load/export, and so on. But this first post is trying to pack a subset of that into 560 characters for TweetTweetJam.

p.s. The tweetcart it doesn't quite support all the P8SCII codes (no \a, |, -, and likely more), but the full cart in the comments supports most of them (still not \a).

P#100530 2021-11-21 06:38 ( Edited 2021-11-23 05:22)

I'm trying to use a breadth-first search on a grid for path finding. My code works for a grid of 7x7, and just barley for 8x8, but it runs out of memory at 9x9. I was just wondering if there was a way I could do things differently to keep the memory usage down.

function grid:findpath(src,dest)

 function buildpath(node)
  local path={}
  local current=node
  while current do
   add(path,current,1)
   current=current.parent
  end
  return path
 end

 local dirs={
  {x=-1,y=0},
  {x=1,y=0},
  {x=0,y=-1},
  {x=0,y=1}
 }
 src.parent=nil
 local queue={}
 local visited={}
 for y=1,grid_size do
  local row={}
  for x=1,grid_size do
   add(row,false)
  end
  add(visited,row)
 end
 add(queue,src)
 while #queue>0 do
  local node=deli(queue,1)
  visited[node.y][node.x]=true
  if node.x==dest.x and node.y==dest.y then
   return buildpath(node)
  end
  for dir in all(dirs) do
   local new_node={
    parent=node,
    x=node.x+dir.x,
    y=node.y+dir.y
   }
   if new_node.x>0 and new_node.y>0 and new_node.x<=grid_size and new_node.y<=grid_size and visited[new_node.y][new_node.x]==false and self[new_node.y][new_node.x]==0 then
    add(queue,new_node)
   end
  end
 end
end

Thanks

P#100526 2021-11-21 05:08 ( Edited 2021-11-21 05:12)

Cart #tuckandrolo-0 | 2021-11-20 | Code ▽ | Embed ▽ | No License
22

Tuck and Rolo is about being a cool skeleton (Tuck), collecting mushrooms, and tackling fiends, all with the help your fire-spitting, mostly-loyal bird friend (Rolo). It is an action platformer with a scoring system that rewards exploration and survival over speed.

This game was originally an outlet for me to get familiar with pixel art and to experiment with an OOP approach to game entities in PICO-8 (https://www.lexaloffle.com/bbs/?tid=30886). For years, Tuck and Rolo was more of a scratchpad than any sort of product with a direction. Eventually I decided that not having a finished game was silly. With the addition of scoring, NG+, and music, I felt it was worth releasing. It's come a long way: https://www.lexaloffle.com/bbs/?tid=30552

Binary downloads are included in the game page on my website: https://walt.codes/tuck-and-rolo/

The music is by D.D. Curry: https://soundcloud.com/dd_curry

P#100493 2021-11-20 17:55 ( Edited 2021-11-20 18:00)

Cart #kirnikura-0 | 2021-11-20 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

P#100492 2021-11-20 16:43

Cart #picoenix-0 | 2021-11-21 | Code ▽ | Embed ▽ | No License
4

Game for one or two cooperative players.

Fight against various enemy hordes, space phoenixes, asteroids, minibosses, abandoned structures until you reach the final great enemy in this arcade game inspired by the classics.

Features

-One or two simultaneous players in cooperative mode
-Seven different hordes
-Normal enemies
-Phoenix
-Asteroids
-Triangles Mini-Bosses
-Structures
-Final mega boss level
-Debug option that allows you advance a level if you get blocked

Game controls

Player #1
-Cursor left and right to move
-Z key to shoot
-X key / cursor down to use shield

Player #2
-Keys S and F to move left and rigth
-W key to shoot
-Q key / D key to use shield

Tips

You can use shield when shield bar is full (purple bar in the top of screen)
While using shield, you can't move the ship but you can shoot
Game developed using PICO-8.

P#100489 2021-11-20 16:17 ( Edited 2021-11-21 12:16)

Cart #dft_test-0 | 2021-11-20 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

had a silly idea, why not make a spectrum analyzer that reads data sent to the pcm channel?
while it does work, it uses an unoptimized discrete fourier transform, which is very slow! watch the cpu meter almost die when it starts doing the calculations
i should have implemented a fast fourier transform, but i didn't because 1: i don't fully understand how it works, 2: it involves keeping track of and manipulating multiple lists of data points, and i don't know all of the nuances of tables in lua so while i could technically implement the algorithm while only half knowing how it works, i wouldn't be able to do so efficiently. maybe one of you kind souls can spare a gamer some advice? the idea is there and i do think this would make for some really cool effects in pcm music players

anyway if you dare to use this as-is, the drawspectrum(x, y, w, h, pos, len) function does as follows:
draws a spectrum at (x, y), computes w points of the dft, and draws the magnitude spectrum w pixels wide, and scales the plot by h. pos is the address where it should look for pcm data and len is the number of samples to use when computing the dft. again, it's very slow, it's like O(w * len) time or something

P#100486 2021-11-20 16:03 ( Edited 2021-11-20 16:04)

Cart #blockbop560-1 | 2021-11-20 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

My submission for TweetTweetJam 7 - a Breakout-like game using 560 characters!

Check out the other TweetTweetJam7 submissions: https://itch.io/jam/tweettweetjam-7

Some of the other submissions I've seen so far are mind-blowing, and certainly give inspiration for the future!

Controls:
Arrow Keys: Move Paddle
Z: Restart

P#100476 2021-11-20 05:16

Cart #bubblecat-2 | 2021-11-20 | Code ▽ | Embed ▽ | No License
3

welcome back, bubble cat. we have another situation, and this time you've only got 60 seconds

how to play:

  • arrow keys: move
  • ctrl-m: mute
  • X/Z: continue to next level

you don't have to full-clear every level! skipping a level without clearing it just gives you a points penalty (-5 per remaining bubble)

code:

this game was made to fit inside two tweets; i.e. <560 characters of code and no sprites! here's the full code:

x=3y=3o={}m=0n=0p=circfill::_::z={}for j=1,13do
z[j]=rnd(49)\1end?"⁶!5f2cC"
while t()<60do?"⁶1⁶c"
b=btnp()q=b>8and"⁷fdc"d=sgn(n-m)u=x
if(n~=m)m+=d d+=6
p(32,32,60-t(),1)v=y?"⁶w⁶t"..m,24,27,4+d
if(b%16>0)s=b*.5938&.75
if(not r)r,s=s
if(r)x+=cos(r)y+=sin(r)
w=x\7+y\7~=0
for j=#z,1,-1do
i=z[j]d=q and"-5"b=i\7*9a=i%7*9p(a+4,b+4,3,j|8)
if(y*7+x-x\7==i)w=del(z,i)d="+1"?"⁷d"
if(#z<1)d="+10"q="⁷egc4"
if(d)add(o,{d,a,b,d*11})n+=d
end?"★⁵8d🐱",x*9+1,y*9+3,7
if(w)x,y,r=u,v
for a in all(o)do
a[3]-=1?unpack(a)
end?q or""
if(q)goto _
end?"⁷dafa"
::e::goto e

(that's only 548 characters, but some of them (like the cat face) cost two characters on twitter. remember to ctrl-p to enter puny-text mode before pasting this into your local console!)

some code highlights:

  • convert btnp() bitfield into movement: b=btnp()if(b>0)s=b*.5938&.75if(r)x+=cos(r)y+=sin(r)
  • buffered input: if(not r)r,s=s
  • out-of-bounds check: w=x\7+y\7~=0
  • animated score display: d=sgn(n-m) if(n~=m)m+=d
  • collision checking: if(y*7+x-x\7==i)
  • draw player: ?"★⁵8d🐱",x*9+1,y*9+3,7
  • animated score floaters: for a in all(o)do a[3]-=1?unpack(a) end

full code history:

https://github.com/pancelor/bubble-cat

high score:

my high score is 207! what's yours?

P#100464 2021-11-20 03:23 ( Edited 2021-12-04 01:37)

Cart #blockjoin-3 | 2021-12-04 | Code ▽ | Embed ▽ | No License
8

Here is my Pico-8 version of the Game Boy Advance game Denki Blocks from 2001.

Features:

  • 235 puzzles
  • 2 unsolved puzzles unlocked at a time
  • undo last move
  • reset level
  • Best time and best moves are saved per level with cstore
  • Cheatmode

Have fun!

P#100441 2021-11-19 20:56 ( Edited 2021-12-04 00:58)

Cart #zudonfah-0 | 2021-12-05 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

A simple ball bouncing game made in under 560 characters.

Update 1.1

-Increased ball speed
-Fixed ball speed bug that made the ball faster than the paddle
-Graphical and sound changes
-Still under 560(555 according to Pico-8)

cartdata("paddle")p=dget(0,p)d=1c=btn
function v()r=rnd(-1)e=0w=64x=32y=0a=w
f=1g=1l=128s=w
if(r<0)d=-1
end
v()::b::flip()cls(1)for i=0,l do circ(8*i%l+sin(x/256)*i/2,8*i%l,(r*i)%l,5)end
if(c(0)and x>0)x-=2*g
if(c(1)and x<l-w)x+=2*g
a+=d*g
s+=f*g
if(a+4>l or a-4<0)d=-d ?"\ab"
if(s+4>l)f=-f ?"\ac"
if(s<0)v()
if(a+4>x and a-4<x+w and y+12>s and y<s)s=y+12f=-f e+=1y+=1w-=.5g+=.1 ?"\ad"
if(y>l)y=0g=1p+=l
if(g>5)g=5
if(w<32)w=32
if(e>p)p=e dset(0,p)
rectfill(x,y,w+x,8+y,9)circfill(a,s,4)
?e,x+w/2,y+2,5
?"hiscore "..p,0,l-16,9
?"by yopenatal",0,l-6
goto b

old version


Cart #fukobegeya-0 | 2021-11-18 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

cartdata("paddle")c=btn
p=dget(0,p)o=rectfill
function v()r=rnd(-1)e=0w=64x=32y=0a=w
d=1g=1f=1l=128s=w end v()::b::flip()cls(1)
if(c(0)and x>0)x-=2*g
if(c(1)and x<l-w)x+=2*g
for i=0,l do circ(8*i%l,8*i%l,r*i%l,5)end a+=d*g s+=f*g
if(a>l or a<0)d=-d*g ?"\ab"
if(s>l)f=-f*g ?"\ab"
if(s<0)v()
if(a>x and a<x+w and y+9>s and y<s)s=y+9 f=-f*g e+=1y+=1w-=.5 g+=.001 ?"\ab"
if(g>5)g=5
if(w<32)w=32
if(e>p)p=e dset(0,p)
o(x,y,w+x,8+y,9)o(a-4,s-4,a+4,s+4,9)
?e,x+w/2,y+2,5
?"hiscore "..p,0,l-16,9
?"by yopenatal",0,l-6
goto b

P#100379 2021-11-18 23:17 ( Edited 2021-12-05 17:44)

Hi, I'm new to the scene here- I'm just writing a text adventure game and I'm looking for a way to scroll the text or just get the player to the "next page" of text? The map I load into the game is only a drawn border or fancy frames for the game... This is the code I have as of now, but the program skips to the last update function when I press the 'X' button/key in the game is the problem I currently am faced with. I also have yet to figure out an inventory system or anything similar. I know my code isn't clean- nor is it efficient, but I'm just looking to do a text adventure. Any help is appreciated however!

-- main
cls()
-- prints map
map()
-- beginning
print("my story text here",15,20)
print("my story text here")
print("\n")
print(" (hit x to continue)")
print(" other buttons displayed here",20,100)
print(" ")

-- button pressed
function _update()
if (btn(X)) then
-- scroll text
cls()
-- prints screen
map()
-- beginning
print("my story text here",15,20)
print("my story text here")
print("\n")
print(" (hit x to continue)")
print(" other buttons displayed here",20,100)
print(" ")
end
end
function _update()
if (btn(X)) then
-- scroll text
cls()
-- prints screen
map()
-- beginning
print("my story text here",15,20)
print("(hit the < key to (do "something")")
print("(hit the > to (do "something")")
print("️ other buttons displayed here",20,100)
print("my story text here")
end
end

P#100376 2021-11-18 22:10 ( Edited 2021-11-18 22:21)

Cart #mafihogubi-0 | 2021-11-18 | Code ▽ | Embed ▽ | No License
1

P#100368 2021-11-18 20:36

Cart #owowuwuwuowo-0 | 2021-11-18 | Code ▽ | Embed ▽ | No License

P#100366 2021-11-18 20:23 ( Edited 2021-11-18 20:26)

Cart #burobesoru-0 | 2021-11-18 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
6

Hello fellow Pico-8 fans

It's still a work in progress, but thought folks could check it out and have more fun. Thanks to @Krystman and LazyDevs for getting me up to speed with Pico-8. More acknowledgements below. But thought I'd start out with some early thanks :)

How to play the game

X - Launch Ball
C - Launch Bomb (need to gain them with bomb powerup)
Left - Move Paddle Left
Right - Move Paddle Right

When in the Piconoid start screen
Left - Show Highscores
Right - Hide Highscores
Up/Down - Level select (I opted to add this feature to have fun with the different levels)

Goal is to hit the bricks, and clear them all before advancing to the next level. There are 9 levels (more to come).

Powerups

The original power ups from breakout hero are there AND I added a few more power ups.

New Powerups...

Lazor - Hit Z to shoot!
Multipaddle - A new paddle will appear on top of the existing one
Bomb - Hit Z to send off a bomb vertically. These can destroy invincible bricks
Bomb ball - changes bricks into exploding bricks
Powerup ball - changes bricks into powerup bricks

There are four backgrounds

Circuits
Cells
Starfield
Rain

New Update

  • Highscores
  • New Powerup - Powerup Ball - changes bricks into powerup bricks
  • Updated/New Levels - Jelpi, Pico8s, Maze, Core, Metroid, Buttonz, Heart, Evil Eye, Facey
  • Updates to the graphics and soundfx
    Cart #burobesoru-1 | 2021-11-28 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
    6

Finally, again a HUGE thanks to LazyDevs for putting out the Breakout Hero tutorials. I wouldn't have made it this far this quickly without them. And Huge thanks to the community for a whole lot of other tips and tricks.

Any feedback and comments about the game, gameplay, the code, etc... would be great.

Enjoy : )

P#100364 2021-11-18 20:19 ( Edited 2021-11-28 17:26)

Cart #buoyohbuoy-4 | 2021-12-03 | Code ▽ | Embed ▽ | No License
4

arrow keys to move the buoy

Explore the lake, get to the finish line, and avoid getting popped on the rocks!
reeds slow you down, the current gives you a boost, and sharp rocks pop your buoy.

P#100311 2021-11-18 02:33 ( Edited 2021-12-06 16:37)

Hello all...
I've been looking up how to have leading 0s on my score displayed on screen.
Some of the explanations I've seen look very complicated.

How difficult is it to have, say 00050 rather than just 50 displayed as the player score.

Thanks

Peej

P#100301 2021-11-17 22:35
View Older Posts
Follow Lexaloffle:        
Generated 2021-12-07 09:21:39 | 0.149s | Q:107