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, [ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=100526#p) |
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
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
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
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 [ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=100464#p) |
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
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
You're chased by piranhas and need to escape.
A very basic version of a game my father developed on a Thomson TO9, back when I was a kid.
It's my first go at a game on the PICO-8. I accidentally fist came across that fantasy console last week and absolutely felt in love with.
The game works better on a big screen as you character (green dot) and the piranhas (red dots) are way too small to view on smaller screens.
I need to play around within the constraints of the PICO-8 to find a way to have bigger items while still allowing to have a few hundred piranhas to deal with. Maybe some kind of zoomed and cropped version of the game.
Anyway, “release early, release often”. Any feedback will be appreciated.
Pretty happy with how this turned out. Managed to implement everything I wanted to within the limitations.
Character count: 560 (558 in-editor)
cartdata("focus_ttj7")d=1/16f=rectfill h=dget(1)l=0m=127p=66t=0v=0y=62cls()?"move:⬆️/⬇️",p,p,7 ::_::t+=d if(t==0or l>0)v=l>0and"hit the red"or"won"goto u f(0,y,3,y-3,0) if(btn(2))y-=1 if(btn(3))y+=1 if(y>m)y=m if(y<0)y=0 for i=1,m do for j=0,m do pset(i-1,j,pget(i,j))end end for i=0,3do for j=0,3do if(pget(i,y-j)>7)l=1end end p+=flr(rnd(9/4)-5/8)if(p>m)p=m-1 if(p<11)p=12 f(m,-1,m,m+1,8)f(m,p,m,p-11,0)f(0,y,3,y-3,7)flip()goto _::u::?"you "..v.."!\n\nscore: "..t.."\nhigh score: "..h,1,1,7 if((t>h and h>0)or(t<d and h>t))dset(1,t)?"new record!" flip()goto u |
Hello, this is my new Pico-8 game, made for the VGL Gamejam.
Hope you enjoy my game as much as I enjoyed making it!
This is my very first pico 8 game.
It's very rough and I just wanted to see how it would go.
Paul is sleepy. You are paul. Get to bed and don't fall asleep on the floor.
The aim of this game is to get to your bed by dodging crazy obstacles!
But be careful!
You have twenty seconds before Paul falls asleep on the floor... collect coffee to prevent this from occurring!
Paul encounters invisible walls, blood-stained spikes, locked doors, bounce pads, and magical portals!
Will you help Paul get to bed?
[updated from WIP post]
I saw the announcement for this week's TweetTweetJam #7 and here's a barely-roguelike in 560 characters.
Feedback, or suggestions for other character shaving welcome!
Gameplay:
- Use arrow keys and try to get as high a score or level as possible (my personal records are 140 points and level 8, but it's hard)
- Hitting two arrow keys at once lets you move diagonally (but requires some skill+luck on a keyboard!)
- Every heart (♥) you collect raises your score
- Every step you take or spike (∧) you step on lowers your score
- The house (⌂) transports you to a new more challenging level (and raises your score)
TO LOAD THIS GAME IN IMMEDIATE MODE TYPE:
load #ketabarihu |
VVhat's up ?
11-21-21
- Used the timer from my earlier game, "Star Wars Shooter" for greater timing accuracy.
Should run the same speed now either online or offline.
. . .
[b]This cart ^ runs faster online than offline, especially during gameplay. Something for @zep to examine perhaps.
Control
arrow -> move
z -> jump
x -> pary, reflection
Tips: After Second Heart, you Need to Parry.
Enjoy!!
itch page -> https://hikokyoujurou.itch.io/flappycrow
update
11/29/2021 changed camera move.
@zep has apparently been a very busy boy from the beginning.
Outside of Pico-8
https://www.lexaloffle.com/pico-8.php
https://www.lexaloffle.com/bbs/?cat=7
and Voxatron
https://www.lexaloffle.com/voxatron.php
https://www.lexaloffle.com/bbs/?cat=6
There are a few hidden gems, other games and systems he has created that you might be interested in, some of which are still being supported and modded.
You may have heard of it briefly but never saw it called, "ZEN PUZZLE GARDEN."
https://www.lexaloffle.com/zen.php
https://www.lexaloffle.com/bbs/?cat=3
. . .
The other he wrote is called, "CHOCOLATE CASTLE." and seems to be a nice and robust puzzle game where you can make and share your own brain teasers with others. I'm definitely interested in this one.
https://www.lexaloffle.com/choc.php
https://www.lexaloffle.com/bbs/?cat=4
. . .
While I addressed this earlier. I thought I would get more into detail with this post.
Now I'm pretty sure a great many of you just run PICO8.EXE or click the icon to get it going, but if you check the online instructions found HERE:
https://www.lexaloffle.com/dl/docs/pico-8_manual.html#PICO_8_User_Manual
You will see you can create a BATCH file that changes the very way you interact and view Pico-8, definitely taking full advantage of your screen margins.
For instance, this is one I created for myself, "p8.bat"
@start pico8.exe -software_blit 0 -gif_len 240 -windowed 1 -width 702 -height 650 -draw_rect 10,5,682,640 -sound 128 -music 128 -pixel_perfect 0 -desktop c:\david\Pico-8\pico-8_win32!snaps -home c:\david\pico-8\pico-8_win32 -foreground_sleep_ms 0 -background_sleep_ms 1000 -accept_future 1 -gui_theme 1
We can go through it if you like.
"@"
means to hide this when run in batch, the mess of text above will not appear.