Log In  

BBS > Superblog
Posts: All | Following    GIFs: All | Postcarts    Off-site: Accounts

Cart #56351 | 2018-09-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

I had a 12 hour flight to Japan so I decided to remake my favorite flash game ever, Winterbells (http://www.ferryhalim.com/orisinal/g3/bells.htm)
Art and audio is terrible but I think I got the gameplay pretty close! I made it all from memory too since I had no internet on the flight.

LEFT/RIGHT to move
UP to jump at the beginning
RESET CART in the menu to restart

5 comments


I think all of us who have used COS() and SIN() from one time to another find it rather difficult to get "clean" numbers, that is, to bounce around from one end of the negative spectrum, to positive, and back again to exactly where you started.

I wrote this routine to use for my own stuff but you can work it too if you like.

It's a simple array from 0-255 called MySin(), in it, it starts at -255, works to positive 255, and back again, in a very clean curved calculation that does not involve any math other than adding and subtracting coefficient numbers.

[16x16]

mysin={}
n=-255
a=0
p=0
repeat
  print(p.." "..n)
  repeat
    flip()
  until btn(4)
  mysin[p]=n
  mysin[127-p]=-n
  mysin[128+p]=-n
  mysin[255-p]=n
  n+=a
  a+=.128
  p+=1
until p>=64
cls()
for i=0,255 do
  pset(i/2,64+mysin[i]/8)
end

for i=0,255 do
  print(i.." "..mysin[i])
  repeat
    flip()
  until btn(4)
end

[ Continue Reading.. ]

1
2 comments


With the vast scope that PICO covers in complexity involving multiple arguments and permutations of arrays, I was wondering if there was a way to do something as follows:

function addup(...)
local t=0
  for i=1,#addup()
    t+=arg(i,addup)
  end
  print(t)
end

c={}
c[3]=7
addup(1,2,3,4,5,6,7,8)
addup(1,3,5)
addup()
addup(437,c[3],348,3821)

Where you can call a function with any number of arguments, and all of them are read in turn for the single function.

6 comments


Cart #56407 | 2018-09-08 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA


Changes in 1.1.2
Improvement: Bandits will not shoot at the player if an eagle is in front of them, removing an impossible to survive situation.

Cart #56398 | 2018-09-08 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA


Changes in 1.1.1
Bugfix: Falling dying cowboy never draws below ground.
Non-functional: Refactored updating and behaviour logic, to be a bit more generic and driven more by actor configuration.
Non-functional: Refactored physics logic to be a bit more generic.

[ Continue Reading.. ]

3 comments


String to number conversion produces incorrect values (at least for -1!!)

-- prints false :/
print(tonum("-1")==-1)

-- prints 0xFFFF.0001
print(tostr(tonum("-1"),true))
1
4 comments


Cart #56236 | 2018-09-05 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
7


My first PICO-8 game, made mostly to get comfortable with the system. It's pretty simple and straightforward, but still fun to play! The goal is to kill as many enemies as you can. Let me know what do you think :)

The game lacks music (I have to learn some music theory first) but overall it's finished, though I may add some features. Please report any bugs you find, I'll try to fix them ASAP.

7
4 comments



Here's a cover I made of the main theme from God Hand (2006). There isn't MIDI or anything available AFAIK so I had to transcribe it by ear, and thus a few of the chords might not be 100% correct (I'm not a music theory person).

Interesting note: the song features several key changes. Take a look at the code and you'll see that this is being done dynamically by raising/lowering the pitch of the 8 custom instruments at certain points in the song. This allowed me to reuse a lot of patterns despite the three main sections being in different keys (I don't think I would have been able to fit everything into 64 patterns otherwise).

3
0 comments


Cart #56223 | 2018-09-05 | Code ▽ | Embed ▽ | No License
1

Survive 120 seconds of genereated instant shmup action!

1
4 comments


Found this nice little snippet on Twitter: Put a flip in it

There are some cool ones under the hashtag #putaflipinit

0 comments


Similarly to how you can enable the devkit mouse it would be nice if you could enable the keyboard for use in carts. This would allow for things like text adventures and keyboard shortcuts for things like roguelikes.

4 comments


Cart #56192 | 2018-09-05 | Code ▽ | Embed ▽ | No License
2

PICO-8 has built in ESDF controls, but they need to be accessed from inside btn() and btnp(), by calling btn(x,1) or btn(x,0), as if you're setting up separate inputs for separate players. But what if you want to use ESDF as an alternate control scheme for a single player, so the player can alternate between the arrow keys and ESDF, depending on their preference?

Insert bt() and btp() into your program, and call them instead of btn() and btnp(). This small change will allow players to use esdf controls, with minor edits to your code!

2
0 comments


Here I present a method for stroking text and sprites.

In looking through solutions for stroked/filled text, I usually see print()on the string called 9 times; i.e. once at each cardinal location with a 1px offset. I realized if pixels were represented by "fat pixels" outlines of various thicknesses could be simulated.

For example, if a pixel is at (x,y),

rectfill(x-thickness, y-thickness, x+thickness, y+thickness,color)

with a normal pixel draw on top would look like an outlined pixel. I further realized that anything with transparent pixels could be outlined in this same manner, and so applied it to sprites.

This method works in the following:

  1. Video space is "borrowed" for less than a frame (?) to render the text and capture it's pixel data to user data space. (the specific address space used for this caching can be set to wherever you like; sprites are read as-is from sprite memory space)
  2. The bytes are walked and used to draw fat pixels (via rectfill()).

[ Continue Reading.. ]

9
3 comments


Hi, I'm making a top down RPG and am wanting to place my enemies, characters, items, etc. via the map instead of programmatically. The issue I'm having is finding a way to then move/animate/update those sprites.

Currently my solution is: "scan" the map (iterate through each tile on the screen) and catalog the different types of sprites and their placement. Then I use mset to clear the tile and draw a new sprite of the same type in that same location and do the animations and movement from there.

It works ok but seems like there's no way that's the best solution. Also it doesn't make it easy to have each element act in a unique way (different enemy movement patterns, etc.)

Anyway, hope this makes sense. Let me know if you all have some tips and tricks to accomplishing something like this. Or if programmatically placing items is a better way to go.

Thanks!

4 comments


Noting that pico-8 carts encode the lua, graphics and sound data in the gray pixels of a pico 8 png, I was wondering if it would be possible to print but then re-scan a pico 8 cartridge. It would probably decay too much. But a QR code wouldn't---however a usual QR code does not have enough data.

What if pico-8 could produce a larger image of a pico-8 cart which would use black and white dots instead of the low bits of the rgb gray pixels to encode the data, so it would be printable and scannable, able to be read in by pico 8?

Then one could have physical copies of pico 8 programs.

Maybe overkill, since the raw text of a pico 8 program is already printable.

13 comments


Cart #56183 | 2018-09-04 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA


a small game by max and clarice

0 comments


Cart #56176 | 2018-09-04 | Code ▽ | Embed ▽ | No License
3

Hi everybody :),
it's a little game, this game is a tribute to "duel", a videopac game released in 1979.

