Log In  

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

Hello there, I am a total noob when it comes to Lua and Pico 8 but I have been trying to get past my own limitations.

However I kind of need help finding a better direction to code everything. I know there are demos and countless searches on the internet keep telling me to look at them but everything is so short hand that even JELPI is ridiculously complex looking.

Like I want to learn, but a lot of things with the code in JELPI might be too optimized for me to get just be glancing at it.

This is what I have been working on:
link my P8 file
><
Still don't know how to get embed...

Just looking at the code there is some problems as using booleans like that allows the controls to break down due to holding down a button. Was trying to fix that.

Again I am really trying to start from Zero experience so it would be great if you know of good video/material/forms that cover this too. While looking at other people's code is neat and all... if I cannot read it... it does not help.

[ Continue Reading.. ]

4 comments


Cart #49434 | 2018-02-19 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

YEAH!!!
PICO!!!

1 comment


A take on the C64 game Break Dance from 1984 ([youtube]https://youtu.be/9fT-zK_Kvzc[/youtube]).

Tried to do something for this: elneil's "17 games in on", though I think it can be much more optimized than this. :)

My 2nd game so far on the Pico-8, so I'm still learning, hehe...

This should be playable though, token count 421...

Any ideas on how to improve it (make it smaller) would be great. Thanks!

/ Pingo

Cart #49431 | 2018-02-19 | Code ▽ | Embed ▽ | No License
1

1
1 comment


Hello,

i'm working on a new pico-8 project and with time ... my code was long and difficult to navigate in.

As the p8 file is just a textfile ... i have the idea to extract the code as lua file ... and allow to compile a lot of lua file in my p8 file.

I have just create a simple bash file that to this ... :

if existing project : -> extract code to main.lua
if new project : -> create p8file and a default main.lua file

Now can create a lot of lua file ... and everything will be compile in your gamefile when you launch the command

As you can see ... my new project is now more readable :)

It's fresh new project ( today ) , and only tested on OSX/Linux ...
https://github.com/Nakato53/p8compile

1 comment


Cart #50267 | 2018-03-11 | Code ▽ | Embed ▽ | No License
22

Break me off a piece of that Soylent (TM) bar!

Help Old Ryan travel back to the past in this challenging puzzle game!

You will:

  • Convert tasteless, bland Soylent (TM) rations into energy
  • Void the warranty on your Mr. Disposal (TM) Anti-Matter Reactor
  • Displace time and meet your younger self in Super Lunch-Out 2 Turbo!

Instructions:

Make matching color groups of 4 or more Soylent pieces to annihilate them and expose the reactor core, which you can then use to convert a Soylent bar into energy. Create enough energy to travel back in time!

[b]Controls:

[ Continue Reading.. ]

22
16 comments


Played around with some pixeling, based on the C64 version (by MrSid ).

Maybe someone wants to actually code this thing... :)

Should be possible to compress this to even fewer sprites - then of course, do all the other levels and stuff and the amazing animations...

/ Pingo

6
6 comments


First, I can say the implementation depends on the feature wanted, but that’s also true for an entire game, right? So, nothing new.

More specificly, here is a list of bullets related features and the relations needed to implement. All the proposals are obviously related to the choice I have made during my research and my 3 different versions. (Note: I did not implement all of the features listed.)

