Line Of Sight Function
I`ve created a Line-Of-Sight function that should work for most projects. It checks for map-collisions(using flag0 as the collision layer). Please use it and let me know what you do with it!
I was inspired by this post: https://www.lexaloffle.com/bbs/?tid=48889
But i wanted a simpler starting point for my own approach. A Line Of Sight check is a good starting point for you own approach but also involves some math. So to bypass that step use my function:

UPDATE 16/9/22
added a optional length-variable. Use it to define a max "range" of the that line. Keep in mind that the function already neglects far away points.
Also added a new break point for perfomance.
function can_see(x1,y1,x2,y2,length) --x1 and y1 are the point of view,length is the max distance of the two points local max_length=length or 1000 local xvec=0 local yvec=0 local len=0 local ret=true [ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=116768#p) |

.jpg)





Updates:
Revision 7 (0.1.1) - Minor changes, and bug fixes:
- Tweak: Mana Burst now grants a new Frog Bomb upon completion. Other effects are removed.
- Tweak: Triples shots now deal less damage.
- Tweak: Sprial shots now deal more damage.
- Tweak: Final Boss's health increased by 30%.
-
Tweak: Now Lina can move between transitions.
- Fix: Frog Bombs are now consumed when used.
- Fix: 3rd Witch now summons correct minions.
- Fix: Final enemies death will not cause immediate stage change.
- Fix: Frog Bombs now should be less performance killers.
Revision 6 (0.1.0) - Full Jam Release









I'm new to PICO-8, and am trying to get a basic top-down movement system. So far I have this:
left = btn(⬅️) right = btn(➡️) up = btn(⬆️) down = btn(⬇️) xspd = (num(right) - num(left)) * player.speed yspd = (num(down) - num(up)) * player.speed if fget(player.x + xspd, player.y) == 0 then xspd = 0 end if fget(player.x, player.y + yspd) == 0 then yspd = 0 end player.x = player.x + xspd player.y = player.y + yspd |
num()
takes in a boolean, and outputs a number (true being 1, false being 0)
The problem I have, is that I'm trying to stop the player if they hit a wall (The wall's sprite having flag 0), and I'm not sure what to do. Does anyone know what's going on?

PICO-1K Jam 2022
The 2nd annual PICO-8 1K Jam (#Pico1k) has now started! 🥳
🌐 https://itch.io/jam/pico-1k-2022
You have until the end of September to make cool things in PICO-8
...by using only 1K (1024) Compressed Bytes of code 🗜️
No pre-defined Sprites, Maps, SFX or Music data allowed.
ALL content must be created using code.
It can be a:
🕹️ Game
🎞️ Demo (Animated or Interactive)
🛠️ Tool or Utility
...whatever you can fit within 1KB, basically!
It's a relaxed, non-competitive jam, running for a whole month.
Please refer to the PICO-1K Jam page for Rules, FAQ & Resources & more info.



"Gravity Wrangler"
Each world hurtles into the deep, feigning a wandering heart, accelerating their demise. What would they think if they realized that, through the eons, I was the only one standing between them and the frozen abyss...
279 characters
m,o=128,{}for i=1,9 do o[i]={rnd(m),rnd(m),0,0}end::_::for i=1,18 do for j=1,64 do pset(rnd(m),rnd(m),rnd(m)<1 and rnd(3))if(i<10 and j<10)a=o[i]b=o[j]x=a[1]-b[1]y=a[2]-b[2]d=sqrt(x^2+y^2)+.1a[3]-=x/d/999a[4]-=y/d/999 end a[1]+=a[3]a[2]+=a[4]pset(a[1],a[2],i%9+7)end flip()goto _ |
Carlae is a itsy-bitsy snake in 𝟹̶𝟽̶𝟼̶ 358 characters, named after the cute tetracheilostoma carlae, but tetracheilostoma was kind of a mouthful.
changelog
2022-09-24
- shaved 18 characters



DESCRIPTION
A.N.N.A. SYSTEMS OPERATIONAL.
PATIENT STATUS IS CRITICAL. MASSIVE INFECTION.
BEGIN PROCEDURE AS SOON AS POSSIBLE.
GODSPEED.
CONTROLS
Directional Keys control menu navigation and the A.N.N.A. CANNON. Press Z to fire and interact with menus. Enter to pause and reset / edit config.
NOTES
I was very lucky to be picked for the livestream of the game jam's submissions, and I had a great time working on what I would describe as 'Blood Peggle' - I hope you enjoy it as much as I liked making it. I do think we made it a bit too hard, but given that you can start on any level you like, I've opted to leave it as is.
CREDITS
This was a project for the A2B2 Game Jam, made by Remagamer and Eleven. You can follow me at https://twitter.com/Remagamer1 if you are so inclined.

Work In Progress:
A tool I made to help learn how fillp() code works as well as the 256 colour combinations.
In future I plan to add a hexadecimal readout as well as a means of changing the colour other than rewriting the colour table in _init(). Comments and better organisation of code is also on the to do list.


This is something I made for a request on reddit a while ago, and thought I'd share it here.
The timing objects are excellent for using in any game that needs precise timing actions. The timer bars are something I added later, and are not perfect.
> Hope this helps somebody! Timing can be a real headache. But this is very user friendly. There's a full section of notes in the cartridge!
This is a simple way to browse the internal pico-8 api, which I posted about on Twitter a while back.