I code this game just for fun.

"Duel" is a game for 2 players.
A simple AI for 1 player is also present (very easy to win).

Thank you for your comments and have fun.

3
1 comment


Is it me or when you export music from PICO-8 the quality seems to be really bad ?

0 comments


Cart #56465 | 2018-09-10 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

Micro-Tactical Cover game, without the ability to chose where your soldiers will move to. They have their own will. Kill the enemy within, before they kill your squad.

  • Use left and right arrows to select target.
  • Use top and down arrows to select your soldier.
  • Press Z to swap skill.
  • Press X to use skill.

Created for the GMTK's Game Jam 2018.

Theme: "Genre, without mechanic". So, Tactical, without movement.

by Saulo Camarotti

  • programmer at Behold Studios, creator of Knights of Pen & Paper, and, Chroma Squad.
3
2 comments


Hi everyone,

New to all this Pico-8 party, a little late, a little lost. I will be out in the woods (metaphorically) for a while, with no internet access or very occasional one. I would like to experiment with Pico-8 in the meantime. How do I secure resources for offline development?

Webpage tutorials - I can save them to PDF, take them with me. Plus Picozines #1-#4 and I should be good.

Cartridges - if I understand correctly, I should just save PNG files, right? And I can peek at the code inside?

Any other resources - for pixel art tracing and writing code in slightly less pixelly font. Any recommendations?