WANT: Bullets can change direction/speed after being fired.
NEED: A function is needed to do that and not a simple addition operation. Also a time or frame counter for each bullet to use as abscissa or to trigger the direction/speed changes.
WANT: Bullets can aim to a specific point on the field or the player ship.
NEED: The previous function needs access to the player ship properties: position but also direction, can be used to shoot bullets in front of the player (sweet)!
WANT: Bullets can shoot other bullets.
NEED: Bullets need to have access to the system that shoot bullets. (I discovered that a bullet/pattern system is highly not compatible with closed, encapsuled, POO, rigid... code. In my implementation: everything is public.) It also requires the code that shoots bullets, which must be compatible with a bullet source and its properties: position, direction, cannon size (see below).
WANT: Bullets can be cancelled by a player's bomb/lazer or by the ship that shoot at them.
NEED: A cancel using a shape require a blazing fast collision system and a lot of available CPU power, that is not the case in pico-8. An enemy that cancels all the bullets that it shot when it dies requires to store a reference or the index of each one. It was impossible for me to implement that because of the bullet pool I used (see below).
WANT: Fire a group of bullets using a shape: line, arc, circle, spiral... and not necessarily at the same frame.
NEED: An emitter function that take parameters that come from the patterns data: number of bullets to fire per frame, number of frames to wait before fireing again, number of times to repeat. Or any other combination of variables that can fit. I chose this one because it simplifies the code to shoot bullets. Also, it requires to keep the emitter in memory until it finishes or it has been canceled.
WANT: Fire a shape of bullets in a specific direction or aim to the player.
NEED: Emitter should have access to the player ship.
WANT: Specify the parameters for the bullets and the shapes.
NEED: There is a lot of different implementations to solve this problem. In a previous version of my code, I used weird structs with too much depth: bullet, move, shape, frame, weapon, fire, pattern. For my pico-8 game, I use a timeline with instructions and a big function that parse it and change the parameters of a state machine. This part requires another whole post to explain.
WANT: Shoot bullets at a shorter interval than the actual frame rate of the game. It was needed for me, when I wanted to fire a pattern in a spirale shape with a very small angle between each bullet that will force the player to avoid the wall of bullets by flying around the enemy. But I didn't re-implement it in pico-8.
NEED: Some headache! The idea was to simulate the delay of a 1/4 of frame by changing the position of each bullet comparatively to the speed and the delay. Not easy, but effective and impressive effect.

When I watch some videos of commercial great shmup games, I can see what I can copy and what I can’t. There's a tone of intersting things that I have not thought of a solution yet:

  • allow ship to fire mutiple shape at a time.
  • mixing the assets of the bullets inside a same shape.
  • allow last shot bullets to catch up with the first ones. (cool effect)
  • allow to create a shape of hundred of static bullets and then, throw them at the player all at once. (very cool effect)
  • randomize position of bullets in shape (to create disorder effect)
  • use a lot of bullets with a high speed, combined with the ability to shoot bullets at a higher speed than the frame rate (see above), to create an impassable wall.
  • draw a bullet cancel effect, by changing the sprite, or spawn a particule.
  • draw not rounded bullets only.
  • allow to position bullets in a shape but shoot them in an other shape. Hard to explain but awesome effect.
  • change the cannon direction using function or by aiming at the player.
  • ...

Now, some tips for the implementation.

I'm using two structs with their respective function action: bullets are shot and shapes are fired. Here are the signatures of the two functions.

-- h= ship/cannon object
-- c= bullet count (this frame)
-- d= frame delay
-- t= repeat x times
-- n= shape function
-- m= movement function
-- s= speed
-- f= sprite index
-- w= aim follow mode
function fire(h,c,d,t,n,m,s,f,w) ... end
-- x,y= bullet position
-- u,v= bullet direction
-- f= sprite index
-- m= movement function
function shoot(x,y,u,v,f,m) ... end

Because of the limitation of pico-8, I use object pool everywhere. 512 bullets and 16 emitters. That means if I had to fire or shoot more, it will replace the ones created first.
About object pool https://www.lexaloffle.com/bbs/?tid=28114

-- t.g= next item index
 -- t.l= max number of items
function next(t)
 t.g=(t.g)%t.l+1 end

I'm using what I call the cannon size. It's the distance from the cannon and where the bullet will appear. In my pico-8, it is not variable and I regret it. Basically it is used to make the patterns more beautiful by avoiding crowded effect.

For the collision between the player and the bullets, I'm using a fake distance without computing the square root. It reduces CPU usage and its barely noticeable.

function dis(x,y,u,v)
 m,n=u-x,v-y
 return m*m+n*n end

I'm updating, drawing and testing collision in the same loop. Also to save CPU cycle.

For the shape, I finally acheived to reduce to only one function that can fire bullets in a shape of arc, circle or spirale. It's a function that return a function. The inner one can use the local variable declared in the outer one. The outer parameters come from the timeline and the state machine, the inner parameters come from the code that fire bullets.

-- a= spirate angle? 0.5 for circle shape, 0 for a point
-- s= spirale speed? I guess.
function arc(a,s)
 ...
 -- i= index of the bullet in the pool
 -- q= the shape object
 -- j= the index of the bullet in the current rendered frame
 -- f= aim follow mode
 return function(i,q,j,f) ... end end

I'm abusing the use of bullet indexes to create some diversity. I like it to be more determinist than a random function.

I hope this long explanation can help you understand how I built my pattern system. Keep in mind that I iterate a lot and refactor a lot. My solution is far from perfect, and I will probably restart from scratch any day.

