EDITED 2/14/2020
I came up with several functions that I think would go good in pico8 and would reduce file size for larger games
--math
function ldx(d,l) --stands for lengthdirx return cos(d)* l or 1 end |
function ldy(d,l) --stands for lengthdiry return sin(d)* l or 1 end |
function ptl(x1,y1,x2,y2) --stands for point length return sqrt(((y2-y1)^2)+((x2-x1)^2)) end |
function ptd(x1,y1,x2,y2) --stands for point direction return atan2(y2-y1,x2-x1) end |
function wrp(v,l,h) -- stands for wrap local o=v while(o < l) o += (h-l) while(o > h) o -= (h-l) return o end |
function rng(v, l1, h1, l2, h2) -- stands for range return l2 + (v - l1) * (h2 - l2) / (h1 - l1) end |
--vectors
function vec(vx,vy) --stands vector local m= [ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=55218#p) |



can someone tell me why my objs.add() function isn't working?
its supposed to let the user pass in a table or object struct and create and store a instance of it.
however it seems to overwrite the instances with the most recent call so they always get created with the last call's paramaters.
--class tab local objs={} local obj = { --team team=0, --state state=1, level=0, timer=0, --stats shield=100, energy=100, weapon={}, --tile t =0, --tile to=0, --tile offset ts=0, --tile skip tw=1, --tile width th=1, --tile height --movement x=0, y=0, r=0, v=0, vx=0, vy=0, vr=0, vv=0, fx=1, fy=1, fr=1, fv=1, maxvel=3, --shoot firetimer=0, firedelay=4, } --obj manager function objs.add(o,...) o=setmetatable(o or {}, {__index = obj}) o.base = obj if o.init != nil then o:init(...) end add(objs, o) return o end function objs.tick() for i=1, #objs do o=objs[i] o.base:tick() if o.tick != nil then o:tick() end end end function objs.draw() for i=1, #objs do o=objs[i] o.base:draw() if o.draw != nil then o:draw() end end end --base obj function obj.tick(o) --fric --o.vx*=min(o.fx,1) --o.vy*=min(o.fy,1) --o.vr*=min(o.fr,1) --o.vv*=min(0,fv,1) --vx and vy o.vx=cos(o.r/360)*o.v o.vy=sin(o.r/360)*o.v o.vx=mid(o.vx,-o.maxvel,o.maxvel) o.vy=mid(o.vy,-o.maxvel,o.maxvel) --vel o.x+=o.vx o.y+=o.vy o.r+=o.vr o.v+=o.vv --wrap o.x=wrap(o.x, 0, 127) o.y=wrap(o.y, 0, 127) end function obj.draw(o) local t=o.t+(o.to*(o.ts+1)) sprr(t,o.x,o.y,o.tw,o.th,o.r) --rint(o.x..", "..o.y,63,63,7) end |

Inspired by watching tutorials from Bridgs, MBoffin and Gruber. Scenery collision is a bit hit and miss (lol), but I'm scratching an itch with it right now. This one is 2-player only, sorry - but my goal is a bigger map and a decent single-player mode. Oh, and the next production will have a little more polish to it (including a proper 'death' animation ha ha).... and I'll learn about writing 'optimal' Lua code
Objective
Player 1 and Player 2 get to drive around one of 4 maps, blasting each other. Shots can ricochet off the mountains but will travel over water. The harder difficulty adjusts the rate of reload and your speed in relation to shots.
Cheers
Robsoft



Hi,
Change between 0.1.11b and 0.1.11g makes our game Micro Murder freeze (on the newer version obviously).
Not sure how to debug it (would be nice to be able to see which line was being executed when escape is pressed) but it is very easy to reproduce: get the game from Splore, set both players as CPU and start game. It will freeze as soon as the AI starts thinking.
I am not sure which version introduces the change, those are the only two versions I have lying around.




You're a clod.
No, literally, you're a lump of earth.
A ball of mud. Sentient mud.
How? Probably through magic... Like a golem?
Anyway, that's not important.
What is important is that you're on a quest-
a transformative journey- to become shinier.
You must collect every fragment of the
P H I L O S O P H E R ' S S T O N E
to make your muddy dreams come true.
Will you be able to navigate the rooms
while managing your ever fluctuating size
and avoid danger?
Clod's Quest is a submission for the Ludum Dare Game Jam 42, you can rate it here: https://ldjam.com/events/ludum-dare/42/clods-quest




My love Niarkou and I made this for Ludum Dare in 72 hours!
Objectives: Feed your cats by filling their bowls. The more they eat, the more points you get! But too many cats and you will run out of space.
Controls:
- Pause: P or Enter
- Navigation / Player controls: ◀ ▲▼ ▶
- Menu validation / Take something / Pour something into the bowl: W / Z
- Throw away something: X
LDJam link: https://ldjam.com/events/ludum-dare/42/cat-lady-simulator



Hey all!
I just recently discovered Pico-8 and am eagerly working on my first game - Picoplex!
If you recognize the game, that's because this is a clone of one of my favourite games of my childhood - Supaplex.
The goal of the game is to collect all of the "Infotrons" in a level in order to proceed to the portal and into the next level.
There are only three levels so far. Hence - WIP!
Controls:
U/D/L/R - MOVE
X - SLURP
O - DEBUG VIEW
X+O - RESTART LEVEL
Slurp mechanic is also from Supaplex - it lets you slurp either Scum or Infotrons beside you without moving. That's pretty important for lots of puzzles.
Just wanted to share what I have so far :)
Thanks for being such an awesome and fun community to be a part of!
Cheers,
Prog
--Version History--
0.1 - First Commit
0.2 - Fixing a duplication bug (thanks to dw817 for reporting this!)
0.3 - Added a menu and end screen, more sound effects, and an extremely annoying/repetitive background track
0.35 - Worked on the music a bit to make it a bit longer and therefore less repetitive. Not quite there yet!


Help Valdi escape the icy maze, despite a shadow's efforts to thwart your progress.
Controls:
Arrow keys to move Valdi
"Z" to reset a level (levels reset automatically if you are stuck)
Tile types:
White tiles - disappear after one step
Gold tiles - never disappear
Red tiles - step on one of these and all red tiles will disappear
Green tile - level escape portal










About
You hate trash and bacteria. And well, your home area got corrupted… It’s time for a big clean out, tho it’s not so easy to navigate in it, as it was before. Explore 31 level, jump on pads, ignore physic rules, and just have fun :D
Controls
- Left/right - move
- Up/down - manage gravity
- X - switches gravity (hotkey for up/down)
- P/enter - pause, as well as music/sfx muting and progress reset and lowrez mode
- SDEF - move camera around (only in lowrez mode)
LDJAM entry: https://ldjam.com/events/ludum-dare/42/corrupted-space
On itch.io: egordorichev.itch.io/corrupted-space


I saw that ludam dare 42 is ongoing, so I decided to create a game for it. This is my first time playing with pico-8 (and with creating games in general since middle school with gamemaker 7) and its was a wonderful little experience, I don't aim to impress anyone with this but I'm proud I did finish it. Very rough around the edges though, hopefully the next game I make will be more fun :v




This is a very small project to learn katakanas !
|
Disclaimer : i don't know japanese at all, so please forgive my mistakes. I copied each katakana from wikipedia, so it must be accurate.
KNOWN BUGS:
- sometimes, if you do the test too quickly, it crashes.
- one generated answer can be the same as the real answer but this has a probability of 1/92 so i decided to not fix it yet.
POSSIBLE IMPROVEMENTS:
- optimisation
- bugs could be annihilated
- more appealing graphics
- a banner for main menu?