Also, while I am at it: the structure of this forum (BBS?) is a little confusing to me. If I am asking in the wrong section, please move it to correct one.

4 comments


UPDATE: (09-04-18)

Sometimes a good thing can get even better. I was thinking about the compression algorithm I was using this morning and realized I could squeeze off even more characters if I used more than one marker to represent the compression packet type. And I did ! And as you can see, it works just great.

There are no graphic tiles so just copy this source directly into PICO and RUN to see the results.

-- micro miniature compressor
-- from the lab of dw817

-- source image: 8192-bytes
-- hex standard:16384 chars
-- my compress : 9305 chars
-- savings = 43% compression

-- (09-04-18)
-- update new algorithm!
-- my compress : 7980 chars
-- savings = 51% compression

t="$0161033c3$c483c3301$02ac3$c543c01$02230$c5c03$01e30$c6003$01a10$c6401$018$c68$016c0#cc3c003133$c263c1310c3$c261c$01210#cc03a5#a49a04$c221c5094490430$c2601$010c1#ca0c54#a69a9904$c1e3c40#9ac0$c243c#0e10#cca095a95a45#4454c0$c1c01#9c09$c2601#0cc0#ca2c0a994#93#a69a1a3c51#4831#34c3#c61c95#96a#97c0$c241c#0c#cc406#d34199#a69a0454a99a#94aa9a#944930#c40c9a#94#a4#9609$c26#0ac0#ca0c7d#76454455#435a9aa$913a04cca009101540#a49a9949c3$c240c#08c1#cadc5600657707aa4a40aa#9ca#98a#94044961#74d790#a4#94c0$c243c#08#cc13#8428756744919a#94a9#a89a#965494990ad5d600d17707a9aa9a9934$c26#0630#cc21#86d267909a#94#af#95a#93440956208802d077a0aa9a9909$c260c#04c0#cc80#8608959a#94$a129a99aa#94d425#86027d06#a49909$c260c#04c3#cc80#842840#95aa9$a149a4994a90482#886017#a4990a#ce6$c173c#04#ce80#8440a#93a9$a1c9a5400#8a0267a4aa990a#ce6$c190010#cee18890#98$a1a9a99a924#8a0876a0aa990a$c280130#ce8c58#97aa9#a69#a39a45#ae#9489#8a287da0aa990a$c280cc0#ce0ca#99a9#a49#a4549$a109a9929#8a2875a0aa9909$c280cc0#ce939a#94a#93#a955aa4f$a11991a#8a2871a0aa9939$c281cc1#cea4#99#a94a4f$a149a4a#8a2875a0aa99c4#c36#cc6$c173cc3#cc2c#9b#ac0$a149a9982#88086da5#94c0$c283cc3#cc90#9a#aa5#a6f$a124a85#880817#945a$c383c#9c#aa4#a6f$a124a5a#8812079a9904$c380c#9c#ab5$a18949980#84287090994990#cc6$c2b9c#9aa9#a644#a304a55#a3f$a1145a5a8288020694995599c1$c3691#9aa9#a40499a1a4909a04$a105#a399a9090210909a04#94c4#cb3$c2a94#934#96#a44a99a40904aa4a94a0#ae9#a45#94#08a#95c9#c80c07$c283c994#9baa0aa45a0a904af44a04af#ae9a#9644#94aa#9639#c870d7$c280c994#97a994aa445a9a59a5995aa99aa5#a3f#aa5a9a#95594#97a991a#c63c7657$c284c#934#96a9a4aa65dd5500954050d5dda1#a49#a69aa#994a099#a794a#c6dc7736$c284c#930#96a4a4aa50#74676d#76d7a0#a494#a54#a359a#95495#aa59#c67177c1$c2893#934#96a494aa4064#7ad6#435#a54#a559a9a#96#439#a84a66c3cc0c7757$c2a934#97a9a599#a354475#7656449449#a54#a51aa9a#96440#a90a77c3cc7177cd#c41c35$c22434#99a55#a3959a5476775644a49a49#a51#a55#a4#96445#a7fada77c13c7677c1cc1c7557$c224c0#954#9445#a40aa4ad45d55a9aa9aa9#a54aa9aa4aa99a49599#439a4#a5fda77c15c7757#c4707717$c224c0a99490a9a599aa045#a4#44a9#a449a0aa0#a51#a5#934#98f5#a66977c0707707cc607767c0$c220c5a#944#9349a9594994aa2992a9aa0950a54a90#a444#a494a44#934#93a9#a6757701#7467d1#7435$c243c5#984a9919a04959480089a04d0670500a0aa5aa4#a55a4494#934959#a671#7e06$c2854994#93a0991a49#0445250255657767#049504a4#a49aa9a4994#934959#a49a7d#7c1dc3$c2801994#93599a9950660567550465#7467d07766a4#a6194a#9344#9549a9aa5a#7c#d37$c2a0c990#95a5a975#76677d#79677d7a4#a49aa05#a3904#97a4aa5a#7a577667$c2c944#9509a9d9#74dd#7c67dd7616949904aa9049a#99a0aad9#775776d7757c5$c2a91#930#945151770d0076#7a0d#04650745a91a9959aa9a#97099d9#77d677d#735c6$c2a93990#95757706#03675#7a05#0640aa9a909a90a#994399d9#74d77667751676c1$c2a0c#95599757700d06770#7a55770f#04950499009a#98092c99d9#745#755775d7$c2c4c90990#93690760d1#730#7a6067c1150050d6d546#9a391c9970#7a6776c5$c2c4c0#9555d90df6d3#735#7b0173c770500#74479a#98c03c4976#7c30#ccdc#f47f$c1a2c#935#941407665c#735#7bdc5dc7717007077475a6d959949#c4d0#7c57#ced1#f667$c180c#950994ad76d1c#73d#7cc16c7717015077476577579919#c475#7a57c1$c10#f67fc6$c161c#9449450476651c677d#7a67cc7177170c0076477d6776a4c0cc1c#7a57c0$c12ff1fd17667$c161c#960a997d673c677d#7ad7cc71771601d0770#73667724#c475#7aa5c4#cc1#c5ff1f11d177c6$c143c99aa9a4#937d67c3567d#7a57cc6c771d0175775#74177c0cc1c#7a179939#cd1#c4f91f#147d67$c143ca9#a4#94757700607d#7ad7cc1c67dd51#746#74577c3cc70#7a96990a#ca1#c7fddf#14d177c6$c123ca9#a49499757757507d#7a67110c107d70#79d67cc1c#7a67a5#93a#cb1#c6dcff#16f667$c14a9#a495997566161176#7d60310d176#76577d57cc71#7a079#a561c6#c41#cbfd1f#14f17f$c14a4#a4949974d70511#7e06cc1c0c#786#73360c72#7a91a9#a4c4cc6#c41#cadcff#14f1ff$c14a4aa4a#9474#74d676#7a66c6cc1c71#79d7dc1405e#78d759#a63a#c41#cffddf11f1ff$c14a4aa5a9#a374d76d#7ed715110176#7857365c8d8276#7656a9a5#a45a#c51#cedcfe#f6$c14a5aa4#a39474$72267d03075278262#76909959#a6c31$c13ed#f6cd$c12a0aa9#a340d5$712677160#7a0630d07757282876771791#94a5#a4c0$c14dca9#f4c6$c12a0#a35#a354a76#761#d376#74d71#7bd7101176#7482825876cd9c#945#a5c4$c1a66$c14a1#a35aa0a59d0#7646ee00$71067101175#762d288202c00c#94a9a5aa$c1f3$c12a19aa4aa4a943961#742714de#7e6701c160#78d7822e00cc3c#94aa5aca$c1c3$c15934#a55a99c453617717e464#7c67001101#7c0622c0#c4a0a9#a4$c1e33$c14935#a54a99c460076167e471#7ad7#1655#7e16#c693#a4ca$c1c3cc3$c149349#a49499c55dd711601d#7a16c101c1d15#7d67c3#c64c#a4$c1e33$c1693a4#a55a9307d5d#130d16d#74d62112#1301c75d#7d3d#c81caaca$c1c3cc3$c1693a1#a59a9607d7d15#1600202288110#13707dd#7b57#cca4$c1e33$c1893a4aa5#a39a75577016#16262244180#136175766776#78c1#cd1$c1c3cc3$c1803#a45#a35a7727281d#16664504#13051#73dd#74d#7607$c2c33$c1a03#a54aa75770788080#157f77110#137677d75#74d#746710#cc1$c1d3cc3$c1a4d#a559a76775d#84#1676160#14075775#74d5#755610c3#cb1$c1a3c33$c1c93aa4#a31a#74dd#840810115611008288d2#75d#6377dd77d10c3$c263cc3$c1c93995#a3707767d6#845299#1345082#84d8#755d#7356656711c3$c273$c1e9399a45a7677d7d7#8492459aa924#8670#745#736577dd0611c3$c2433c3$c1e9399a559#74d7562882429a945982#84287d#766567d1661011c3$c223cc3$c209349aa70#74250#83284099aa4a#8618#786765#7361511c3$c2233c3$c2091495a767717#8852090a4a22828862#7a675d05#130c3#c36$c1c3c33$c22a1a5d4#74d7#832#8408d4562a#8671#7e#16c3cc1$c1d33$c24900962#7467#832#8428459580#842812#7e101101$c203c33$c24902458#768282#8424904984#842#8360#7a571#33$c2233$c2690812876#748588#2640542#852#8308#7ac6#c86$c1b3cc3$c26d0868271#748d#8608165d#832882#8318#7ac3#c86cc4$c1833c3$c2670278868#748d#84287177d7882#83228860#7807#c43c00cc9c99d9$c143cc1$c261c77d7282876778188027d#74d7#852822876#766730cc0c8288c396e9d9$c1493c0$c26dc#748081d207240276#7667#84288262#78d5c53c82#84c39#e3c9$c123c94c4$c2675#74262#835009cc757767557682#842876#765d77c183#86c399eece$c12439439$c241c#76d782029949cc3cdd65775681#8472#7467d577d73c#862863e9fece$c103c44991a$c1e#3663#7806909549#c471#76268808#745665#745783#8628ece9ff1f#cc1#c35194aa4a$c1c1c#775#7845#93449c3cc73#765728765dd576#76d782#86289cfeffdf#cd11c04#a49a$c1a3c1160#7c06995#95c3cc63#766775$71080#8608e6#f61dccd1c6cc1cc14199a5aa9ac3$c1861#7e17a4994#95c3cc6c$71a86#8638fe#f866ffcfcc#13c9499a5aa9ac3$c18507d#7a67909aa994#94c3cc73$71a57#86d2#fec71cc151#9449#a4c1$c161c76#7c05#a75#94c3cc75$71a5655828818fd#fd71d310c99a95#a5c1$c185176#78060c#a44a#96c35176$71667557677268818f1#fa776736d30c99a9#a34aac0$c18d176#7667c05c#a45#a39a99ccd5$71667d1#76068812d1f6#f677d633c3cc3c99#a54a9c4$c1861d6dd767707cc4c#a49#a54a017d71$714d5#76566d2512116d#f46f3dc3#c63ca9#a44a99c4$c183c33cc7077cdcc93#a55aa49#147516$712dd#761d71#741d#14ffd633c3#c83ca9#a45a9ac4$c173#c67177c0cc93#a5904#1661677d#7e56#746755765776771d11210133#cea9#a699c4$c173#c67367#c4a0aa5#a310#1876d6#7c567677d7d5#7717767d62012$c10a4#a691c9$c143cc1#c66316#c4a0aa4#a319#15011d1677d#7857767756d0#781#7566d6c0$c10a4#a69439$c143cc0#c63cc3#c4a4#a35aa5a#1a71d6#76d775770d110176#795#75657c3#cea4#a65ad9c6$c121cc0#cea4#a35#a40#19016775#7556705#1670#78d#7767c3#cea4#a64ad9$c140c30#cc3ca94#a7#1c605#73dd670#1951#786776#743d$c10a4#a5faa34$c140c10#cc3ca95#a3fa14#1c017#5367#1e76#7957717$c12a4#a835$c140100#cc3ca#93aa4a#1b0#1666#170#1870#7817d7c1$c12a4#a839$c14#04c3#ca3ca9a5#a415#160$11b51#7867c0$c14a4#a83a$c123c#04c0#ca3c99a5#a494$1180#1b76#78c5#ce67c6cca9#a83a$c120c#0430#ca3c99a9#a49919$12270#7817#ce7#63cca4#a81a$c120c#06#ca3c49#a45a#9410$12061#7867#ce6c673c90#a81a$c12#08c1#c83c49#a44a#94dd10#170$11601#7ac0#ce673c49#a81a$c103c#08c0#c83c49#a494#945d$12276#74671d$c106c3ca9a0#a61a#c56#ca0c#0a#ca95#a5599a910$1160#1b71d605c3$c143c9959#a61a#c56#ca#0cc1#c890#93aa9#a455$122517617$c163c#94a4aa9a1a#ce1c#0c10#c8a0994#a71406$120617717$c165c#9549a991a#ce03#0ec1#c6a0995#a7147715110$119507d7757$c164c#945a9a9919#cc3c$01010#c693#94#a44a60766715$11400d16d#76d7$c164c99a99a949909#cc01$012c0#c49c99a4#a4347d7d776715$11061#7c67$c169c9aa9aa959909#ca1c$016#c44c99a5#a4337675#741f$11075#7cf7c3$c1493#a64#9309#ca$01810cc0c99a4aa1a0c7571#7416#1d06d$710c3$c1491#a65a990a#c803$01a303c49#a4c54c597d#76#68c1cc1c$712c3$c14a1#a89409#c603$01e1049aa9ac3914970#7ec1#c475$710c5$c14a0#a89509#c403$024a41acc940966#7c67c3#c463$710cd$c14a4#a84a2a3c01$02810139405d0#6cd6c3#c41c$610cd$c123ca4#a64a1405$016"

function decompressmemory(t,b)
local n,i,c,d,r,a,s=0,1,"","","","",{} s["#"]=2 s["$"]=3 s["%"]=4 s["&"]=5
  repeat
    c=sub(t,i,i) n=1 a=""
    if (c<="&") d=sub(t,i+1,i+1) n=tonum("0x"..sub(t,i+2,i+s[c])) i+=s[c] c=d
    for j=1,n do a=a..c end
    r=r..a i+=1
  until i>=#t
  for i=0,#r/2-1 do poke(b+i,tonum("0x"..sub(r,i*2+1,i*2+2))) end
end

cls()
decompressmemory(t,24576)

[ Continue Reading.. ]

1
2 comments




Top    Load More Posts ->