If you try to read the code, I have to confess, I started this project when the tokens count system of pico-8 did not exist. The limitation was based on the numbers of characters. That’s why a lot of my variables are 2, 3 or 4 letters long. It makes the code hard to read, even for me. (edited)

1 comment


Cart #49376 | 2018-02-17 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
10

First game with pico-8. I love it so far! I'll make more.
Hope you enjoy a classic match 3 game. I added mouse support too!

10
7 comments


Cart #49370 | 2018-02-17 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

Find the exit of the donjon with the help of the Arrow!

Create in 1 Hour for the 147th One Hour Game Jam with the theme Return

Controls
Arrow key - Move

1
0 comments


So, while it might be inconvenient for use in proper math, I've really come to love tho 0-360° → 0-1 units on PICO-8 for trig functions (sin, cos).

I've never been sure what to call them, though. They're not degrees, they're not radians, they're not gradians, etc.

I think I came up with a good name.

A "radian" is called that because the angle is expressed as how many radiuses of a unit circle you have to move around that circle's circumference to get to the desired angle. Like, on a circle of any given radius, you have to literally move a distance of 2*pi radiuses around the circle to go a full 360° and end up where you started. A radian is such a distance, but specifically on a circle of radius 1.

So if a radian is an expression of how many radiuses we move around the circle, and PICO-8's units represent how much of the circumference (or how many circumferences) we've moved around the circle, then the unit should be named something to do with the circumference.

"Circumferans" and "circians" don't really work for me. I also considered twopidians, but that's also kinda awkward.

But then, I remembered my discovery of how much better it usually is to use tau in most trig math. Tau, if you don't know, is just another name for 2*pi. One tau is basically one trip around the circle. Tau usually produces cleaner math because it doesn't involve that pesky constant.

(For more on tau, see this classic piece by Vi Hart: https://www.youtube.com/watch?v=jG7vhMMXagQ)

Thus, I propose: [b]taudians

[ Continue Reading.. ]

4 comments


Cart #49438 | 2018-02-20 | Code ▽ | Embed ▽ | No License
2

hey all,

I managed to get a feedback setup working with peek and poke. It looks like this is all the abuse that the cart can take. The framerate is pretty solid as is, but any additional code (even simple maths) sends the framerate through the floor. I'm excited to keep messing around with manipulating memory. If anyone has any tips for optimization, let me know! Thanks!

mike

Cart #49347 | 2018-02-17 | Code ▽ | Embed ▽ | No License
2

hey all,

new to pico-8 here but quickly falling in love.

as an experiment, I threw together this basic feedback system using pget and pset

is there a more efficient way to do this? i know its possible to access the screen buffer using the various memory getters and setters. is there a way to modify these values before re-setting them?

also, how would i scale (zoom in/out) the current contents of the screen?

thanks!

mike

2
0 comments



 

Hey everyone! It's been a while since my Doukutsu Demake and it's been far too long since I've worked with Pico-8. I decided I want to get back into the space, so I'm making simple projects over on YouTube. My first challenge is building Conway's Game of Life, from scratch, on screen. The result is the video and cart that you see above.

Comments and criticism encouraged, we're all friends here :)

My Doukutsu Demake made a splash, but I still consider myself to be a beginner Pico-8 programmer, and the most novice of game developers. I have much to learn. Pico-8 has enormous potential, and there's so much left to learn, and I'm hoping I can help a few other people learn along side me. I'm planning on posting a new Pico Challenge every Friday for the foreseeable future.

If you have any ideas for challenges I should do in the future, feel free to ask! I'd love to hear any idea, no matter how big or small.

Thanks guys!

5
4 comments


Cart #49746 | 2018-02-27 | Code ▽ | Embed ▽ | No License
4

This was my entry to MovieGameJam 2018. Made in 10 days.

You need to guide Gruber as he falls and collect as many coins/money as you can whilst avoiding the flaming windows.

Controls:
Left and Right arrows - Move Gruber
X - Menu Confirm/Skip Cutscenes
Z - Menu Change Rating (R/PG-13)

Scoring points:
Coins - 10 points
Notes - 50 points
Limo - 100 points
Fire - minus 100 points

Bonus features:
You can activate PG-13 mode from the title screen which removes the profanity and violence (but why would you want to do that?)

Tips:
As coins spin they become smaller and therefore harder to collect so try and grab them when they are front facing.

[ Continue Reading.. ]

4
8 comments



Hi. everyone! This is my first cartridge , enjoy!

The original game is Wario Land for GB :)

0 comments


Cart #49319 | 2018-02-16 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

Inspired by Christopher Alexander's A Pattern Language, in Itty Bitty Citty your score depends on building patterns of residential, commercial, industrial and park areas. Two residential tiles next to each other gets you +1 health, residential next to commercial gets +1 health and +1 wealth, industrial next to residential gets -2 health, and so on. There are two independent scores, with no combined metric—it's up to you to decide whether you care more about health, wealth, or a balance between the two.

Have a play and see what patterns you can find! And let me know your scores, I'm not sure what the highest wealth or health possible is :)

Here are a few patterns to get you started:

RR : +1 health

RC : +1 health, +1 wealth

II : +1 wealth

RI : -2 health

RI
RC : +2 health (4-tile pattern)

... and many others!

(all patterns will still match when rotated/flipped)

3
1 comment


Hi y'all!

I recently put together a little narrative game in pico-8, but am getting feedback that for some folks, the in-game font just isn't legible, which makes it kind of unplayable for them. Oh no! Now I'm looking into transcript options to help make things more accessible. The easiest thing would be to include a text file of everything in the game, but that feels a little impractical. I'm hoping I can go for something a little more dynamic, since this is a game after all!

My thought was that it might be possible to edit the HTML file that goes alongside the cartridge for publishing games. This hypothetical edit would make it so that players have the option to display the on-screen text in a more accessible font below the main game. It seems great in theory, but I'm not sure how possible it actually is. I know that smaller edits like frame colors are possible, but this would require communication between the game and the HTML file, which seems tricky, especially given the translation between the two coding languages. It seems a bit too aspirational from where I'm standing from.

Still, this would be an ideal setup for players who need a different font to play the game, so I'm coming to you all to ask for thoughts. Does this seem possible? Would it require a lot of extra coding? Has it already been done? Any input is helpful input!

Thank you :)

2 comments


Cart #49305 | 2018-02-15 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
104

Gameplay

Fly through the tunnel as fast as possible avoiding the walls. The tunnel is divided in to Zones, with four Quadrants per zone. Each zone is progressively longer and more difficult than the previous, with sharper turns, more turns, and narrower sections.

Each quadrant has a time limit - note that this is not the time limit that the quadrant must be completed in, but the time until your ships engine power is cut (T+ engine shut-off). Engine power is required for anti-gravity and maneuvering as well as propulsion...ie if the time runs out your hope lies in gliding (or sliding!) to the finish. As quadrants advance, the time limit becomes stricter. Note that your progress in the quadrant is indicated by the right hand HUD gauge.

Hitting walls will slow you down, and reduce the energy of the ship (indicated by gauge on left hand side of HUD). Energy will be slowly replenished during the period of flying through the 'safe section' at the end of each ZONE (grey section with orange stripes). If energy becomes fully depleted the ship will fail and you will lose a life. Similarly, failure to complete a quadrant in time will cost a life. You begin the game with three lives, indicated by the three red lights on the left hand side of the dashboard.

Points are continuously awarded for progress, with a bonus for completing each quadrant (unless T+ shutdown occurs). Additional ships can be unlocked by making progress in the game. Faster ships will yield higher scores than slower ones.

[ Continue Reading.. ]

104
25 comments


Cart #49298 | 2018-02-15 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

First PICO-8 game I made for Pizza Jam.

Run a full 42km marathon without stop! Push LEFT/RIGHT alternatingly to run, and never stop!

3
1 comment


Cart #49296 | 2018-02-15 | Code ▽ | Embed ▽ | No License
19

Lick the Sky is a relaxing arcade climber about a lizard who stared up into the sky and wanted to lick the stars.

High scores are based on climbing time, flight time and time latched to shooting stars. But don't get hung up on it. Put on some music, relax, and Lick the Sky!

19
9 comments


Cart #49276 | 2018-02-14 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

Hey! Today is the February 14th! And it's the Valentin's Day :D

So I decided to create a little doodle with Pico-8! You can use it to calculate you % of love with you neightboor :3

Controls
Left/Right Arrow - Change Name
Down Arrow - Calculate
Keyboard - Enter the name

Itch Page : https://bigaston.itch.io/love-tester-doodle

1
0 comments




Top    Load More Posts ->